generated-configure.sh revision 2717:792022c45e19
1280405Srpaulo#!/bin/bash
2344220Skevans#
3280405Srpaulo# ##########################################################
4280405Srpaulo# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5280405Srpaulo# ##########################################################
6280405Srpaulo#
7280405Srpaulo#! /bin/sh
8280405Srpaulo# Guess values for system-dependent variables and create Makefiles.
9280405Srpaulo# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10280405Srpaulo#
11280405Srpaulo# Report bugs to <build-dev@openjdk.java.net>.
12280405Srpaulo#
13280405Srpaulo#
14280405Srpaulo# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15280405Srpaulo#
16280405Srpaulo#
17280405Srpaulo# This configure script is free software; the Free Software Foundation
18280405Srpaulo# gives unlimited permission to copy, distribute and modify it.
19280405Srpaulo## -------------------- ##
20280405Srpaulo## M4sh Initialization. ##
21280405Srpaulo## -------------------- ##
22280405Srpaulo
23280405Srpaulo# Be more Bourne compatible
24280405SrpauloDUALCASE=1; export DUALCASE # for MKS sh
25280405Srpauloif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26280405Srpaulo  emulate sh
27280405Srpaulo  NULLCMD=:
28280405Srpaulo  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29280405Srpaulo  # is contrary to our usage.  Disable this feature.
30280405Srpaulo  alias -g '${1+"$@"}'='"$@"'
31280405Srpaulo  setopt NO_GLOB_SUBST
32280405Srpauloelse
33280405Srpaulo  case `(set -o) 2>/dev/null` in #(
34280405Srpaulo  *posix*) :
35280405Srpaulo    set -o posix ;; #(
36280405Srpaulo  *) :
37280405Srpaulo     ;;
38280405Srpauloesac
39280405Srpaulofi
40280405Srpaulo
41280405Srpaulo
42280405Srpauloas_nl='
43280405Srpaulo'
44280405Srpauloexport as_nl
45280405Srpaulo# Printing a long string crashes Solaris 7 /usr/bin/printf.
46280405Srpauloas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47280405Srpauloas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48280405Srpauloas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49280405Srpaulo# Prefer a ksh shell builtin over an external printf program on Solaris,
50280405Srpaulo# but without wasting forks for bash or zsh.
51280405Srpauloif test -z "$BASH_VERSION$ZSH_VERSION" \
52280405Srpaulo    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53280405Srpaulo  as_echo='print -r --'
54280405Srpaulo  as_echo_n='print -rn --'
55280405Srpauloelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56280405Srpaulo  as_echo='printf %s\n'
57280405Srpaulo  as_echo_n='printf %s'
58280405Srpauloelse
59280405Srpaulo  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60280405Srpaulo    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61280405Srpaulo    as_echo_n='/usr/ucb/echo -n'
62280405Srpaulo  else
63280405Srpaulo    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64280405Srpaulo    as_echo_n_body='eval
65280405Srpaulo      arg=$1;
66280405Srpaulo      case $arg in #(
67280405Srpaulo      *"$as_nl"*)
68280405Srpaulo	expr "X$arg" : "X\\(.*\\)$as_nl";
69280405Srpaulo	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70280405Srpaulo      esac;
71280405Srpaulo      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72280405Srpaulo    '
73280405Srpaulo    export as_echo_n_body
74280405Srpaulo    as_echo_n='sh -c $as_echo_n_body as_echo'
75280405Srpaulo  fi
76280405Srpaulo  export as_echo_body
77280405Srpaulo  as_echo='sh -c $as_echo_body as_echo'
78280405Srpaulofi
79280405Srpaulo
80280405Srpaulo# The user is always right.
81280405Srpauloif test "${PATH_SEPARATOR+set}" != set; then
82280405Srpaulo  PATH_SEPARATOR=:
83280405Srpaulo  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84280405Srpaulo    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85280405Srpaulo      PATH_SEPARATOR=';'
86280405Srpaulo  }
87280405Srpaulofi
88280405Srpaulo
89280405Srpaulo
90280405Srpaulo# IFS
91280405Srpaulo# We need space, tab and new line, in precisely that order.  Quoting is
92280405Srpaulo# there to prevent editors from complaining about space-tab.
93280405Srpaulo# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94280405Srpaulo# splitting by setting IFS to empty value.)
95280405SrpauloIFS=" ""	$as_nl"
96280405Srpaulo
97280405Srpaulo# Find who we are.  Look in the path if we contain no directory separator.
98280405Srpauloas_myself=
99280405Srpaulocase $0 in #((
100280405Srpaulo  *[\\/]* ) as_myself=$0 ;;
101280405Srpaulo  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102280405Srpaulofor as_dir in $PATH
103280405Srpaulodo
104280405Srpaulo  IFS=$as_save_IFS
105280405Srpaulo  test -z "$as_dir" && as_dir=.
106280405Srpaulo    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107280405Srpaulo  done
108280405SrpauloIFS=$as_save_IFS
109280405Srpaulo
110280405Srpaulo     ;;
111280405Srpauloesac
112280405Srpaulo# We did not find ourselves, most probably we were run as `sh COMMAND'
113280405Srpaulo# in which case we are not to be found in the path.
114280405Srpauloif test "x$as_myself" = x; then
115280405Srpaulo  as_myself=$0
116280405Srpaulofi
117280405Srpauloif test ! -f "$as_myself"; then
118280405Srpaulo  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119280405Srpaulo  exit 1
120280405Srpaulofi
121280405Srpaulo
122280405Srpaulo# Unset variables that we do not need and which cause bugs (e.g. in
123280405Srpaulo# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124280405Srpaulo# suppresses any "Segmentation fault" message there.  '((' could
125280405Srpaulo# trigger a bug in pdksh 5.2.14.
126280405Srpaulofor as_var in BASH_ENV ENV MAIL MAILPATH
127280405Srpaulodo eval test x\${$as_var+set} = xset \
128280405Srpaulo  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129280405Srpaulodone
130280405SrpauloPS1='$ '
131280405SrpauloPS2='> '
132280405SrpauloPS4='+ '
133280405Srpaulo
134280405Srpaulo# NLS nuisances.
135280405SrpauloLC_ALL=C
136280405Srpauloexport LC_ALL
137280405SrpauloLANGUAGE=C
138280405Srpauloexport LANGUAGE
139280405Srpaulo
140280405Srpaulo# CDPATH.
141280405Srpaulo(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142280405Srpaulo
143280405Srpaulo# Use a proper internal environment variable to ensure we don't fall
144280405Srpaulo  # into an infinite loop, continuously re-executing ourselves.
145280405Srpaulo  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146280405Srpaulo    _as_can_reexec=no; export _as_can_reexec;
147280405Srpaulo    # We cannot yet assume a decent shell, so we have to provide a
148280405Srpaulo# neutralization value for shells without unset; and this also
149280405Srpaulo# works around shells that cannot unset nonexistent variables.
150280405Srpaulo# Preserve -v and -x to the replacement shell.
151280405SrpauloBASH_ENV=/dev/null
152280405SrpauloENV=/dev/null
153326344Simp(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154326344Simpcase $- in # ((((
155326344Simp  *v*x* | *x*v* ) as_opts=-vx ;;
156326344Simp  *v* ) as_opts=-v ;;
157326344Simp  *x* ) as_opts=-x ;;
158280405Srpaulo  * ) as_opts= ;;
159280405Srpauloesac
160280405Srpauloexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161280405Srpaulo# Admittedly, this is quite paranoid, since all the known shells bail
162280405Srpaulo# out after a failed `exec'.
163280405Srpaulo$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164280405Srpauloas_fn_exit 255
165280405Srpaulo  fi
166280405Srpaulo  # We don't want this to propagate to other subprocesses.
167280405Srpaulo          { _as_can_reexec=; unset _as_can_reexec;}
168280405Srpauloif test "x$CONFIG_SHELL" = x; then
169280405Srpaulo  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170280405Srpaulo  emulate sh
171280405Srpaulo  NULLCMD=:
172280405Srpaulo  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173280405Srpaulo  # is contrary to our usage.  Disable this feature.
174280405Srpaulo  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175280405Srpaulo  setopt NO_GLOB_SUBST
176280405Srpauloelse
177280405Srpaulo  case \`(set -o) 2>/dev/null\` in #(
178280405Srpaulo  *posix*) :
179280405Srpaulo    set -o posix ;; #(
180280405Srpaulo  *) :
181280405Srpaulo     ;;
182280405Srpauloesac
183280405Srpaulofi
184280405Srpaulo"
185280405Srpaulo  as_required="as_fn_return () { (exit \$1); }
186280405Srpauloas_fn_success () { as_fn_return 0; }
187280405Srpauloas_fn_failure () { as_fn_return 1; }
188280405Srpauloas_fn_ret_success () { return 0; }
189280405Srpauloas_fn_ret_failure () { return 1; }
190280405Srpaulo
191280405Srpauloexitcode=0
192280405Srpauloas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193280405Srpauloas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194280405Srpauloas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195280405Srpauloas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196280405Srpauloif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197280405Srpaulo
198280405Srpauloelse
199280405Srpaulo  exitcode=1; echo positional parameters were not saved.
200280405Srpaulofi
201280405Srpaulotest x\$exitcode = x0 || exit 1
202280405Srpaulotest -x / || exit 1"
203280405Srpaulo  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204280405Srpaulo  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205280405Srpaulo  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206280405Srpaulo  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207280405Srpaulotest \$(( 1 + 1 )) = 2 || exit 1"
208280405Srpaulo  if (eval "$as_required") 2>/dev/null; then :
209280405Srpaulo  as_have_required=yes
210280405Srpauloelse
211280405Srpaulo  as_have_required=no
212280405Srpaulofi
213280405Srpaulo  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214280405Srpaulo
215280405Srpauloelse
216326344Simp  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217280405Srpauloas_found=false
218280405Srpaulofor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219280405Srpaulodo
220280405Srpaulo  IFS=$as_save_IFS
221280405Srpaulo  test -z "$as_dir" && as_dir=.
222280405Srpaulo  as_found=:
223280405Srpaulo  case $as_dir in #(
224326344Simp	 /*)
225326344Simp	   for as_base in sh bash ksh sh5; do
226326344Simp	     # Try only shells that exist, to save several forks.
227280405Srpaulo	     as_shell=$as_dir/$as_base
228280405Srpaulo	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229280405Srpaulo		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230326344Simp  CONFIG_SHELL=$as_shell as_have_required=yes
231326344Simp		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232326344Simp  break 2
233326344Simpfi
234326344Simpfi
235326344Simp	   done;;
236326344Simp       esac
237280405Srpaulo  as_found=false
238280405Srpaulodone
239280405Srpaulo$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240326344Simp	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241326344Simp  CONFIG_SHELL=$SHELL as_have_required=yes
242326344Simpfi; }
243326344SimpIFS=$as_save_IFS
244326344Simp
245326344Simp
246326344Simp      if test "x$CONFIG_SHELL" != x; then :
247326344Simp  export CONFIG_SHELL
248326344Simp             # We cannot yet assume a decent shell, so we have to provide a
249326344Simp# neutralization value for shells without unset; and this also
250326344Simp# works around shells that cannot unset nonexistent variables.
251326344Simp# Preserve -v and -x to the replacement shell.
252326344SimpBASH_ENV=/dev/null
253280405SrpauloENV=/dev/null
254280405Srpaulo(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255326344Simpcase $- in # ((((
256280405Srpaulo  *v*x* | *x*v* ) as_opts=-vx ;;
257280405Srpaulo  *v* ) as_opts=-v ;;
258280405Srpaulo  *x* ) as_opts=-x ;;
259280405Srpaulo  * ) as_opts= ;;
260280405Srpauloesac
261280405Srpauloexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262280405Srpaulo# Admittedly, this is quite paranoid, since all the known shells bail
263280405Srpaulo# out after a failed `exec'.
264280405Srpaulo$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265280405Srpauloexit 255
266280405Srpaulofi
267280405Srpaulo
268280405Srpaulo    if test x$as_have_required = xno; then :
269280405Srpaulo  $as_echo "$0: This script requires a shell more modern than all"
270280405Srpaulo  $as_echo "$0: the shells that I found on your system."
271280405Srpaulo  if test x${ZSH_VERSION+set} = xset ; then
272280405Srpaulo    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273280405Srpaulo    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274280405Srpaulo  else
275280405Srpaulo    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276280405Srpaulo$0: build-dev@openjdk.java.net about your system, including
277280405Srpaulo$0: any error possibly output before this message. Then
278280405Srpaulo$0: install a modern shell, or manually run the script
279280405Srpaulo$0: under such a shell if you do have one."
280280405Srpaulo  fi
281280405Srpaulo  exit 1
282280405Srpaulofi
283280405Srpaulofi
284280405Srpaulofi
285280405SrpauloSHELL=${CONFIG_SHELL-/bin/sh}
286280405Srpauloexport SHELL
287280405Srpaulo# Unset more variables known to interfere with behavior of common tools.
288280405SrpauloCLICOLOR_FORCE= GREP_OPTIONS=
289280405Srpaulounset CLICOLOR_FORCE GREP_OPTIONS
290280405Srpaulo
291280405Srpaulo## --------------------- ##
292280405Srpaulo## M4sh Shell Functions. ##
293280405Srpaulo## --------------------- ##
294280405Srpaulo# as_fn_unset VAR
295280405Srpaulo# ---------------
296280405Srpaulo# Portably unset VAR.
297280405Srpauloas_fn_unset ()
298280405Srpaulo{
299280405Srpaulo  { eval $1=; unset $1;}
300326344Simp}
301280405Srpauloas_unset=as_fn_unset
302326344Simp
303280405Srpaulo# as_fn_set_status STATUS
304326344Simp# -----------------------
305326344Simp# Set $? to STATUS, without forking.
306280405Srpauloas_fn_set_status ()
307280405Srpaulo{
308280405Srpaulo  return $1
309280405Srpaulo} # as_fn_set_status
310280405Srpaulo
311280405Srpaulo# as_fn_exit STATUS
312280405Srpaulo# -----------------
313280405Srpaulo# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314280405Srpauloas_fn_exit ()
315280405Srpaulo{
316280405Srpaulo  set +e
317280405Srpaulo  as_fn_set_status $1
318280405Srpaulo  exit $1
319280405Srpaulo} # as_fn_exit
320280405Srpaulo
321280405Srpaulo# as_fn_mkdir_p
322280405Srpaulo# -------------
323280405Srpaulo# Create "$as_dir" as a directory, including parents if necessary.
324280405Srpauloas_fn_mkdir_p ()
325280405Srpaulo{
326280405Srpaulo
327280405Srpaulo  case $as_dir in #(
328326344Simp  -*) as_dir=./$as_dir;;
329326344Simp  esac
330326344Simp  test -d "$as_dir" || eval $as_mkdir_p || {
331326344Simp    as_dirs=
332326344Simp    while :; do
333326344Simp      case $as_dir in #(
334326344Simp      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335326344Simp      *) as_qdir=$as_dir;;
336326344Simp      esac
337326344Simp      as_dirs="'$as_qdir' $as_dirs"
338326344Simp      as_dir=`$as_dirname -- "$as_dir" ||
339326344Simp$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340326344Simp	 X"$as_dir" : 'X\(//\)[^/]' \| \
341326344Simp	 X"$as_dir" : 'X\(//\)$' \| \
342326344Simp	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343326344Simp$as_echo X"$as_dir" |
344326344Simp    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345326344Simp	    s//\1/
346326344Simp	    q
347326344Simp	  }
348326344Simp	  /^X\(\/\/\)[^/].*/{
349326344Simp	    s//\1/
350326344Simp	    q
351326344Simp	  }
352326344Simp	  /^X\(\/\/\)$/{
353326344Simp	    s//\1/
354326344Simp	    q
355326344Simp	  }
356326344Simp	  /^X\(\/\).*/{
357326344Simp	    s//\1/
358326344Simp	    q
359326344Simp	  }
360326344Simp	  s/.*/./; q'`
361326344Simp      test -d "$as_dir" && break
362326344Simp    done
363326344Simp    test -z "$as_dirs" || eval "mkdir $as_dirs"
364326344Simp  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365326344Simp
366326344Simp
367326344Simp} # as_fn_mkdir_p
368326344Simp
369280405Srpaulo# as_fn_executable_p FILE
370326344Simp# -----------------------
371326344Simp# Test if FILE is an executable regular file.
372326344Simpas_fn_executable_p ()
373326344Simp{
374326344Simp  test -f "$1" && test -x "$1"
375326344Simp} # as_fn_executable_p
376326344Simp# as_fn_append VAR VALUE
377326344Simp# ----------------------
378326344Simp# Append the text in VALUE to the end of the definition contained in VAR. Take
379326344Simp# advantage of any shell optimizations that allow amortized linear growth over
380326344Simp# repeated appends, instead of the typical quadratic growth present in naive
381326344Simp# implementations.
382326344Simpif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383326344Simp  eval 'as_fn_append ()
384326344Simp  {
385326344Simp    eval $1+=\$2
386326344Simp  }'
387326344Simpelse
388326344Simp  as_fn_append ()
389326344Simp  {
390326344Simp    eval $1=\$$1\$2
391326344Simp  }
392326344Simpfi # as_fn_append
393326344Simp
394326344Simp# as_fn_arith ARG...
395280405Srpaulo# ------------------
396280405Srpaulo# Perform arithmetic evaluation on the ARGs, and store the result in the
397280405Srpaulo# global $as_val. Take advantage of shells that can avoid forks. The arguments
398326344Simp# must be portable across $(()) and expr.
399326344Simpif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400326344Simp  eval 'as_fn_arith ()
401326344Simp  {
402326344Simp    as_val=$(( $* ))
403326344Simp  }'
404326344Simpelse
405326344Simp  as_fn_arith ()
406280405Srpaulo  {
407326344Simp    as_val=`expr "$@" || test $? -eq 1`
408326344Simp  }
409326344Simpfi # as_fn_arith
410326344Simp
411326344Simp
412280405Srpaulo# as_fn_error STATUS ERROR [LINENO LOG_FD]
413280405Srpaulo# ----------------------------------------
414280405Srpaulo# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415280405Srpaulo# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416280405Srpaulo# script with STATUS, using 1 if that was 0.
417326344Simpas_fn_error ()
418326344Simp{
419326344Simp  as_status=$1; test $as_status -eq 0 && as_status=1
420280405Srpaulo  if test "$4"; then
421280405Srpaulo    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422326344Simp    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423326344Simp  fi
424326344Simp  $as_echo "$as_me: error: $2" >&2
425280405Srpaulo  as_fn_exit $as_status
426280405Srpaulo} # as_fn_error
427326344Simp
428280405Srpauloif expr a : '\(a\)' >/dev/null 2>&1 &&
429280405Srpaulo   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430280405Srpaulo  as_expr=expr
431280405Srpauloelse
432280405Srpaulo  as_expr=false
433280405Srpaulofi
434280405Srpaulo
435280405Srpauloif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436280405Srpaulo  as_basename=basename
437326344Simpelse
438280405Srpaulo  as_basename=false
439280405Srpaulofi
440280405Srpaulo
441280405Srpauloif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442280405Srpaulo  as_dirname=dirname
443326344Simpelse
444326344Simp  as_dirname=false
445326344Simpfi
446326344Simp
447326344Simpas_me=`$as_basename -- "$0" ||
448326344Simp$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449326344Simp	 X"$0" : 'X\(//\)$' \| \
450326344Simp	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451280405Srpaulo$as_echo X/"$0" |
452280405Srpaulo    sed '/^.*\/\([^/][^/]*\)\/*$/{
453280405Srpaulo	    s//\1/
454280405Srpaulo	    q
455280405Srpaulo	  }
456280405Srpaulo	  /^X\/\(\/\/\)$/{
457326344Simp	    s//\1/
458280405Srpaulo	    q
459280405Srpaulo	  }
460280405Srpaulo	  /^X\/\(\/\).*/{
461280405Srpaulo	    s//\1/
462280405Srpaulo	    q
463280405Srpaulo	  }
464280405Srpaulo	  s/.*/./; q'`
465280405Srpaulo
466326344Simp# Avoid depending upon Character Ranges.
467280405Srpauloas_cr_letters='abcdefghijklmnopqrstuvwxyz'
468280405Srpauloas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469280405Srpauloas_cr_Letters=$as_cr_letters$as_cr_LETTERS
470280405Srpauloas_cr_digits='0123456789'
471280405Srpauloas_cr_alnum=$as_cr_Letters$as_cr_digits
472280405Srpaulo
473280405Srpaulo
474326344Simp  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475326344Simp  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476326344Simp  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477326344Simp  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478326344Simp  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479326344Simp  sed -n '
480326344Simp    p
481326344Simp    /[$]LINENO/=
482326344Simp  ' <$as_myself |
483326344Simp    sed '
484326344Simp      s/[$]LINENO.*/&-/
485326344Simp      t lineno
486280405Srpaulo      b
487280405Srpaulo      :lineno
488280405Srpaulo      N
489280405Srpaulo      :loop
490280405Srpaulo      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491280405Srpaulo      t loop
492280405Srpaulo      s/-\n.*//
493280405Srpaulo    ' >$as_me.lineno &&
494280405Srpaulo  chmod +x "$as_me.lineno" ||
495326344Simp    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496326344Simp
497326344Simp  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498280405Srpaulo  # already done that, so ensure we don't try to do so again and fall
499280405Srpaulo  # in an infinite loop.  This has already happened in practice.
500280405Srpaulo  _as_can_reexec=no; export _as_can_reexec
501280405Srpaulo  # Don't try to exec as it changes $[0], causing all sort of problems
502280405Srpaulo  # (the dirname of $[0] is not the place where we might find the
503280405Srpaulo  # original and so on.  Autoconf is especially sensitive to this).
504280405Srpaulo  . "./$as_me.lineno"
505326344Simp  # Exit status is that of the last command.
506326344Simp  exit
507326344Simp}
508326344Simp
509326344SimpECHO_C= ECHO_N= ECHO_T=
510326344Simpcase `echo -n x` in #(((((
511326344Simp-n*)
512326344Simp  case `echo 'xy\c'` in
513326344Simp  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514326344Simp  xy)  ECHO_C='\c';;
515280405Srpaulo  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516280405Srpaulo       ECHO_T='	';;
517280405Srpaulo  esac;;
518280405Srpaulo*)
519280405Srpaulo  ECHO_N='-n';;
520280405Srpauloesac
521280405Srpaulo
522280405Srpaulorm -f conf$$ conf$$.exe conf$$.file
523280405Srpauloif test -d conf$$.dir; then
524280405Srpaulo  rm -f conf$$.dir/conf$$.file
525280405Srpauloelse
526326344Simp  rm -f conf$$.dir
527326344Simp  mkdir conf$$.dir 2>/dev/null
528280405Srpaulofi
529280405Srpauloif (echo >conf$$.file) 2>/dev/null; then
530280405Srpaulo  if ln -s conf$$.file conf$$ 2>/dev/null; then
531280405Srpaulo    as_ln_s='ln -s'
532280405Srpaulo    # ... but there are two gotchas:
533326344Simp    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534280405Srpaulo    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535280405Srpaulo    # In both cases, we have to default to `cp -pR'.
536326344Simp    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537280405Srpaulo      as_ln_s='cp -pR'
538280405Srpaulo  elif ln conf$$.file conf$$ 2>/dev/null; then
539280405Srpaulo    as_ln_s=ln
540280405Srpaulo  else
541280405Srpaulo    as_ln_s='cp -pR'
542280405Srpaulo  fi
543280405Srpauloelse
544280405Srpaulo  as_ln_s='cp -pR'
545280405Srpaulofi
546280405Srpaulorm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547280405Srpaulormdir conf$$.dir 2>/dev/null
548280405Srpaulo
549280405Srpauloif mkdir -p . 2>/dev/null; then
550280405Srpaulo  as_mkdir_p='mkdir -p "$as_dir"'
551280405Srpauloelse
552280405Srpaulo  test -d ./-p && rmdir ./-p
553280405Srpaulo  as_mkdir_p=false
554280405Srpaulofi
555280405Srpaulo
556280405Srpauloas_test_x='test -x'
557280405Srpauloas_executable_p=as_fn_executable_p
558280405Srpaulo
559280405Srpaulo# Sed expression to map a string onto a valid CPP name.
560280405Srpauloas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561280405Srpaulo
562280405Srpaulo# Sed expression to map a string onto a valid variable name.
563280405Srpauloas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564280405Srpaulo
565280405Srpaulo
566280405Srpaulotest -n "$DJDIR" || exec 7<&0 </dev/null
567280405Srpauloexec 6>&1
568280405Srpaulo
569280405Srpaulo# Name of the host.
570280405Srpaulo# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571280405Srpaulo# so uname gets run too.
572280405Srpauloac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573280405Srpaulo
574280405Srpaulo#
575280405Srpaulo# Initializations.
576280405Srpaulo#
577280405Srpauloac_default_prefix=/usr/local
578280405Srpauloac_clean_files=
579280405Srpauloac_config_libobj_dir=.
580280405SrpauloLIBOBJS=
581280405Srpaulocross_compiling=no
582280405Srpaulosubdirs=
583280405SrpauloMFLAGS=
584280405SrpauloMAKEFLAGS=
585280405Srpaulo
586280405Srpaulo# Identity of this package.
587280405SrpauloPACKAGE_NAME='OpenJDK'
588280405SrpauloPACKAGE_TARNAME='openjdk'
589280405SrpauloPACKAGE_VERSION='jdk9'
590280405SrpauloPACKAGE_STRING='OpenJDK jdk9'
591280405SrpauloPACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592280405SrpauloPACKAGE_URL='http://openjdk.java.net'
593280405Srpaulo
594280405Srpaulo# Factoring default headers for most tests.
595280405Srpauloac_includes_default="\
596280405Srpaulo#include <stdio.h>
597280405Srpaulo#ifdef HAVE_SYS_TYPES_H
598280405Srpaulo# include <sys/types.h>
599326344Simp#endif
600326344Simp#ifdef HAVE_SYS_STAT_H
601326344Simp# include <sys/stat.h>
602280405Srpaulo#endif
603326344Simp#ifdef STDC_HEADERS
604326344Simp# include <stdlib.h>
605280405Srpaulo# include <stddef.h>
606280405Srpaulo#else
607326344Simp# ifdef HAVE_STDLIB_H
608326344Simp#  include <stdlib.h>
609280405Srpaulo# endif
610280405Srpaulo#endif
611280405Srpaulo#ifdef HAVE_STRING_H
612280405Srpaulo# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613280405Srpaulo#  include <memory.h>
614280405Srpaulo# endif
615280405Srpaulo# include <string.h>
616280405Srpaulo#endif
617280405Srpaulo#ifdef HAVE_STRINGS_H
618280405Srpaulo# include <strings.h>
619280405Srpaulo#endif
620326344Simp#ifdef HAVE_INTTYPES_H
621326344Simp# include <inttypes.h>
622280405Srpaulo#endif
623326344Simp#ifdef HAVE_STDINT_H
624280405Srpaulo# include <stdint.h>
625280405Srpaulo#endif
626280405Srpaulo#ifdef HAVE_UNISTD_H
627280405Srpaulo# include <unistd.h>
628326344Simp#endif"
629280405Srpaulo
630280405Srpauloac_subst_vars='LTLIBOBJS
631280405SrpauloLIBOBJS
632280405SrpauloCFLAGS_CCACHE
633280405SrpauloCCACHE
634280405SrpauloUSE_PRECOMPILED_HEADER
635280405SrpauloBUILD_ICECC
636280405SrpauloICECC
637280405SrpauloICECC_WRAPPER
638280405SrpauloICECC_CREATE_ENV
639280405SrpauloICECC_CMD
640280405SrpauloENABLE_JAVAC_SERVER
641326344SimpENABLE_SJAVAC
642280405SrpauloSJAVAC_SERVER_JAVA_FLAGS
643280405SrpauloSJAVAC_SERVER_JAVA
644280405SrpauloJAVA_TOOL_FLAGS_SMALL
645280405SrpauloJAVA_FLAGS_SMALL
646280405SrpauloJAVA_FLAGS_JAVAC
647280405SrpauloBOOTCYCLE_JVM_ARGS_BIG
648280405SrpauloJAVA_FLAGS_BIG
649280405SrpauloJAVA_FLAGS
650326344SimpTEST_JOBS
651280405SrpauloJOBS
652326344SimpMEMORY_SIZE
653326344SimpNUM_CORES
654326344SimpENABLE_GENERATE_CLASSLIST
655326344SimpBUILD_FAILURE_HANDLER
656326344SimpENABLE_INTREE_EC
657326344SimpVALID_JVM_FEATURES
658326344SimpJVM_FEATURES_custom
659326344SimpJVM_FEATURES_zeroshark
660326344SimpJVM_FEATURES_zero
661280405SrpauloJVM_FEATURES_minimal
662280405SrpauloJVM_FEATURES_core
663280405SrpauloJVM_FEATURES_client
664326344SimpJVM_FEATURES_server
665280405SrpauloINCLUDE_GRAAL
666280405SrpauloSTLPORT_LIB
667280405SrpauloLIBZIP_CAN_USE_MMAP
668280405SrpauloLIBDL
669280405SrpauloLIBM
670280405SrpauloUSE_EXTERNAL_LCMS
671280405SrpauloLCMS_LIBS
672280405SrpauloLCMS_CFLAGS
673280405SrpauloUSE_EXTERNAL_LIBZ
674280405SrpauloUSE_EXTERNAL_LIBPNG
675280405SrpauloPNG_LIBS
676280405SrpauloPNG_CFLAGS
677280405SrpauloUSE_EXTERNAL_LIBGIF
678280405SrpauloUSE_EXTERNAL_LIBJPEG
679280405SrpauloLLVM_LIBS
680280405SrpauloLLVM_LDFLAGS
681280405SrpauloLLVM_CFLAGS
682280405SrpauloLLVM_CONFIG
683280405SrpauloLIBFFI_LIB_FILE
684280405SrpauloENABLE_LIBFFI_BUNDLING
685280405SrpauloLIBFFI_LIBS
686280405SrpauloLIBFFI_CFLAGS
687280405SrpauloALSA_LIBS
688280405SrpauloALSA_CFLAGS
689280405SrpauloFREETYPE_BUNDLE_LIB_PATH
690280405SrpauloFREETYPE_LIBS
691280405SrpauloFREETYPE_CFLAGS
692280405SrpauloCUPS_CFLAGS
693280405SrpauloX_EXTRA_LIBS
694280405SrpauloX_LIBS
695280405SrpauloX_PRE_LIBS
696280405SrpauloX_CFLAGS
697280405SrpauloXMKMF
698280405SrpauloMSVCP_DLL
699280405SrpauloMSVCR_DLL
700280405SrpauloLIBCXX
701280405SrpauloFIXPATH_DETACH_FLAG
702280405SrpauloFIXPATH
703280405SrpauloBUILD_GTEST
704280405SrpauloENABLE_AOT
705280405SrpauloGCOV_ENABLED
706280405SrpauloZIP_EXTERNAL_DEBUG_SYMBOLS
707326344SimpCOPY_DEBUG_SYMBOLS
708280405SrpauloCOMPILE_WITH_DEBUG_SYMBOLS
709280405SrpauloCFLAGS_WARNINGS_ARE_ERRORS
710280405SrpauloBUILD_CC_DISABLE_WARNING_PREFIX
711280405SrpauloDISABLE_WARNING_PREFIX
712280405SrpauloWARNINGS_AS_ERRORS
713280405SrpauloCOMPILER_SUPPORTS_TARGET_BITS_FLAG
714280405SrpauloLDFLAGS_TESTEXE
715280405SrpauloLDFLAGS_TESTLIB
716280405SrpauloCXXFLAGS_TESTEXE
717280405SrpauloCXXFLAGS_TESTLIB
718280405SrpauloCFLAGS_TESTEXE
719280405SrpauloCFLAGS_TESTLIB
720280405SrpauloOPENJDK_BUILD_JVM_LIBS
721280405SrpauloOPENJDK_BUILD_JVM_ASFLAGS
722280405SrpauloOPENJDK_BUILD_JVM_LDFLAGS
723280405SrpauloOPENJDK_BUILD_JVM_CFLAGS
724280405SrpauloOPENJDK_BUILD_LDFLAGS_HASH_STYLE
725280405SrpauloOPENJDK_BUILD_LDFLAGS_CXX_JDK
726280405SrpauloOPENJDK_BUILD_JDKEXE_LIBS
727280405SrpauloOPENJDK_BUILD_JDKLIB_LIBS
728280405SrpauloOPENJDK_BUILD_LDFLAGS_JDKEXE
729280405SrpauloOPENJDK_BUILD_LDFLAGS_JDKLIB
730280405SrpauloOPENJDK_BUILD_CXXFLAGS_JDKEXE
731280405SrpauloOPENJDK_BUILD_CXXFLAGS_JDKLIB
732280405SrpauloOPENJDK_BUILD_CFLAGS_JDKEXE
733280405SrpauloOPENJDK_BUILD_CFLAGS_JDKLIB
734280405SrpauloOPENJDK_BUILD_CXXSTD_CXXFLAG
735280405SrpauloJVM_LIBS
736280405SrpauloJVM_ASFLAGS
737280405SrpauloJVM_LDFLAGS
738280405SrpauloJVM_CFLAGS
739280405SrpauloLDFLAGS_HASH_STYLE
740280405SrpauloLDFLAGS_CXX_JDK
741280405SrpauloJDKEXE_LIBS
742280405SrpauloJDKLIB_LIBS
743280405SrpauloLDFLAGS_JDKEXE
744280405SrpauloLDFLAGS_JDKLIB
745280405SrpauloCXXFLAGS_JDKEXE
746280405SrpauloCXXFLAGS_JDKLIB
747280405SrpauloCFLAGS_JDKEXE
748280405SrpauloCFLAGS_JDKLIB
749280405SrpauloMACOSX_VERSION_MIN
750280405SrpauloCXXSTD_CXXFLAG
751280405SrpauloJDK_ARCH_ABI_PROP_NAME
752280405SrpauloCXX_O_FLAG_SIZE
753280405SrpauloCXX_O_FLAG_NONE
754280405SrpauloCXX_O_FLAG_DEBUG
755280405SrpauloCXX_O_FLAG_NORM
756280405SrpauloCXX_O_FLAG_HI
757280405SrpauloCXX_O_FLAG_HIGHEST
758280405SrpauloCXX_O_FLAG_HIGHEST_JVM
759280405SrpauloC_O_FLAG_SIZE
760280405SrpauloC_O_FLAG_NONE
761280405SrpauloC_O_FLAG_DEBUG
762280405SrpauloC_O_FLAG_NORM
763280405SrpauloC_O_FLAG_HI
764280405SrpauloC_O_FLAG_HIGHEST
765280405SrpauloC_O_FLAG_HIGHEST_JVM
766280405SrpauloJVM_CFLAGS_SYMBOLS
767280405SrpauloCXXFLAGS_DEBUG_SYMBOLS
768280405SrpauloCFLAGS_DEBUG_SYMBOLS
769280405SrpauloCXX_FLAG_DEPS
770280405SrpauloC_FLAG_DEPS
771280405SrpauloSHARED_LIBRARY_FLAGS
772326344SimpSET_SHARED_LIBRARY_MAPFILE
773280405SrpauloSET_SHARED_LIBRARY_NAME
774280405SrpauloSET_SHARED_LIBRARY_ORIGIN
775280405SrpauloSET_EXECUTABLE_ORIGIN
776280405SrpauloCXX_FLAG_REORDER
777280405SrpauloC_FLAG_REORDER
778280405SrpauloJVM_RCFLAGS
779280405SrpauloRC_FLAGS
780280405SrpauloAR_OUT_OPTION
781280405SrpauloLD_OUT_OPTION
782280405SrpauloEXE_OUT_OPTION
783280405SrpauloCC_OUT_OPTION
784280405SrpauloSTRIPFLAGS
785280405SrpauloARFLAGS
786280405SrpauloCOMPILER_BINDCMD_FILE_FLAG
787280405SrpauloCOMPILER_COMMAND_FILE_FLAG
788280405SrpauloCOMPILER_TARGET_BITS_FLAG
789280405SrpauloJIB_JAR
790280405SrpauloJT_HOME
791280405SrpauloJTREGEXE
792280405SrpauloHOTSPOT_TOOLCHAIN_TYPE
793280405SrpauloUSING_BROKEN_SUSE_LD
794280405SrpauloPACKAGE_PATH
795280405SrpauloBUILD_AS
796280405SrpauloBUILD_LDCXX
797280405SrpauloBUILD_LD
798280405SrpauloBUILD_STRIP
799280405SrpauloBUILD_OBJCOPY
800280405SrpauloBUILD_AR
801280405SrpauloBUILD_NM
802280405SrpauloBUILD_CXX
803BUILD_CC
804BUILD_SYSROOT_LDFLAGS
805BUILD_SYSROOT_CFLAGS
806ac_ct_OBJDUMP
807OBJDUMP
808ac_ct_OBJCOPY
809OBJCOPY
810ac_ct_NM
811ac_ct_STRIP
812GNM
813NM
814STRIP
815MSBUILD
816DUMPBIN
817RC
818MT
819LIPO
820ac_ct_AR
821AR
822AS
823LDCXX
824LD
825CXXCPP
826CPP
827CXX_VERSION_NUMBER
828CC_VERSION_NUMBER
829ac_ct_CXX
830CXXFLAGS
831CXX
832TOOLCHAIN_PATH_CXX
833POTENTIAL_CXX
834OBJEXT
835EXEEXT
836ac_ct_CC
837CPPFLAGS
838LDFLAGS
839CFLAGS
840CC
841TOOLCHAIN_PATH_CC
842POTENTIAL_CC
843TOOLCHAIN_VERSION
844VS_LIB
845VS_INCLUDE
846VS_PATH
847CYGWIN_LINK
848SYSROOT_LDFLAGS
849SYSROOT_CFLAGS
850EXTRA_LDFLAGS
851EXTRA_CXXFLAGS
852EXTRA_CFLAGS
853EXE_SUFFIX
854OBJ_SUFFIX
855STATIC_LIBRARY
856SHARED_LIBRARY
857STATIC_LIBRARY_SUFFIX
858SHARED_LIBRARY_SUFFIX
859LIBRARY_PREFIX
860TOOLCHAIN_TYPE
861STATIC_BUILD
862IMPORT_MODULES_MAKE
863IMPORT_MODULES_SRC
864IMPORT_MODULES_MAN
865IMPORT_MODULES_LEGAL
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883JAVAC_FLAGS
884BOOT_JDK_MODULAR
885BOOT_JDK_SOURCETARGET
886JARSIGNER
887JAR
888JAVAH
889JAVAC
890JAVA
891BOOT_JDK
892JAVA_CHECK
893JAVAC_CHECK
894VERSION_IS_GA
895VERSION_SHORT
896VERSION_STRING
897VERSION_NUMBER_FOUR_POSITIONS
898VERSION_NUMBER
899VERSION_OPT
900VERSION_BUILD
901VERSION_PRE
902VERSION_PATCH
903VERSION_SECURITY
904VERSION_MINOR
905VERSION_MAJOR
906MACOSX_BUNDLE_ID_BASE
907MACOSX_BUNDLE_NAME_BASE
908HOTSPOT_VM_DISTRO
909COMPANY_NAME
910JDK_RC_PLATFORM_NAME
911PRODUCT_SUFFIX
912PRODUCT_NAME
913LAUNCHER_NAME
914JLINK_KEEP_PACKAGED_MODULES
915COPYRIGHT_YEAR
916COMPRESS_JARS
917INCLUDE_SA
918UNLIMITED_CRYPTO
919CACERTS_FILE
920ENABLE_HEADLESS_ONLY
921DEFAULT_MAKE_TARGET
922OS_VERSION_MICRO
923OS_VERSION_MINOR
924OS_VERSION_MAJOR
925PKG_CONFIG
926BASH_ARGS
927SETFILE
928CODESIGN
929XATTR
930DSYMUTIL
931IS_GNU_TIME
932PATCH
933DTRACE
934TIME
935STAT
936HG
937READELF
938OTOOL
939LDD
940ZIPEXE
941UNZIP
942TAR_SUPPORTS_TRANSFORM
943TAR_INCLUDE_PARAM
944TAR_CREATE_EXTRA_PARAM
945TAR_TYPE
946FIND_DELETE
947OUTPUT_SYNC
948OUTPUT_SYNC_SUPPORTED
949CHECK_TOOLSDIR_MAKE
950CHECK_TOOLSDIR_GMAKE
951CHECK_MAKE
952CHECK_GMAKE
953MAKE
954PKGHANDLER
955CONFIGURESUPPORT_OUTPUTDIR
956OUTPUT_ROOT
957CONF_NAME
958SPEC
959SDKROOT
960XCODEBUILD
961JVM_VARIANT_MAIN
962VALID_JVM_VARIANTS
963JVM_VARIANTS
964DEBUG_LEVEL
965HOTSPOT_DEBUG_LEVEL
966JDK_VARIANT
967USERNAME
968CANONICAL_TOPDIR
969ORIGINAL_TOPDIR
970TOPDIR
971PATH_SEP
972HOTSPOT_BUILD_CPU_DEFINE
973HOTSPOT_BUILD_CPU_ARCH
974HOTSPOT_BUILD_CPU
975HOTSPOT_BUILD_OS_TYPE
976HOTSPOT_BUILD_OS
977OPENJDK_BUILD_BUNDLE_PLATFORM
978OPENJDK_BUILD_OS_EXPORT_DIR
979OPENJDK_BUILD_CPU_OSARCH
980OPENJDK_BUILD_CPU_ISADIR
981OPENJDK_BUILD_CPU_LEGACY_LIB
982OPENJDK_BUILD_CPU_LEGACY
983HOTSPOT_TARGET_CPU_DEFINE
984HOTSPOT_TARGET_CPU_ARCH
985HOTSPOT_TARGET_CPU
986HOTSPOT_TARGET_OS_TYPE
987HOTSPOT_TARGET_OS
988DEFINE_CROSS_COMPILE_ARCH
989OPENJDK_TARGET_BUNDLE_PLATFORM
990OPENJDK_TARGET_OS_EXPORT_DIR
991OPENJDK_TARGET_CPU_OSARCH
992OPENJDK_TARGET_CPU_ISADIR
993OPENJDK_TARGET_CPU_LEGACY_LIB
994OPENJDK_TARGET_CPU_LEGACY
995REQUIRED_OS_VERSION
996REQUIRED_OS_NAME
997COMPILE_TYPE
998OPENJDK_TARGET_CPU_ENDIAN
999OPENJDK_TARGET_CPU_BITS
1000OPENJDK_TARGET_CPU_ARCH
1001OPENJDK_TARGET_CPU
1002OPENJDK_TARGET_OS_ENV
1003OPENJDK_TARGET_OS_TYPE
1004OPENJDK_TARGET_OS
1005OPENJDK_BUILD_CPU_ENDIAN
1006OPENJDK_BUILD_CPU_BITS
1007OPENJDK_BUILD_CPU_ARCH
1008OPENJDK_BUILD_CPU
1009OPENJDK_BUILD_OS_ENV
1010OPENJDK_BUILD_OS_TYPE
1011OPENJDK_BUILD_OS
1012OPENJDK_BUILD_AUTOCONF_NAME
1013OPENJDK_TARGET_AUTOCONF_NAME
1014target_os
1015target_vendor
1016target_cpu
1017target
1018host_os
1019host_vendor
1020host_cpu
1021host
1022build_os
1023build_vendor
1024build_cpu
1025build
1026NICE
1027CPIO
1028DF
1029READLINK
1030CYGPATH
1031SED
1032FGREP
1033EGREP
1034GREP
1035AWK
1036XARGS
1037WHICH
1038WC
1039UNIQ
1040UNAME
1041TR
1042TOUCH
1043TEE
1044TAR
1045TAIL
1046SORT
1047SH
1048RMDIR
1049RM
1050PRINTF
1051NAWK
1052MV
1053MKTEMP
1054MKDIR
1055LS
1056LN
1057GZIP
1058GUNZIP
1059HEAD
1060FIND
1061FILE
1062EXPR
1063ECHO
1064DIRNAME
1065DIFF
1066DATE
1067CUT
1068CP
1069COMM
1070CMP
1071CHMOD
1072CAT
1073BASH
1074BASENAME
1075DATE_WHEN_CONFIGURED
1076ORIGINAL_PATH
1077CONFIGURE_COMMAND_LINE
1078target_alias
1079host_alias
1080build_alias
1081LIBS
1082ECHO_T
1083ECHO_N
1084ECHO_C
1085DEFS
1086mandir
1087localedir
1088libdir
1089psdir
1090pdfdir
1091dvidir
1092htmldir
1093infodir
1094docdir
1095oldincludedir
1096includedir
1097localstatedir
1098sharedstatedir
1099sysconfdir
1100datadir
1101datarootdir
1102libexecdir
1103sbindir
1104bindir
1105program_transform_name
1106prefix
1107exec_prefix
1108PACKAGE_URL
1109PACKAGE_BUGREPORT
1110PACKAGE_STRING
1111PACKAGE_VERSION
1112PACKAGE_TARNAME
1113PACKAGE_NAME
1114PATH_SEPARATOR
1115SHELL'
1116ac_subst_files=''
1117ac_user_opts='
1118enable_option_checking
1119with_target_bits
1120enable_openjdk_only
1121with_custom_make_dir
1122with_jdk_variant
1123enable_debug
1124with_debug_level
1125with_jvm_variants
1126with_cpu_port
1127with_devkit
1128with_sys_root
1129with_sysroot
1130with_tools_dir
1131with_toolchain_path
1132with_extra_path
1133with_sdk_name
1134with_conf_name
1135with_output_sync
1136with_default_make_target
1137enable_headless_only
1138with_cacerts_file
1139enable_unlimited_crypto
1140with_copyright_year
1141enable_keep_packaged_modules
1142with_milestone
1143with_update_version
1144with_user_release_suffix
1145with_build_number
1146with_version_string
1147with_version_pre
1148with_version_opt
1149with_version_build
1150with_version_major
1151with_version_minor
1152with_version_security
1153with_version_patch
1154with_boot_jdk
1155with_build_jdk
1156with_add_source_root
1157with_override_source_root
1158with_adds_and_overrides
1159with_override_langtools
1160with_override_corba
1161with_override_jaxp
1162with_override_jaxws
1163with_override_hotspot
1164with_override_nashorn
1165with_override_jdk
1166with_import_hotspot
1167with_import_modules
1168enable_static_build
1169with_toolchain_type
1170with_extra_cflags
1171with_extra_cxxflags
1172with_extra_ldflags
1173with_toolchain_version
1174with_build_devkit
1175with_jtreg
1176with_jib
1177with_abi_profile
1178enable_warnings_as_errors
1179with_native_debug_symbols
1180enable_debug_symbols
1181enable_zip_debug_info
1182enable_native_coverage
1183enable_dtrace
1184enable_aot
1185enable_hotspot_gtest
1186with_stdc__lib
1187with_msvcr_dll
1188with_msvcp_dll
1189with_x
1190with_cups
1191with_cups_include
1192with_freetype
1193with_freetype_include
1194with_freetype_lib
1195with_freetype_src
1196enable_freetype_bundling
1197with_alsa
1198with_alsa_include
1199with_alsa_lib
1200with_libffi
1201with_libffi_include
1202with_libffi_lib
1203enable_libffi_bundling
1204with_libjpeg
1205with_giflib
1206with_libpng
1207with_zlib
1208with_lcms
1209with_dxsdk
1210with_dxsdk_lib
1211with_dxsdk_include
1212with_jvm_features
1213with_jvm_interpreter
1214enable_jtreg_failure_handler
1215enable_generate_classlist
1216with_num_cores
1217with_memory_size
1218with_jobs
1219with_test_jobs
1220with_boot_jdk_jvmargs
1221with_sjavac_server_java
1222enable_sjavac
1223enable_javac_server
1224enable_icecc
1225enable_precompiled_headers
1226enable_ccache
1227with_ccache_dir
1228'
1229      ac_precious_vars='build_alias
1230host_alias
1231target_alias
1232BASENAME
1233BASH
1234CAT
1235CHMOD
1236CMP
1237COMM
1238CP
1239CUT
1240DATE
1241DIFF
1242DIRNAME
1243ECHO
1244EXPR
1245FILE
1246FIND
1247HEAD
1248GUNZIP
1249GZIP
1250LN
1251LS
1252MKDIR
1253MKTEMP
1254MV
1255NAWK
1256PRINTF
1257RM
1258RMDIR
1259SH
1260SORT
1261TAIL
1262TAR
1263TEE
1264TOUCH
1265TR
1266UNAME
1267UNIQ
1268WC
1269WHICH
1270XARGS
1271AWK
1272GREP
1273EGREP
1274FGREP
1275SED
1276CYGPATH
1277READLINK
1278DF
1279CPIO
1280NICE
1281MAKE
1282UNZIP
1283ZIPEXE
1284LDD
1285OTOOL
1286READELF
1287HG
1288STAT
1289TIME
1290DTRACE
1291PATCH
1292DSYMUTIL
1293XATTR
1294CODESIGN
1295SETFILE
1296PKG_CONFIG
1297JAVA
1298JAVAC
1299JAVAH
1300JAR
1301JARSIGNER
1302CC
1303CFLAGS
1304LDFLAGS
1305LIBS
1306CPPFLAGS
1307CXX
1308CXXFLAGS
1309CCC
1310CPP
1311CXXCPP
1312AS
1313AR
1314LIPO
1315STRIP
1316NM
1317GNM
1318OBJCOPY
1319OBJDUMP
1320BUILD_CC
1321BUILD_CXX
1322BUILD_NM
1323BUILD_AR
1324BUILD_OBJCOPY
1325BUILD_STRIP
1326JTREGEXE
1327XMKMF
1328FREETYPE_CFLAGS
1329FREETYPE_LIBS
1330ALSA_CFLAGS
1331ALSA_LIBS
1332LIBFFI_CFLAGS
1333LIBFFI_LIBS
1334PNG_CFLAGS
1335PNG_LIBS
1336LCMS_CFLAGS
1337LCMS_LIBS
1338ICECC_CMD
1339ICECC_CREATE_ENV
1340ICECC_WRAPPER
1341CCACHE'
1342
1343
1344# Initialize some variables set by options.
1345ac_init_help=
1346ac_init_version=false
1347ac_unrecognized_opts=
1348ac_unrecognized_sep=
1349# The variables have the same names as the options, with
1350# dashes changed to underlines.
1351cache_file=/dev/null
1352exec_prefix=NONE
1353no_create=
1354no_recursion=
1355prefix=NONE
1356program_prefix=NONE
1357program_suffix=NONE
1358program_transform_name=s,x,x,
1359silent=
1360site=
1361srcdir=
1362verbose=
1363x_includes=NONE
1364x_libraries=NONE
1365
1366# Installation directory options.
1367# These are left unexpanded so users can "make install exec_prefix=/foo"
1368# and all the variables that are supposed to be based on exec_prefix
1369# by default will actually change.
1370# Use braces instead of parens because sh, perl, etc. also accept them.
1371# (The list follows the same order as the GNU Coding Standards.)
1372bindir='${exec_prefix}/bin'
1373sbindir='${exec_prefix}/sbin'
1374libexecdir='${exec_prefix}/libexec'
1375datarootdir='${prefix}/share'
1376datadir='${datarootdir}'
1377sysconfdir='${prefix}/etc'
1378sharedstatedir='${prefix}/com'
1379localstatedir='${prefix}/var'
1380includedir='${prefix}/include'
1381oldincludedir='/usr/include'
1382docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1383infodir='${datarootdir}/info'
1384htmldir='${docdir}'
1385dvidir='${docdir}'
1386pdfdir='${docdir}'
1387psdir='${docdir}'
1388libdir='${exec_prefix}/lib'
1389localedir='${datarootdir}/locale'
1390mandir='${datarootdir}/man'
1391
1392ac_prev=
1393ac_dashdash=
1394for ac_option
1395do
1396  # If the previous option needs an argument, assign it.
1397  if test -n "$ac_prev"; then
1398    eval $ac_prev=\$ac_option
1399    ac_prev=
1400    continue
1401  fi
1402
1403  case $ac_option in
1404  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1405  *=)   ac_optarg= ;;
1406  *)    ac_optarg=yes ;;
1407  esac
1408
1409  # Accept the important Cygnus configure options, so we can diagnose typos.
1410
1411  case $ac_dashdash$ac_option in
1412  --)
1413    ac_dashdash=yes ;;
1414
1415  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1416    ac_prev=bindir ;;
1417  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1418    bindir=$ac_optarg ;;
1419
1420  -build | --build | --buil | --bui | --bu)
1421    ac_prev=build_alias ;;
1422  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1423    build_alias=$ac_optarg ;;
1424
1425  -cache-file | --cache-file | --cache-fil | --cache-fi \
1426  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1427    ac_prev=cache_file ;;
1428  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1429  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1430    cache_file=$ac_optarg ;;
1431
1432  --config-cache | -C)
1433    cache_file=config.cache ;;
1434
1435  -datadir | --datadir | --datadi | --datad)
1436    ac_prev=datadir ;;
1437  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1438    datadir=$ac_optarg ;;
1439
1440  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1441  | --dataroo | --dataro | --datar)
1442    ac_prev=datarootdir ;;
1443  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1444  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1445    datarootdir=$ac_optarg ;;
1446
1447  -disable-* | --disable-*)
1448    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1449    # Reject names that are not valid shell variable names.
1450    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1451      as_fn_error $? "invalid feature name: $ac_useropt"
1452    ac_useropt_orig=$ac_useropt
1453    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1454    case $ac_user_opts in
1455      *"
1456"enable_$ac_useropt"
1457"*) ;;
1458      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1459	 ac_unrecognized_sep=', ';;
1460    esac
1461    eval enable_$ac_useropt=no ;;
1462
1463  -docdir | --docdir | --docdi | --doc | --do)
1464    ac_prev=docdir ;;
1465  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1466    docdir=$ac_optarg ;;
1467
1468  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1469    ac_prev=dvidir ;;
1470  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1471    dvidir=$ac_optarg ;;
1472
1473  -enable-* | --enable-*)
1474    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1475    # Reject names that are not valid shell variable names.
1476    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1477      as_fn_error $? "invalid feature name: $ac_useropt"
1478    ac_useropt_orig=$ac_useropt
1479    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1480    case $ac_user_opts in
1481      *"
1482"enable_$ac_useropt"
1483"*) ;;
1484      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1485	 ac_unrecognized_sep=', ';;
1486    esac
1487    eval enable_$ac_useropt=\$ac_optarg ;;
1488
1489  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1490  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1491  | --exec | --exe | --ex)
1492    ac_prev=exec_prefix ;;
1493  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1494  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1495  | --exec=* | --exe=* | --ex=*)
1496    exec_prefix=$ac_optarg ;;
1497
1498  -gas | --gas | --ga | --g)
1499    # Obsolete; use --with-gas.
1500    with_gas=yes ;;
1501
1502  -help | --help | --hel | --he | -h)
1503    ac_init_help=long ;;
1504  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1505    ac_init_help=recursive ;;
1506  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1507    ac_init_help=short ;;
1508
1509  -host | --host | --hos | --ho)
1510    ac_prev=host_alias ;;
1511  -host=* | --host=* | --hos=* | --ho=*)
1512    host_alias=$ac_optarg ;;
1513
1514  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1515    ac_prev=htmldir ;;
1516  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1517  | --ht=*)
1518    htmldir=$ac_optarg ;;
1519
1520  -includedir | --includedir | --includedi | --included | --include \
1521  | --includ | --inclu | --incl | --inc)
1522    ac_prev=includedir ;;
1523  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1524  | --includ=* | --inclu=* | --incl=* | --inc=*)
1525    includedir=$ac_optarg ;;
1526
1527  -infodir | --infodir | --infodi | --infod | --info | --inf)
1528    ac_prev=infodir ;;
1529  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1530    infodir=$ac_optarg ;;
1531
1532  -libdir | --libdir | --libdi | --libd)
1533    ac_prev=libdir ;;
1534  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1535    libdir=$ac_optarg ;;
1536
1537  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1538  | --libexe | --libex | --libe)
1539    ac_prev=libexecdir ;;
1540  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1541  | --libexe=* | --libex=* | --libe=*)
1542    libexecdir=$ac_optarg ;;
1543
1544  -localedir | --localedir | --localedi | --localed | --locale)
1545    ac_prev=localedir ;;
1546  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1547    localedir=$ac_optarg ;;
1548
1549  -localstatedir | --localstatedir | --localstatedi | --localstated \
1550  | --localstate | --localstat | --localsta | --localst | --locals)
1551    ac_prev=localstatedir ;;
1552  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1553  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1554    localstatedir=$ac_optarg ;;
1555
1556  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1557    ac_prev=mandir ;;
1558  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1559    mandir=$ac_optarg ;;
1560
1561  -nfp | --nfp | --nf)
1562    # Obsolete; use --without-fp.
1563    with_fp=no ;;
1564
1565  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1566  | --no-cr | --no-c | -n)
1567    no_create=yes ;;
1568
1569  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1570  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1571    no_recursion=yes ;;
1572
1573  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1574  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1575  | --oldin | --oldi | --old | --ol | --o)
1576    ac_prev=oldincludedir ;;
1577  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1578  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1579  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1580    oldincludedir=$ac_optarg ;;
1581
1582  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1583    ac_prev=prefix ;;
1584  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1585    prefix=$ac_optarg ;;
1586
1587  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1588  | --program-pre | --program-pr | --program-p)
1589    ac_prev=program_prefix ;;
1590  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1591  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1592    program_prefix=$ac_optarg ;;
1593
1594  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1595  | --program-suf | --program-su | --program-s)
1596    ac_prev=program_suffix ;;
1597  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1598  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1599    program_suffix=$ac_optarg ;;
1600
1601  -program-transform-name | --program-transform-name \
1602  | --program-transform-nam | --program-transform-na \
1603  | --program-transform-n | --program-transform- \
1604  | --program-transform | --program-transfor \
1605  | --program-transfo | --program-transf \
1606  | --program-trans | --program-tran \
1607  | --progr-tra | --program-tr | --program-t)
1608    ac_prev=program_transform_name ;;
1609  -program-transform-name=* | --program-transform-name=* \
1610  | --program-transform-nam=* | --program-transform-na=* \
1611  | --program-transform-n=* | --program-transform-=* \
1612  | --program-transform=* | --program-transfor=* \
1613  | --program-transfo=* | --program-transf=* \
1614  | --program-trans=* | --program-tran=* \
1615  | --progr-tra=* | --program-tr=* | --program-t=*)
1616    program_transform_name=$ac_optarg ;;
1617
1618  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1619    ac_prev=pdfdir ;;
1620  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1621    pdfdir=$ac_optarg ;;
1622
1623  -psdir | --psdir | --psdi | --psd | --ps)
1624    ac_prev=psdir ;;
1625  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1626    psdir=$ac_optarg ;;
1627
1628  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1629  | -silent | --silent | --silen | --sile | --sil)
1630    silent=yes ;;
1631
1632  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1633    ac_prev=sbindir ;;
1634  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1635  | --sbi=* | --sb=*)
1636    sbindir=$ac_optarg ;;
1637
1638  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1639  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1640  | --sharedst | --shareds | --shared | --share | --shar \
1641  | --sha | --sh)
1642    ac_prev=sharedstatedir ;;
1643  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1644  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1645  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1646  | --sha=* | --sh=*)
1647    sharedstatedir=$ac_optarg ;;
1648
1649  -site | --site | --sit)
1650    ac_prev=site ;;
1651  -site=* | --site=* | --sit=*)
1652    site=$ac_optarg ;;
1653
1654  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1655    ac_prev=srcdir ;;
1656  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1657    srcdir=$ac_optarg ;;
1658
1659  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1660  | --syscon | --sysco | --sysc | --sys | --sy)
1661    ac_prev=sysconfdir ;;
1662  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1663  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1664    sysconfdir=$ac_optarg ;;
1665
1666  -target | --target | --targe | --targ | --tar | --ta | --t)
1667    ac_prev=target_alias ;;
1668  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1669    target_alias=$ac_optarg ;;
1670
1671  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1672    verbose=yes ;;
1673
1674  -version | --version | --versio | --versi | --vers | -V)
1675    ac_init_version=: ;;
1676
1677  -with-* | --with-*)
1678    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1679    # Reject names that are not valid shell variable names.
1680    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1681      as_fn_error $? "invalid package name: $ac_useropt"
1682    ac_useropt_orig=$ac_useropt
1683    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1684    case $ac_user_opts in
1685      *"
1686"with_$ac_useropt"
1687"*) ;;
1688      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1689	 ac_unrecognized_sep=', ';;
1690    esac
1691    eval with_$ac_useropt=\$ac_optarg ;;
1692
1693  -without-* | --without-*)
1694    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1695    # Reject names that are not valid shell variable names.
1696    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1697      as_fn_error $? "invalid package name: $ac_useropt"
1698    ac_useropt_orig=$ac_useropt
1699    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1700    case $ac_user_opts in
1701      *"
1702"with_$ac_useropt"
1703"*) ;;
1704      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1705	 ac_unrecognized_sep=', ';;
1706    esac
1707    eval with_$ac_useropt=no ;;
1708
1709  --x)
1710    # Obsolete; use --with-x.
1711    with_x=yes ;;
1712
1713  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1714  | --x-incl | --x-inc | --x-in | --x-i)
1715    ac_prev=x_includes ;;
1716  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1717  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1718    x_includes=$ac_optarg ;;
1719
1720  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1721  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1722    ac_prev=x_libraries ;;
1723  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1724  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1725    x_libraries=$ac_optarg ;;
1726
1727  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1728Try \`$0 --help' for more information"
1729    ;;
1730
1731  *=*)
1732    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1733    # Reject names that are not valid shell variable names.
1734    case $ac_envvar in #(
1735      '' | [0-9]* | *[!_$as_cr_alnum]* )
1736      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1737    esac
1738    eval $ac_envvar=\$ac_optarg
1739    export $ac_envvar ;;
1740
1741  *)
1742    # FIXME: should be removed in autoconf 3.0.
1743    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1744    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1745      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1746    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1747    ;;
1748
1749  esac
1750done
1751
1752if test -n "$ac_prev"; then
1753  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1754  as_fn_error $? "missing argument to $ac_option"
1755fi
1756
1757if test -n "$ac_unrecognized_opts"; then
1758  case $enable_option_checking in
1759    no) ;;
1760    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1761    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1762  esac
1763fi
1764
1765# Check all directory arguments for consistency.
1766for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1767		datadir sysconfdir sharedstatedir localstatedir includedir \
1768		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1769		libdir localedir mandir
1770do
1771  eval ac_val=\$$ac_var
1772  # Remove trailing slashes.
1773  case $ac_val in
1774    */ )
1775      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1776      eval $ac_var=\$ac_val;;
1777  esac
1778  # Be sure to have absolute directory names.
1779  case $ac_val in
1780    [\\/$]* | ?:[\\/]* )  continue;;
1781    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1782  esac
1783  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1784done
1785
1786# There might be people who depend on the old broken behavior: `$host'
1787# used to hold the argument of --host etc.
1788# FIXME: To remove some day.
1789build=$build_alias
1790host=$host_alias
1791target=$target_alias
1792
1793# FIXME: To remove some day.
1794if test "x$host_alias" != x; then
1795  if test "x$build_alias" = x; then
1796    cross_compiling=maybe
1797  elif test "x$build_alias" != "x$host_alias"; then
1798    cross_compiling=yes
1799  fi
1800fi
1801
1802ac_tool_prefix=
1803test -n "$host_alias" && ac_tool_prefix=$host_alias-
1804
1805test "$silent" = yes && exec 6>/dev/null
1806
1807
1808ac_pwd=`pwd` && test -n "$ac_pwd" &&
1809ac_ls_di=`ls -di .` &&
1810ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1811  as_fn_error $? "working directory cannot be determined"
1812test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1813  as_fn_error $? "pwd does not report name of working directory"
1814
1815
1816# Find the source files, if location was not specified.
1817if test -z "$srcdir"; then
1818  ac_srcdir_defaulted=yes
1819  # Try the directory containing this script, then the parent directory.
1820  ac_confdir=`$as_dirname -- "$as_myself" ||
1821$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1822	 X"$as_myself" : 'X\(//\)[^/]' \| \
1823	 X"$as_myself" : 'X\(//\)$' \| \
1824	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1825$as_echo X"$as_myself" |
1826    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1827	    s//\1/
1828	    q
1829	  }
1830	  /^X\(\/\/\)[^/].*/{
1831	    s//\1/
1832	    q
1833	  }
1834	  /^X\(\/\/\)$/{
1835	    s//\1/
1836	    q
1837	  }
1838	  /^X\(\/\).*/{
1839	    s//\1/
1840	    q
1841	  }
1842	  s/.*/./; q'`
1843  srcdir=$ac_confdir
1844  if test ! -r "$srcdir/$ac_unique_file"; then
1845    srcdir=..
1846  fi
1847else
1848  ac_srcdir_defaulted=no
1849fi
1850if test ! -r "$srcdir/$ac_unique_file"; then
1851  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1852  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1853fi
1854ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1855ac_abs_confdir=`(
1856	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1857	pwd)`
1858# When building in place, set srcdir=.
1859if test "$ac_abs_confdir" = "$ac_pwd"; then
1860  srcdir=.
1861fi
1862# Remove unnecessary trailing slashes from srcdir.
1863# Double slashes in file names in object file debugging info
1864# mess up M-x gdb in Emacs.
1865case $srcdir in
1866*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1867esac
1868for ac_var in $ac_precious_vars; do
1869  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1870  eval ac_env_${ac_var}_value=\$${ac_var}
1871  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1872  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1873done
1874
1875#
1876# Report the --help message.
1877#
1878if test "$ac_init_help" = "long"; then
1879  # Omit some internal or obsolete options to make the list less imposing.
1880  # This message is too long to be a string in the A/UX 3.1 sh.
1881  cat <<_ACEOF
1882\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1883
1884Usage: $0 [OPTION]... [VAR=VALUE]...
1885
1886To assign environment variables (e.g., CC, CFLAGS...), specify them as
1887VAR=VALUE.  See below for descriptions of some of the useful variables.
1888
1889Defaults for the options are specified in brackets.
1890
1891Configuration:
1892  -h, --help              display this help and exit
1893      --help=short        display options specific to this package
1894      --help=recursive    display the short help of all the included packages
1895  -V, --version           display version information and exit
1896  -q, --quiet, --silent   do not print \`checking ...' messages
1897      --cache-file=FILE   cache test results in FILE [disabled]
1898  -C, --config-cache      alias for \`--cache-file=config.cache'
1899  -n, --no-create         do not create output files
1900      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1901
1902Installation directories:
1903  --prefix=PREFIX         install architecture-independent files in PREFIX
1904                          [$ac_default_prefix]
1905  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1906                          [PREFIX]
1907
1908By default, \`make install' will install all the files in
1909\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1910an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1911for instance \`--prefix=\$HOME'.
1912
1913For better control, use the options below.
1914
1915Fine tuning of the installation directories:
1916  --bindir=DIR            user executables [EPREFIX/bin]
1917  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1918  --libexecdir=DIR        program executables [EPREFIX/libexec]
1919  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1920  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1921  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1922  --libdir=DIR            object code libraries [EPREFIX/lib]
1923  --includedir=DIR        C header files [PREFIX/include]
1924  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1925  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1926  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1927  --infodir=DIR           info documentation [DATAROOTDIR/info]
1928  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1929  --mandir=DIR            man documentation [DATAROOTDIR/man]
1930  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1931  --htmldir=DIR           html documentation [DOCDIR]
1932  --dvidir=DIR            dvi documentation [DOCDIR]
1933  --pdfdir=DIR            pdf documentation [DOCDIR]
1934  --psdir=DIR             ps documentation [DOCDIR]
1935_ACEOF
1936
1937  cat <<\_ACEOF
1938
1939X features:
1940  --x-includes=DIR    X include files are in DIR
1941  --x-libraries=DIR   X library files are in DIR
1942
1943System types:
1944  --build=BUILD     configure for building on BUILD [guessed]
1945  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1946  --target=TARGET   configure for building compilers for TARGET [HOST]
1947_ACEOF
1948fi
1949
1950if test -n "$ac_init_help"; then
1951  case $ac_init_help in
1952     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1953   esac
1954  cat <<\_ACEOF
1955
1956Optional Features:
1957  --disable-option-checking  ignore unrecognized --enable/--with options
1958  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1959  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1960  --enable-openjdk-only   suppress building custom source even if present
1961                          [disabled]
1962  --enable-debug          set the debug level to fastdebug (shorthand for
1963                          --with-debug-level=fastdebug) [disabled]
1964  --enable-headless-only  only build headless (no GUI) support [disabled]
1965  --disable-unlimited-crypto
1966                          Disable unlimited crypto policy [enabled]
1967  --disable-keep-packaged-modules
1968                          Do not keep packaged modules in jdk image [enable]
1969  --enable-static-build   enable static library build [disabled]
1970  --disable-warnings-as-errors
1971                          do not consider native warnings to be an error
1972                          [enabled]
1973  --enable-debug-symbols  Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --enable-zip-debug-info Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --enable-native-coverage
1978                          enable native compilation with code coverage
1979                          data[disabled]
1980  --enable-dtrace[=yes/no/auto]
1981                          enable dtrace. Default is auto, where dtrace is
1982                          enabled if all dependencies are present.
1983  --enable-aot[=yes/no/auto]
1984                          enable ahead of time compilation feature. Default is
1985                          auto, where aot is enabled if all dependencies are
1986                          present.
1987  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1988  --disable-freetype-bundling
1989                          disable bundling of the freetype library with the
1990                          build result [enabled on Windows or when using
1991                          --with-freetype, disabled otherwise]
1992  --enable-libffi-bundling
1993                          enable bundling of libffi.so to make the built JDK
1994                          runnable on more systems
1995  --enable-jtreg-failure-handler
1996                          forces build of the jtreg failure handler to be
1997                          enabled, missing dependencies become fatal errors.
1998                          Default is auto, where the failure handler is built
1999                          if all dependencies are present and otherwise just
2000                          disabled.
2001  --disable-generate-classlist
2002                          forces enabling or disabling of the generation of a
2003                          CDS classlist at build time. Default is to generate
2004                          it when either the server or client JVMs are built.
2005  --enable-sjavac         use sjavac to do fast incremental compiles
2006                          [disabled]
2007  --disable-javac-server  disable javac server [enabled]
2008  --enable-icecc          enable distribted compilation of native code using
2009                          icecc/icecream [disabled]
2010  --disable-precompiled-headers
2011                          disable using precompiled headers when compiling C++
2012                          [enabled]
2013  --enable-ccache         enable using ccache to speed up recompilations
2014                          [disabled]
2015
2016Optional Packages:
2017  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2018  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2019  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2020                          support it), e.g. --with-target-bits=32 [guessed]
2021  --with-custom-make-dir  Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-jdk-variant      JDK variant to build (normal) [normal]
2024  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2025                          optimized) [release]
2026  --with-jvm-variants     JVM variants (separated by commas) to build
2027                          (server,client,minimal,core,zero,zeroshark,custom)
2028                          [server]
2029  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2030                          (arm64,aarch64) [aarch64]
2031  --with-devkit           use this devkit for compilers, tools and resources
2032  --with-sys-root         alias for --with-sysroot for backwards compatability
2033  --with-sysroot          use this directory as sysroot
2034  --with-tools-dir        alias for --with-toolchain-path for backwards
2035                          compatibility
2036  --with-toolchain-path   prepend these directories when searching for
2037                          toolchain binaries (compilers etc)
2038  --with-extra-path       prepend these directories to the default path
2039  --with-sdk-name         use the platform SDK of the given name. [macosx]
2040  --with-conf-name        use this as the name of the configuration [generated
2041                          from important configuration options]
2042  --with-output-sync      set make output sync type if supported by make.
2043                          [recurse]
2044  --with-default-make-target
2045                          set the default make target [exploded-image]
2046  --with-cacerts-file     specify alternative cacerts file
2047  --with-copyright-year   Set copyright year value for build [current year]
2048  --with-milestone        Deprecated. Option is kept for backwards
2049                          compatibility and is ignored
2050  --with-update-version   Deprecated. Option is kept for backwards
2051                          compatibility and is ignored
2052  --with-user-release-suffix
2053                          Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-build-number     Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-version-string   Set version string [calculated]
2058  --with-version-pre      Set the base part of the version 'PRE' field
2059                          (pre-release identifier) ['internal']
2060  --with-version-opt      Set version 'OPT' field (build metadata)
2061                          [<timestamp>.<user>.<dirname>]
2062  --with-version-build    Set version 'BUILD' field (build number) [not
2063                          specified]
2064  --with-version-major    Set version 'MAJOR' field (first number) [current
2065                          source value]
2066  --with-version-minor    Set version 'MINOR' field (second number) [current
2067                          source value]
2068  --with-version-security Set version 'SECURITY' field (third number) [current
2069                          source value]
2070  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2071                          specified]
2072  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2073  --with-build-jdk        path to JDK of same version as is being built[the
2074                          newly built JDK]
2075  --with-add-source-root  Deprecated. Option is kept for backwards
2076                          compatibility and is ignored
2077  --with-override-source-root
2078                          Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-adds-and-overrides
2081                          Deprecated. Option is kept for backwards
2082                          compatibility and is ignored
2083  --with-override-langtools
2084                          Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-corba   Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-jaxp    Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-jaxws   Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-hotspot Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-nashorn Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-jdk     Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-import_hotspot   Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-import-modules   import a set of prebuilt modules either as a zip
2101                          file or an exploded directory
2102  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2103                          to show possible values [platform dependent]
2104  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2105  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2106  --with-extra-ldflags    extra flags to be used when linking jdk
2107  --with-toolchain-version
2108                          the version of the toolchain to look for, use
2109                          '--help' to show possible values [platform
2110                          dependent]
2111  --with-build-devkit     Devkit to use for the build platform toolchain
2112  --with-jtreg            Regression Test Harness [probed]
2113  --with-jib              Jib dependency management tool [not used]
2114  --with-abi-profile      specify ABI profile for ARM builds
2115                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2116                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2117                          [toolchain dependent]
2118  --with-native-debug-symbols
2119                          set the native debug symbol configuration (none,
2120                          internal, external, zipped) [varying]
2121  --with-stdc++lib=<static>,<dynamic>,<default>
2122                          force linking of the C++ runtime on Linux to either
2123                          static or dynamic, default is static with dynamic as
2124                          fallback
2125  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2126                          (Windows only) [probed]
2127  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2128                          (Windows only) [probed]
2129  --with-x                use the X Window System
2130  --with-cups             specify prefix directory for the cups package
2131                          (expecting the headers under PATH/include)
2132  --with-cups-include     specify directory for the cups include files
2133  --with-freetype         specify prefix directory for the freetype package
2134                          (expecting the libraries under PATH/lib and the
2135                          headers under PATH/include)
2136  --with-freetype-include specify directory for the freetype include files
2137  --with-freetype-lib     specify directory for the freetype library
2138  --with-freetype-src     specify directory with freetype sources to
2139                          automatically build the library (experimental,
2140                          Windows-only)
2141  --with-alsa             specify prefix directory for the alsa package
2142                          (expecting the libraries under PATH/lib and the
2143                          headers under PATH/include)
2144  --with-alsa-include     specify directory for the alsa include files
2145  --with-alsa-lib         specify directory for the alsa library
2146  --with-libffi           specify prefix directory for the libffi package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-libffi-include   specify directory for the libffi include files
2150  --with-libffi-lib       specify directory for the libffi library
2151  --with-libjpeg          use libjpeg from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-giflib           use giflib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-libpng           use libpng from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-zlib             use zlib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-lcms             use lcms2 from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-dxsdk            Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-dxsdk-include    Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-jvm-features     additional JVM features to enable (separated by
2168                          comma), use '--help' to show possible values [none]
2169  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2170                          compatibility and is ignored
2171  --with-num-cores        number of cores in the build system, e.g.
2172                          --with-num-cores=8 [probed]
2173  --with-memory-size      memory (in MB) available in the build system, e.g.
2174                          --with-memory-size=1024 [probed]
2175  --with-jobs             number of parallel jobs to let make run [calculated
2176                          based on cores and memory]
2177  --with-test-jobs        number of parallel tests jobs to run [based on build
2178                          jobs]
2179  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2180                          invocations of boot JDK, overriding the default
2181                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2182                          -enableassertions"
2183  --with-sjavac-server-java
2184                          use this java binary for running the sjavac
2185                          background server [Boot JDK java]
2186  --with-ccache-dir       where to store ccache files [~/.ccache]
2187
2188Some influential environment variables:
2189  BASENAME    Override default value for BASENAME
2190  BASH        Override default value for BASH
2191  CAT         Override default value for CAT
2192  CHMOD       Override default value for CHMOD
2193  CMP         Override default value for CMP
2194  COMM        Override default value for COMM
2195  CP          Override default value for CP
2196  CUT         Override default value for CUT
2197  DATE        Override default value for DATE
2198  DIFF        Override default value for DIFF
2199  DIRNAME     Override default value for DIRNAME
2200  ECHO        Override default value for ECHO
2201  EXPR        Override default value for EXPR
2202  FILE        Override default value for FILE
2203  FIND        Override default value for FIND
2204  HEAD        Override default value for HEAD
2205  GUNZIP      Override default value for GUNZIP
2206  GZIP        Override default value for GZIP
2207  LN          Override default value for LN
2208  LS          Override default value for LS
2209  MKDIR       Override default value for MKDIR
2210  MKTEMP      Override default value for MKTEMP
2211  MV          Override default value for MV
2212  NAWK        Override default value for NAWK
2213  PRINTF      Override default value for PRINTF
2214  RM          Override default value for RM
2215  RMDIR       Override default value for RMDIR
2216  SH          Override default value for SH
2217  SORT        Override default value for SORT
2218  TAIL        Override default value for TAIL
2219  TAR         Override default value for TAR
2220  TEE         Override default value for TEE
2221  TOUCH       Override default value for TOUCH
2222  TR          Override default value for TR
2223  UNAME       Override default value for UNAME
2224  UNIQ        Override default value for UNIQ
2225  WC          Override default value for WC
2226  WHICH       Override default value for WHICH
2227  XARGS       Override default value for XARGS
2228  AWK         Override default value for AWK
2229  GREP        Override default value for GREP
2230  EGREP       Override default value for EGREP
2231  FGREP       Override default value for FGREP
2232  SED         Override default value for SED
2233  CYGPATH     Override default value for CYGPATH
2234  READLINK    Override default value for READLINK
2235  DF          Override default value for DF
2236  CPIO        Override default value for CPIO
2237  NICE        Override default value for NICE
2238  MAKE        Override default value for MAKE
2239  UNZIP       Override default value for UNZIP
2240  ZIPEXE      Override default value for ZIPEXE
2241  LDD         Override default value for LDD
2242  OTOOL       Override default value for OTOOL
2243  READELF     Override default value for READELF
2244  HG          Override default value for HG
2245  STAT        Override default value for STAT
2246  TIME        Override default value for TIME
2247  DTRACE      Override default value for DTRACE
2248  PATCH       Override default value for PATCH
2249  DSYMUTIL    Override default value for DSYMUTIL
2250  XATTR       Override default value for XATTR
2251  CODESIGN    Override default value for CODESIGN
2252  SETFILE     Override default value for SETFILE
2253  PKG_CONFIG  path to pkg-config utility
2254  JAVA        Override default value for JAVA
2255  JAVAC       Override default value for JAVAC
2256  JAVAH       Override default value for JAVAH
2257  JAR         Override default value for JAR
2258  JARSIGNER   Override default value for JARSIGNER
2259  CC          C compiler command
2260  CFLAGS      C compiler flags
2261  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2262              nonstandard directory <lib dir>
2263  LIBS        libraries to pass to the linker, e.g. -l<library>
2264  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2265              you have headers in a nonstandard directory <include dir>
2266  CXX         C++ compiler command
2267  CXXFLAGS    C++ compiler flags
2268  CPP         C preprocessor
2269  CXXCPP      C++ preprocessor
2270  AS          Override default value for AS
2271  AR          Override default value for AR
2272  LIPO        Override default value for LIPO
2273  STRIP       Override default value for STRIP
2274  NM          Override default value for NM
2275  GNM         Override default value for GNM
2276  OBJCOPY     Override default value for OBJCOPY
2277  OBJDUMP     Override default value for OBJDUMP
2278  BUILD_CC    Override default value for BUILD_CC
2279  BUILD_CXX   Override default value for BUILD_CXX
2280  BUILD_NM    Override default value for BUILD_NM
2281  BUILD_AR    Override default value for BUILD_AR
2282  BUILD_OBJCOPY
2283              Override default value for BUILD_OBJCOPY
2284  BUILD_STRIP Override default value for BUILD_STRIP
2285  JTREGEXE    Override default value for JTREGEXE
2286  XMKMF       Path to xmkmf, Makefile generator for X Window System
2287  FREETYPE_CFLAGS
2288              C compiler flags for FREETYPE, overriding pkg-config
2289  FREETYPE_LIBS
2290              linker flags for FREETYPE, overriding pkg-config
2291  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2292  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2293  LIBFFI_CFLAGS
2294              C compiler flags for LIBFFI, overriding pkg-config
2295  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2296  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2297  PNG_LIBS    linker flags for PNG, overriding pkg-config
2298  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2299  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2300  ICECC_CMD   Override default value for ICECC_CMD
2301  ICECC_CREATE_ENV
2302              Override default value for ICECC_CREATE_ENV
2303  ICECC_WRAPPER
2304              Override default value for ICECC_WRAPPER
2305  CCACHE      Override default value for CCACHE
2306
2307Use these variables to override the choices made by `configure' or to help
2308it to find libraries and programs with nonstandard names/locations.
2309
2310Report bugs to <build-dev@openjdk.java.net>.
2311OpenJDK home page: <http://openjdk.java.net>.
2312_ACEOF
2313ac_status=$?
2314fi
2315
2316if test "$ac_init_help" = "recursive"; then
2317  # If there are subdirs, report their specific --help.
2318  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2319    test -d "$ac_dir" ||
2320      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2321      continue
2322    ac_builddir=.
2323
2324case "$ac_dir" in
2325.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326*)
2327  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2328  # A ".." for each directory in $ac_dir_suffix.
2329  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2330  case $ac_top_builddir_sub in
2331  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2332  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2333  esac ;;
2334esac
2335ac_abs_top_builddir=$ac_pwd
2336ac_abs_builddir=$ac_pwd$ac_dir_suffix
2337# for backward compatibility:
2338ac_top_builddir=$ac_top_build_prefix
2339
2340case $srcdir in
2341  .)  # We are building in place.
2342    ac_srcdir=.
2343    ac_top_srcdir=$ac_top_builddir_sub
2344    ac_abs_top_srcdir=$ac_pwd ;;
2345  [\\/]* | ?:[\\/]* )  # Absolute name.
2346    ac_srcdir=$srcdir$ac_dir_suffix;
2347    ac_top_srcdir=$srcdir
2348    ac_abs_top_srcdir=$srcdir ;;
2349  *) # Relative name.
2350    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2351    ac_top_srcdir=$ac_top_build_prefix$srcdir
2352    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2353esac
2354ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2355
2356    cd "$ac_dir" || { ac_status=$?; continue; }
2357    # Check for guested configure.
2358    if test -f "$ac_srcdir/configure.gnu"; then
2359      echo &&
2360      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2361    elif test -f "$ac_srcdir/configure"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure" --help=recursive
2364    else
2365      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2366    fi || ac_status=$?
2367    cd "$ac_pwd" || { ac_status=$?; break; }
2368  done
2369fi
2370
2371test -n "$ac_init_help" && exit $ac_status
2372if $ac_init_version; then
2373  cat <<\_ACEOF
2374OpenJDK configure jdk9
2375generated by GNU Autoconf 2.69
2376
2377Copyright (C) 2012 Free Software Foundation, Inc.
2378This configure script is free software; the Free Software Foundation
2379gives unlimited permission to copy, distribute and modify it.
2380_ACEOF
2381  exit
2382fi
2383
2384## ------------------------ ##
2385## Autoconf initialization. ##
2386## ------------------------ ##
2387
2388# ac_fn_c_try_compile LINENO
2389# --------------------------
2390# Try to compile conftest.$ac_ext, and return whether this succeeded.
2391ac_fn_c_try_compile ()
2392{
2393  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2394  rm -f conftest.$ac_objext
2395  if { { ac_try="$ac_compile"
2396case "(($ac_try" in
2397  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2398  *) ac_try_echo=$ac_try;;
2399esac
2400eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2401$as_echo "$ac_try_echo"; } >&5
2402  (eval "$ac_compile") 2>conftest.err
2403  ac_status=$?
2404  if test -s conftest.err; then
2405    grep -v '^ *+' conftest.err >conftest.er1
2406    cat conftest.er1 >&5
2407    mv -f conftest.er1 conftest.err
2408  fi
2409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2410  test $ac_status = 0; } && {
2411	 test -z "$ac_c_werror_flag" ||
2412	 test ! -s conftest.err
2413       } && test -s conftest.$ac_objext; then :
2414  ac_retval=0
2415else
2416  $as_echo "$as_me: failed program was:" >&5
2417sed 's/^/| /' conftest.$ac_ext >&5
2418
2419	ac_retval=1
2420fi
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422  as_fn_set_status $ac_retval
2423
2424} # ac_fn_c_try_compile
2425
2426# ac_fn_cxx_try_compile LINENO
2427# ----------------------------
2428# Try to compile conftest.$ac_ext, and return whether this succeeded.
2429ac_fn_cxx_try_compile ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  rm -f conftest.$ac_objext
2433  if { { ac_try="$ac_compile"
2434case "(($ac_try" in
2435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2436  *) ac_try_echo=$ac_try;;
2437esac
2438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2439$as_echo "$ac_try_echo"; } >&5
2440  (eval "$ac_compile") 2>conftest.err
2441  ac_status=$?
2442  if test -s conftest.err; then
2443    grep -v '^ *+' conftest.err >conftest.er1
2444    cat conftest.er1 >&5
2445    mv -f conftest.er1 conftest.err
2446  fi
2447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2448  test $ac_status = 0; } && {
2449	 test -z "$ac_cxx_werror_flag" ||
2450	 test ! -s conftest.err
2451       } && test -s conftest.$ac_objext; then :
2452  ac_retval=0
2453else
2454  $as_echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
2456
2457	ac_retval=1
2458fi
2459  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2460  as_fn_set_status $ac_retval
2461
2462} # ac_fn_cxx_try_compile
2463
2464# ac_fn_c_try_cpp LINENO
2465# ----------------------
2466# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2467ac_fn_c_try_cpp ()
2468{
2469  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2470  if { { ac_try="$ac_cpp conftest.$ac_ext"
2471case "(($ac_try" in
2472  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2473  *) ac_try_echo=$ac_try;;
2474esac
2475eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2476$as_echo "$ac_try_echo"; } >&5
2477  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2478  ac_status=$?
2479  if test -s conftest.err; then
2480    grep -v '^ *+' conftest.err >conftest.er1
2481    cat conftest.er1 >&5
2482    mv -f conftest.er1 conftest.err
2483  fi
2484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2485  test $ac_status = 0; } > conftest.i && {
2486	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2487	 test ! -s conftest.err
2488       }; then :
2489  ac_retval=0
2490else
2491  $as_echo "$as_me: failed program was:" >&5
2492sed 's/^/| /' conftest.$ac_ext >&5
2493
2494    ac_retval=1
2495fi
2496  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497  as_fn_set_status $ac_retval
2498
2499} # ac_fn_c_try_cpp
2500
2501# ac_fn_cxx_try_cpp LINENO
2502# ------------------------
2503# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2504ac_fn_cxx_try_cpp ()
2505{
2506  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507  if { { ac_try="$ac_cpp conftest.$ac_ext"
2508case "(($ac_try" in
2509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510  *) ac_try_echo=$ac_try;;
2511esac
2512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2513$as_echo "$ac_try_echo"; } >&5
2514  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2515  ac_status=$?
2516  if test -s conftest.err; then
2517    grep -v '^ *+' conftest.err >conftest.er1
2518    cat conftest.er1 >&5
2519    mv -f conftest.er1 conftest.err
2520  fi
2521  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522  test $ac_status = 0; } > conftest.i && {
2523	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2524	 test ! -s conftest.err
2525       }; then :
2526  ac_retval=0
2527else
2528  $as_echo "$as_me: failed program was:" >&5
2529sed 's/^/| /' conftest.$ac_ext >&5
2530
2531    ac_retval=1
2532fi
2533  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534  as_fn_set_status $ac_retval
2535
2536} # ac_fn_cxx_try_cpp
2537
2538# ac_fn_c_try_link LINENO
2539# -----------------------
2540# Try to link conftest.$ac_ext, and return whether this succeeded.
2541ac_fn_c_try_link ()
2542{
2543  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544  rm -f conftest.$ac_objext conftest$ac_exeext
2545  if { { ac_try="$ac_link"
2546case "(($ac_try" in
2547  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548  *) ac_try_echo=$ac_try;;
2549esac
2550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2551$as_echo "$ac_try_echo"; } >&5
2552  (eval "$ac_link") 2>conftest.err
2553  ac_status=$?
2554  if test -s conftest.err; then
2555    grep -v '^ *+' conftest.err >conftest.er1
2556    cat conftest.er1 >&5
2557    mv -f conftest.er1 conftest.err
2558  fi
2559  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2560  test $ac_status = 0; } && {
2561	 test -z "$ac_c_werror_flag" ||
2562	 test ! -s conftest.err
2563       } && test -s conftest$ac_exeext && {
2564	 test "$cross_compiling" = yes ||
2565	 test -x conftest$ac_exeext
2566       }; then :
2567  ac_retval=0
2568else
2569  $as_echo "$as_me: failed program was:" >&5
2570sed 's/^/| /' conftest.$ac_ext >&5
2571
2572	ac_retval=1
2573fi
2574  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2575  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2576  # interfere with the next link command; also delete a directory that is
2577  # left behind by Apple's compiler.  We do this before executing the actions.
2578  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2579  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2580  as_fn_set_status $ac_retval
2581
2582} # ac_fn_c_try_link
2583
2584# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2585# ---------------------------------------------------------
2586# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2587# the include files in INCLUDES and setting the cache variable VAR
2588# accordingly.
2589ac_fn_cxx_check_header_mongrel ()
2590{
2591  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2592  if eval \${$3+:} false; then :
2593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594$as_echo_n "checking for $2... " >&6; }
2595if eval \${$3+:} false; then :
2596  $as_echo_n "(cached) " >&6
2597fi
2598eval ac_res=\$$3
2599	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600$as_echo "$ac_res" >&6; }
2601else
2602  # Is the header compilable?
2603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2604$as_echo_n "checking $2 usability... " >&6; }
2605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608#include <$2>
2609_ACEOF
2610if ac_fn_cxx_try_compile "$LINENO"; then :
2611  ac_header_compiler=yes
2612else
2613  ac_header_compiler=no
2614fi
2615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2617$as_echo "$ac_header_compiler" >&6; }
2618
2619# Is the header present?
2620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2621$as_echo_n "checking $2 presence... " >&6; }
2622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624#include <$2>
2625_ACEOF
2626if ac_fn_cxx_try_cpp "$LINENO"; then :
2627  ac_header_preproc=yes
2628else
2629  ac_header_preproc=no
2630fi
2631rm -f conftest.err conftest.i conftest.$ac_ext
2632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2633$as_echo "$ac_header_preproc" >&6; }
2634
2635# So?  What about this header?
2636case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2637  yes:no: )
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2639$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2641$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2642    ;;
2643  no:yes:* )
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2645$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2647$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2649$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2651$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2653$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2654( $as_echo "## ----------------------------------------- ##
2655## Report this to build-dev@openjdk.java.net ##
2656## ----------------------------------------- ##"
2657     ) | sed "s/^/$as_me: WARNING:     /" >&2
2658    ;;
2659esac
2660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2661$as_echo_n "checking for $2... " >&6; }
2662if eval \${$3+:} false; then :
2663  $as_echo_n "(cached) " >&6
2664else
2665  eval "$3=\$ac_header_compiler"
2666fi
2667eval ac_res=\$$3
2668	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2669$as_echo "$ac_res" >&6; }
2670fi
2671  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2672
2673} # ac_fn_cxx_check_header_mongrel
2674
2675# ac_fn_cxx_try_run LINENO
2676# ------------------------
2677# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2678# that executables *can* be run.
2679ac_fn_cxx_try_run ()
2680{
2681  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2682  if { { ac_try="$ac_link"
2683case "(($ac_try" in
2684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2685  *) ac_try_echo=$ac_try;;
2686esac
2687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2688$as_echo "$ac_try_echo"; } >&5
2689  (eval "$ac_link") 2>&5
2690  ac_status=$?
2691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2692  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2693  { { case "(($ac_try" in
2694  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2695  *) ac_try_echo=$ac_try;;
2696esac
2697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2698$as_echo "$ac_try_echo"; } >&5
2699  (eval "$ac_try") 2>&5
2700  ac_status=$?
2701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2702  test $ac_status = 0; }; }; then :
2703  ac_retval=0
2704else
2705  $as_echo "$as_me: program exited with status $ac_status" >&5
2706       $as_echo "$as_me: failed program was:" >&5
2707sed 's/^/| /' conftest.$ac_ext >&5
2708
2709       ac_retval=$ac_status
2710fi
2711  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2712  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2713  as_fn_set_status $ac_retval
2714
2715} # ac_fn_cxx_try_run
2716
2717# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2718# ---------------------------------------------------------
2719# Tests whether HEADER exists and can be compiled using the include files in
2720# INCLUDES, setting the cache variable VAR accordingly.
2721ac_fn_cxx_check_header_compile ()
2722{
2723  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2725$as_echo_n "checking for $2... " >&6; }
2726if eval \${$3+:} false; then :
2727  $as_echo_n "(cached) " >&6
2728else
2729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2730/* end confdefs.h.  */
2731$4
2732#include <$2>
2733_ACEOF
2734if ac_fn_cxx_try_compile "$LINENO"; then :
2735  eval "$3=yes"
2736else
2737  eval "$3=no"
2738fi
2739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2740fi
2741eval ac_res=\$$3
2742	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2743$as_echo "$ac_res" >&6; }
2744  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2745
2746} # ac_fn_cxx_check_header_compile
2747
2748# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2749# ----------------------------------------------
2750# Tries to find the compile-time value of EXPR in a program that includes
2751# INCLUDES, setting VAR accordingly. Returns whether the value could be
2752# computed
2753ac_fn_cxx_compute_int ()
2754{
2755  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2756  if test "$cross_compiling" = yes; then
2757    # Depending upon the size, compute the lo and hi bounds.
2758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759/* end confdefs.h.  */
2760$4
2761int
2762main ()
2763{
2764static int test_array [1 - 2 * !(($2) >= 0)];
2765test_array [0] = 0;
2766return test_array [0];
2767
2768  ;
2769  return 0;
2770}
2771_ACEOF
2772if ac_fn_cxx_try_compile "$LINENO"; then :
2773  ac_lo=0 ac_mid=0
2774  while :; do
2775    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776/* end confdefs.h.  */
2777$4
2778int
2779main ()
2780{
2781static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2782test_array [0] = 0;
2783return test_array [0];
2784
2785  ;
2786  return 0;
2787}
2788_ACEOF
2789if ac_fn_cxx_try_compile "$LINENO"; then :
2790  ac_hi=$ac_mid; break
2791else
2792  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2793			if test $ac_lo -le $ac_mid; then
2794			  ac_lo= ac_hi=
2795			  break
2796			fi
2797			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2798fi
2799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800  done
2801else
2802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2803/* end confdefs.h.  */
2804$4
2805int
2806main ()
2807{
2808static int test_array [1 - 2 * !(($2) < 0)];
2809test_array [0] = 0;
2810return test_array [0];
2811
2812  ;
2813  return 0;
2814}
2815_ACEOF
2816if ac_fn_cxx_try_compile "$LINENO"; then :
2817  ac_hi=-1 ac_mid=-1
2818  while :; do
2819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821$4
2822int
2823main ()
2824{
2825static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2826test_array [0] = 0;
2827return test_array [0];
2828
2829  ;
2830  return 0;
2831}
2832_ACEOF
2833if ac_fn_cxx_try_compile "$LINENO"; then :
2834  ac_lo=$ac_mid; break
2835else
2836  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2837			if test $ac_mid -le $ac_hi; then
2838			  ac_lo= ac_hi=
2839			  break
2840			fi
2841			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2842fi
2843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2844  done
2845else
2846  ac_lo= ac_hi=
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849fi
2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851# Binary search between lo and hi bounds.
2852while test "x$ac_lo" != "x$ac_hi"; do
2853  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2855/* end confdefs.h.  */
2856$4
2857int
2858main ()
2859{
2860static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2861test_array [0] = 0;
2862return test_array [0];
2863
2864  ;
2865  return 0;
2866}
2867_ACEOF
2868if ac_fn_cxx_try_compile "$LINENO"; then :
2869  ac_hi=$ac_mid
2870else
2871  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2872fi
2873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2874done
2875case $ac_lo in #((
2876?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2877'') ac_retval=1 ;;
2878esac
2879  else
2880    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2881/* end confdefs.h.  */
2882$4
2883static long int longval () { return $2; }
2884static unsigned long int ulongval () { return $2; }
2885#include <stdio.h>
2886#include <stdlib.h>
2887int
2888main ()
2889{
2890
2891  FILE *f = fopen ("conftest.val", "w");
2892  if (! f)
2893    return 1;
2894  if (($2) < 0)
2895    {
2896      long int i = longval ();
2897      if (i != ($2))
2898	return 1;
2899      fprintf (f, "%ld", i);
2900    }
2901  else
2902    {
2903      unsigned long int i = ulongval ();
2904      if (i != ($2))
2905	return 1;
2906      fprintf (f, "%lu", i);
2907    }
2908  /* Do not output a trailing newline, as this causes \r\n confusion
2909     on some platforms.  */
2910  return ferror (f) || fclose (f) != 0;
2911
2912  ;
2913  return 0;
2914}
2915_ACEOF
2916if ac_fn_cxx_try_run "$LINENO"; then :
2917  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2918else
2919  ac_retval=1
2920fi
2921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2922  conftest.$ac_objext conftest.beam conftest.$ac_ext
2923rm -f conftest.val
2924
2925  fi
2926  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2927  as_fn_set_status $ac_retval
2928
2929} # ac_fn_cxx_compute_int
2930
2931# ac_fn_cxx_try_link LINENO
2932# -------------------------
2933# Try to link conftest.$ac_ext, and return whether this succeeded.
2934ac_fn_cxx_try_link ()
2935{
2936  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2937  rm -f conftest.$ac_objext conftest$ac_exeext
2938  if { { ac_try="$ac_link"
2939case "(($ac_try" in
2940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941  *) ac_try_echo=$ac_try;;
2942esac
2943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2944$as_echo "$ac_try_echo"; } >&5
2945  (eval "$ac_link") 2>conftest.err
2946  ac_status=$?
2947  if test -s conftest.err; then
2948    grep -v '^ *+' conftest.err >conftest.er1
2949    cat conftest.er1 >&5
2950    mv -f conftest.er1 conftest.err
2951  fi
2952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2953  test $ac_status = 0; } && {
2954	 test -z "$ac_cxx_werror_flag" ||
2955	 test ! -s conftest.err
2956       } && test -s conftest$ac_exeext && {
2957	 test "$cross_compiling" = yes ||
2958	 test -x conftest$ac_exeext
2959       }; then :
2960  ac_retval=0
2961else
2962  $as_echo "$as_me: failed program was:" >&5
2963sed 's/^/| /' conftest.$ac_ext >&5
2964
2965	ac_retval=1
2966fi
2967  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2968  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2969  # interfere with the next link command; also delete a directory that is
2970  # left behind by Apple's compiler.  We do this before executing the actions.
2971  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2972  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2973  as_fn_set_status $ac_retval
2974
2975} # ac_fn_cxx_try_link
2976
2977# ac_fn_cxx_check_func LINENO FUNC VAR
2978# ------------------------------------
2979# Tests whether FUNC exists, setting the cache variable VAR accordingly
2980ac_fn_cxx_check_func ()
2981{
2982  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2984$as_echo_n "checking for $2... " >&6; }
2985if eval \${$3+:} false; then :
2986  $as_echo_n "(cached) " >&6
2987else
2988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2989/* end confdefs.h.  */
2990/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2991   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2992#define $2 innocuous_$2
2993
2994/* System header to define __stub macros and hopefully few prototypes,
2995    which can conflict with char $2 (); below.
2996    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2997    <limits.h> exists even on freestanding compilers.  */
2998
2999#ifdef __STDC__
3000# include <limits.h>
3001#else
3002# include <assert.h>
3003#endif
3004
3005#undef $2
3006
3007/* Override any GCC internal prototype to avoid an error.
3008   Use char because int might match the return type of a GCC
3009   builtin and then its argument prototype would still apply.  */
3010#ifdef __cplusplus
3011extern "C"
3012#endif
3013char $2 ();
3014/* The GNU C library defines this for functions which it implements
3015    to always fail with ENOSYS.  Some functions are actually named
3016    something starting with __ and the normal name is an alias.  */
3017#if defined __stub_$2 || defined __stub___$2
3018choke me
3019#endif
3020
3021int
3022main ()
3023{
3024return $2 ();
3025  ;
3026  return 0;
3027}
3028_ACEOF
3029if ac_fn_cxx_try_link "$LINENO"; then :
3030  eval "$3=yes"
3031else
3032  eval "$3=no"
3033fi
3034rm -f core conftest.err conftest.$ac_objext \
3035    conftest$ac_exeext conftest.$ac_ext
3036fi
3037eval ac_res=\$$3
3038	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3039$as_echo "$ac_res" >&6; }
3040  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3041
3042} # ac_fn_cxx_check_func
3043
3044# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3045# -------------------------------------------------------
3046# Tests whether HEADER exists and can be compiled using the include files in
3047# INCLUDES, setting the cache variable VAR accordingly.
3048ac_fn_c_check_header_compile ()
3049{
3050  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3052$as_echo_n "checking for $2... " >&6; }
3053if eval \${$3+:} false; then :
3054  $as_echo_n "(cached) " >&6
3055else
3056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3057/* end confdefs.h.  */
3058$4
3059#include <$2>
3060_ACEOF
3061if ac_fn_c_try_compile "$LINENO"; then :
3062  eval "$3=yes"
3063else
3064  eval "$3=no"
3065fi
3066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3067fi
3068eval ac_res=\$$3
3069	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3070$as_echo "$ac_res" >&6; }
3071  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3072
3073} # ac_fn_c_check_header_compile
3074cat >config.log <<_ACEOF
3075This file contains any messages produced by compilers while
3076running configure, to aid debugging if configure makes a mistake.
3077
3078It was created by OpenJDK $as_me jdk9, which was
3079generated by GNU Autoconf 2.69.  Invocation command line was
3080
3081  $ $0 $@
3082
3083_ACEOF
3084exec 5>>config.log
3085{
3086cat <<_ASUNAME
3087## --------- ##
3088## Platform. ##
3089## --------- ##
3090
3091hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3092uname -m = `(uname -m) 2>/dev/null || echo unknown`
3093uname -r = `(uname -r) 2>/dev/null || echo unknown`
3094uname -s = `(uname -s) 2>/dev/null || echo unknown`
3095uname -v = `(uname -v) 2>/dev/null || echo unknown`
3096
3097/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3098/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3099
3100/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3101/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3102/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3103/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3104/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3105/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3106/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3107
3108_ASUNAME
3109
3110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3111for as_dir in $PATH
3112do
3113  IFS=$as_save_IFS
3114  test -z "$as_dir" && as_dir=.
3115    $as_echo "PATH: $as_dir"
3116  done
3117IFS=$as_save_IFS
3118
3119} >&5
3120
3121cat >&5 <<_ACEOF
3122
3123
3124## ----------- ##
3125## Core tests. ##
3126## ----------- ##
3127
3128_ACEOF
3129
3130
3131# Keep a trace of the command line.
3132# Strip out --no-create and --no-recursion so they do not pile up.
3133# Strip out --silent because we don't want to record it for future runs.
3134# Also quote any args containing shell meta-characters.
3135# Make two passes to allow for proper duplicate-argument suppression.
3136ac_configure_args=
3137ac_configure_args0=
3138ac_configure_args1=
3139ac_must_keep_next=false
3140for ac_pass in 1 2
3141do
3142  for ac_arg
3143  do
3144    case $ac_arg in
3145    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3146    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3147    | -silent | --silent | --silen | --sile | --sil)
3148      continue ;;
3149    *\'*)
3150      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3151    esac
3152    case $ac_pass in
3153    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3154    2)
3155      as_fn_append ac_configure_args1 " '$ac_arg'"
3156      if test $ac_must_keep_next = true; then
3157	ac_must_keep_next=false # Got value, back to normal.
3158      else
3159	case $ac_arg in
3160	  *=* | --config-cache | -C | -disable-* | --disable-* \
3161	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3162	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3163	  | -with-* | --with-* | -without-* | --without-* | --x)
3164	    case "$ac_configure_args0 " in
3165	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3166	    esac
3167	    ;;
3168	  -* ) ac_must_keep_next=true ;;
3169	esac
3170      fi
3171      as_fn_append ac_configure_args " '$ac_arg'"
3172      ;;
3173    esac
3174  done
3175done
3176{ ac_configure_args0=; unset ac_configure_args0;}
3177{ ac_configure_args1=; unset ac_configure_args1;}
3178
3179# When interrupted or exit'd, cleanup temporary files, and complete
3180# config.log.  We remove comments because anyway the quotes in there
3181# would cause problems or look ugly.
3182# WARNING: Use '\'' to represent an apostrophe within the trap.
3183# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3184trap 'exit_status=$?
3185  # Save into config.log some information that might help in debugging.
3186  {
3187    echo
3188
3189    $as_echo "## ---------------- ##
3190## Cache variables. ##
3191## ---------------- ##"
3192    echo
3193    # The following way of writing the cache mishandles newlines in values,
3194(
3195  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3196    eval ac_val=\$$ac_var
3197    case $ac_val in #(
3198    *${as_nl}*)
3199      case $ac_var in #(
3200      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3201$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3202      esac
3203      case $ac_var in #(
3204      _ | IFS | as_nl) ;; #(
3205      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3206      *) { eval $ac_var=; unset $ac_var;} ;;
3207      esac ;;
3208    esac
3209  done
3210  (set) 2>&1 |
3211    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3212    *${as_nl}ac_space=\ *)
3213      sed -n \
3214	"s/'\''/'\''\\\\'\'''\''/g;
3215	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3216      ;; #(
3217    *)
3218      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3219      ;;
3220    esac |
3221    sort
3222)
3223    echo
3224
3225    $as_echo "## ----------------- ##
3226## Output variables. ##
3227## ----------------- ##"
3228    echo
3229    for ac_var in $ac_subst_vars
3230    do
3231      eval ac_val=\$$ac_var
3232      case $ac_val in
3233      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3234      esac
3235      $as_echo "$ac_var='\''$ac_val'\''"
3236    done | sort
3237    echo
3238
3239    if test -n "$ac_subst_files"; then
3240      $as_echo "## ------------------- ##
3241## File substitutions. ##
3242## ------------------- ##"
3243      echo
3244      for ac_var in $ac_subst_files
3245      do
3246	eval ac_val=\$$ac_var
3247	case $ac_val in
3248	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3249	esac
3250	$as_echo "$ac_var='\''$ac_val'\''"
3251      done | sort
3252      echo
3253    fi
3254
3255    if test -s confdefs.h; then
3256      $as_echo "## ----------- ##
3257## confdefs.h. ##
3258## ----------- ##"
3259      echo
3260      cat confdefs.h
3261      echo
3262    fi
3263    test "$ac_signal" != 0 &&
3264      $as_echo "$as_me: caught signal $ac_signal"
3265    $as_echo "$as_me: exit $exit_status"
3266  } >&5
3267  rm -f core *.core core.conftest.* &&
3268    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3269    exit $exit_status
3270' 0
3271for ac_signal in 1 2 13 15; do
3272  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3273done
3274ac_signal=0
3275
3276# confdefs.h avoids OS command line length limits that DEFS can exceed.
3277rm -f -r conftest* confdefs.h
3278
3279$as_echo "/* confdefs.h */" > confdefs.h
3280
3281# Predefined preprocessor variables.
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_NAME "$PACKAGE_NAME"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_VERSION "$PACKAGE_VERSION"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_STRING "$PACKAGE_STRING"
3297_ACEOF
3298
3299cat >>confdefs.h <<_ACEOF
3300#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3301_ACEOF
3302
3303cat >>confdefs.h <<_ACEOF
3304#define PACKAGE_URL "$PACKAGE_URL"
3305_ACEOF
3306
3307
3308# Let the site file select an alternate cache file if it wants to.
3309# Prefer an explicitly selected file to automatically selected ones.
3310ac_site_file1=NONE
3311ac_site_file2=NONE
3312if test -n "$CONFIG_SITE"; then
3313  # We do not want a PATH search for config.site.
3314  case $CONFIG_SITE in #((
3315    -*)  ac_site_file1=./$CONFIG_SITE;;
3316    */*) ac_site_file1=$CONFIG_SITE;;
3317    *)   ac_site_file1=./$CONFIG_SITE;;
3318  esac
3319elif test "x$prefix" != xNONE; then
3320  ac_site_file1=$prefix/share/config.site
3321  ac_site_file2=$prefix/etc/config.site
3322else
3323  ac_site_file1=$ac_default_prefix/share/config.site
3324  ac_site_file2=$ac_default_prefix/etc/config.site
3325fi
3326for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3327do
3328  test "x$ac_site_file" = xNONE && continue
3329  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3330    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3331$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3332    sed 's/^/| /' "$ac_site_file" >&5
3333    . "$ac_site_file" \
3334      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3336as_fn_error $? "failed to load site script $ac_site_file
3337See \`config.log' for more details" "$LINENO" 5; }
3338  fi
3339done
3340
3341if test -r "$cache_file"; then
3342  # Some versions of bash will fail to source /dev/null (special files
3343  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3344  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3345    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3346$as_echo "$as_me: loading cache $cache_file" >&6;}
3347    case $cache_file in
3348      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3349      *)                      . "./$cache_file";;
3350    esac
3351  fi
3352else
3353  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3354$as_echo "$as_me: creating cache $cache_file" >&6;}
3355  >$cache_file
3356fi
3357
3358# Check that the precious variables saved in the cache have kept the same
3359# value.
3360ac_cache_corrupted=false
3361for ac_var in $ac_precious_vars; do
3362  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3363  eval ac_new_set=\$ac_env_${ac_var}_set
3364  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3365  eval ac_new_val=\$ac_env_${ac_var}_value
3366  case $ac_old_set,$ac_new_set in
3367    set,)
3368      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3369$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3370      ac_cache_corrupted=: ;;
3371    ,set)
3372      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3373$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3374      ac_cache_corrupted=: ;;
3375    ,);;
3376    *)
3377      if test "x$ac_old_val" != "x$ac_new_val"; then
3378	# differences in whitespace do not lead to failure.
3379	ac_old_val_w=`echo x $ac_old_val`
3380	ac_new_val_w=`echo x $ac_new_val`
3381	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3382	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3383$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3384	  ac_cache_corrupted=:
3385	else
3386	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3387$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3388	  eval $ac_var=\$ac_old_val
3389	fi
3390	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3391$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3392	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3393$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3394      fi;;
3395  esac
3396  # Pass precious variables to config.status.
3397  if test "$ac_new_set" = set; then
3398    case $ac_new_val in
3399    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3400    *) ac_arg=$ac_var=$ac_new_val ;;
3401    esac
3402    case " $ac_configure_args " in
3403      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3404      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3405    esac
3406  fi
3407done
3408if $ac_cache_corrupted; then
3409  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3411  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3412$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3413  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3414fi
3415## -------------------- ##
3416## Main body of script. ##
3417## -------------------- ##
3418
3419ac_ext=c
3420ac_cpp='$CPP $CPPFLAGS'
3421ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3422ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3423ac_compiler_gnu=$ac_cv_c_compiler_gnu
3424
3425
3426
3427ac_aux_dir=
3428for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3429  if test -f "$ac_dir/install-sh"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/install-sh -c"
3432    break
3433  elif test -f "$ac_dir/install.sh"; then
3434    ac_aux_dir=$ac_dir
3435    ac_install_sh="$ac_aux_dir/install.sh -c"
3436    break
3437  elif test -f "$ac_dir/shtool"; then
3438    ac_aux_dir=$ac_dir
3439    ac_install_sh="$ac_aux_dir/shtool install -c"
3440    break
3441  fi
3442done
3443if test -z "$ac_aux_dir"; then
3444  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
3445fi
3446
3447# These three variables are undocumented and unsupported,
3448# and are intended to be withdrawn in a future Autoconf release.
3449# They can cause serious problems if a builder's source tree is in a directory
3450# whose full name contains unusual characters.
3451ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3452ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3453ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3454
3455
3456# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3457
3458#
3459# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3461#
3462# This code is free software; you can redistribute it and/or modify it
3463# under the terms of the GNU General Public License version 2 only, as
3464# published by the Free Software Foundation.  Oracle designates this
3465# particular file as subject to the "Classpath" exception as provided
3466# by Oracle in the LICENSE file that accompanied this code.
3467#
3468# This code is distributed in the hope that it will be useful, but WITHOUT
3469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3471# version 2 for more details (a copy is included in the LICENSE file that
3472# accompanied this code).
3473#
3474# You should have received a copy of the GNU General Public License version
3475# 2 along with this work; if not, write to the Free Software Foundation,
3476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3477#
3478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3479# or visit www.oracle.com if you need additional information or have any
3480# questions.
3481#
3482
3483#
3484# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3485#
3486# This program is free software; you can redistribute it and/or modify
3487# it under the terms of the GNU General Public License as published by
3488# the Free Software Foundation; either version 2 of the License, or
3489# (at your option) any later version.
3490#
3491# This program is distributed in the hope that it will be useful, but
3492# WITHOUT ANY WARRANTY; without even the implied warranty of
3493# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3494# General Public License for more details.
3495#
3496# You should have received a copy of the GNU General Public License
3497# along with this program; if not, write to the Free Software
3498# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3499#
3500# As a special exception to the GNU General Public License, if you
3501# distribute this file as part of a program that contains a
3502# configuration script generated by Autoconf, you may include it under
3503# the same distribution terms that you use for the rest of that program.
3504
3505# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3506# ----------------------------------
3507# PKG_PROG_PKG_CONFIG
3508
3509# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3510#
3511# Check to see whether a particular set of modules exists.  Similar
3512# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3513#
3514#
3515# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3516# this or PKG_CHECK_MODULES is called, or make sure to call
3517# PKG_CHECK_EXISTS manually
3518# --------------------------------------------------------------
3519
3520
3521
3522# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3523# ---------------------------------------------
3524# _PKG_CONFIG
3525
3526# _PKG_SHORT_ERRORS_SUPPORTED
3527# -----------------------------
3528# _PKG_SHORT_ERRORS_SUPPORTED
3529
3530
3531# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3532# [ACTION-IF-NOT-FOUND])
3533#
3534#
3535# Note that if there is a possibility the first call to
3536# PKG_CHECK_MODULES might not happen, you should be sure to include an
3537# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3538#
3539#
3540# --------------------------------------------------------------
3541# PKG_CHECK_MODULES
3542
3543
3544# Include these first...
3545#
3546# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3547# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3548#
3549# This code is free software; you can redistribute it and/or modify it
3550# under the terms of the GNU General Public License version 2 only, as
3551# published by the Free Software Foundation.  Oracle designates this
3552# particular file as subject to the "Classpath" exception as provided
3553# by Oracle in the LICENSE file that accompanied this code.
3554#
3555# This code is distributed in the hope that it will be useful, but WITHOUT
3556# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3557# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3558# version 2 for more details (a copy is included in the LICENSE file that
3559# accompanied this code).
3560#
3561# You should have received a copy of the GNU General Public License version
3562# 2 along with this work; if not, write to the Free Software Foundation,
3563# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3564#
3565# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3566# or visit www.oracle.com if you need additional information or have any
3567# questions.
3568#
3569
3570# Create a function/macro that takes a series of named arguments. The call is
3571# similar to AC_DEFUN, but the setup of the function looks like this:
3572# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3573# ... do something
3574#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3575# ])
3576# A star (*) in front of a named argument means that it is required and it's
3577# presence will be verified. To pass e.g. the first value as a normal indexed
3578# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3579# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3580# "ARG_FOO".
3581#
3582# The generated function can be called like this:
3583# MYFUNC(FOO: [foo-val],
3584#     BAR: [
3585#         $ECHO hello world
3586#     ])
3587# Note that the argument value must start on the same line as the argument name.
3588#
3589# Argument 1: Name of the function to define
3590# Argument 2: List of legal named arguments, with a * prefix for required arguments
3591# Argument 3: Argument array to treat as named, typically $@
3592# Argument 4: The main function body
3593
3594
3595# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3596# If so, then append $1 to $2 \
3597# Also set JVM_ARG_OK to true/false depending on outcome.
3598
3599
3600# Appends a string to a path variable, only adding the : when needed.
3601
3602
3603# Prepends a string to a path variable, only adding the : when needed.
3604
3605
3606# This will make sure the given variable points to a full and proper
3607# path. This means:
3608# 1) There will be no spaces in the path. On unix platforms,
3609#    spaces in the path will result in an error. On Windows,
3610#    the path will be rewritten using short-style to be space-free.
3611# 2) The path will be absolute, and it will be in unix-style (on
3612#     cygwin).
3613# $1: The name of the variable to fix
3614
3615
3616# This will make sure the given variable points to a executable
3617# with a full and proper path. This means:
3618# 1) There will be no spaces in the path. On unix platforms,
3619#    spaces in the path will result in an error. On Windows,
3620#    the path will be rewritten using short-style to be space-free.
3621# 2) The path will be absolute, and it will be in unix-style (on
3622#     cygwin).
3623# Any arguments given to the executable is preserved.
3624# If the input variable does not have a directory specification, then
3625# it need to be in the PATH.
3626# $1: The name of the variable to fix
3627
3628
3629
3630
3631# Register a --with argument but mark it as deprecated
3632# $1: The name of the with argument to deprecate, not including --with-
3633
3634
3635# Register a --enable argument but mark it as deprecated
3636# $1: The name of the with argument to deprecate, not including --enable-
3637# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3638# $3: Messages to user.
3639
3640
3641
3642
3643# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3644# $1: variable to check
3645
3646
3647# Check that there are no unprocessed overridden variables left.
3648# If so, they are an incorrect argument and we will exit with an error.
3649
3650
3651# Setup a tool for the given variable. If correctly specified by the user,
3652# use that value, otherwise search for the tool using the supplied code snippet.
3653# $1: variable to set
3654# $2: code snippet to call to look for the tool
3655# $3: code snippet to call if variable was used to find tool
3656
3657
3658# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3659# $1: variable to set
3660# $2: executable name (or list of names) to look for
3661# $3: [path]
3662
3663
3664# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3665# $1: variable to set
3666# $2: executable name (or list of names) to look for
3667
3668
3669# Like BASIC_PATH_PROGS but fails if no tool was found.
3670# $1: variable to set
3671# $2: executable name (or list of names) to look for
3672# $3: [path]
3673
3674
3675# Like BASIC_SETUP_TOOL but fails if no tool was found.
3676# $1: variable to set
3677# $2: autoconf macro to call to look for the special tool
3678
3679
3680# Setup the most fundamental tools that relies on not much else to set up,
3681# but is used by much of the early bootstrap code.
3682
3683
3684# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3685
3686
3687# Evaluates platform specific overrides for devkit variables.
3688# $1: Name of variable
3689
3690
3691
3692
3693
3694
3695#%%% Simple tools %%%
3696
3697# Check if we have found a usable version of make
3698# $1: the path to a potential make binary (or empty)
3699# $2: the description on how we found this
3700
3701
3702
3703
3704# Goes looking for a usable version of GNU make.
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715# Check if build directory is on local disk. If not possible to determine,
3716# we prefer to claim it's local.
3717# Argument 1: directory to test
3718# Argument 2: what to do if it is on local disk
3719# Argument 3: what to do otherwise (remote disk or failure)
3720
3721
3722# Check that source files have basic read permissions set. This might
3723# not be the case in cygwin in certain conditions.
3724
3725
3726
3727
3728# Check for support for specific options in bash
3729
3730
3731################################################################################
3732#
3733# Default make target
3734#
3735
3736
3737# Code to run after AC_OUTPUT
3738
3739
3740#
3741# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3742# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3743#
3744# This code is free software; you can redistribute it and/or modify it
3745# under the terms of the GNU General Public License version 2 only, as
3746# published by the Free Software Foundation.  Oracle designates this
3747# particular file as subject to the "Classpath" exception as provided
3748# by Oracle in the LICENSE file that accompanied this code.
3749#
3750# This code is distributed in the hope that it will be useful, but WITHOUT
3751# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3752# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3753# version 2 for more details (a copy is included in the LICENSE file that
3754# accompanied this code).
3755#
3756# You should have received a copy of the GNU General Public License version
3757# 2 along with this work; if not, write to the Free Software Foundation,
3758# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3759#
3760# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3761# or visit www.oracle.com if you need additional information or have any
3762# questions.
3763#
3764
3765
3766
3767
3768
3769# Helper function which possibly converts a path using DOS-style short mode.
3770# If so, the updated path is stored in $new_path.
3771# $1: The path to check
3772
3773
3774# Helper function which possibly converts a path using DOS-style short mode.
3775# If so, the updated path is stored in $new_path.
3776# $1: The path to check
3777
3778
3779# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3780# and could probably be heavily simplified. However, all changes in this
3781# area tend to need lot of testing in different scenarios, and in lack of
3782# proper unit testing, cleaning this up has not been deemed worth the effort
3783# at the moment.
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3794
3795
3796
3797
3798# ... then the rest
3799#
3800# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3801# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3802#
3803# This code is free software; you can redistribute it and/or modify it
3804# under the terms of the GNU General Public License version 2 only, as
3805# published by the Free Software Foundation.  Oracle designates this
3806# particular file as subject to the "Classpath" exception as provided
3807# by Oracle in the LICENSE file that accompanied this code.
3808#
3809# This code is distributed in the hope that it will be useful, but WITHOUT
3810# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3811# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3812# version 2 for more details (a copy is included in the LICENSE file that
3813# accompanied this code).
3814#
3815# You should have received a copy of the GNU General Public License version
3816# 2 along with this work; if not, write to the Free Software Foundation,
3817# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3818#
3819# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3820# or visit www.oracle.com if you need additional information or have any
3821# questions.
3822#
3823
3824########################################################################
3825# This file handles detection of the Boot JDK. The Boot JDK detection
3826# process has been developed as a response to solve a complex real-world
3827# problem. Initially, it was simple, but it has grown as platform after
3828# platform, idiosyncracy after idiosyncracy has been supported.
3829#
3830# The basic idea is this:
3831# 1) You need an acceptable *) JDK to use as a Boot JDK
3832# 2) There are several ways to locate a JDK, that are mostly platform
3833#    dependent **)
3834# 3) You can have multiple JDKs installed
3835# 4) If possible, configure should try to dig out an acceptable JDK
3836#    automatically, without having to resort to command-line options
3837#
3838# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3839#     javac) and not a JRE, etc.
3840#
3841# **) On Windows we typically use a well-known path.
3842#     On MacOSX we typically use the tool java_home.
3843#     On Linux we typically find javac in the $PATH, and then follow a
3844#     chain of symlinks that often ends up in a real JDK.
3845#
3846# This leads to the code where we check in different ways to locate a
3847# JDK, and if one is found, check if it is acceptable. If not, we print
3848# our reasons for rejecting it (useful when debugging non-working
3849# configure situations) and continue checking the next one.
3850########################################################################
3851
3852# Execute the check given as argument, and verify the result
3853# If the Boot JDK was previously found, do nothing
3854# $1 A command line (typically autoconf macro) to execute
3855
3856
3857# Test: Is bootjdk explicitly set by command line arguments?
3858
3859
3860# Test: Is $JAVA_HOME set?
3861
3862
3863# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3864
3865
3866# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3867# $1: Argument to the java_home binary (optional)
3868
3869
3870# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3871
3872
3873# Look for a jdk in the given path. If there are multiple, try to select the newest.
3874# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3875# $1 = Path to directory containing jdk installations.
3876# $2 = String to append to the found JDK directory to get the proper JDK home
3877
3878
3879# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3880# environmental variable as base for where to look.
3881# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3882
3883
3884# Test: Is there a JDK installed in default, well-known locations?
3885
3886
3887# Check that a command-line tool in the Boot JDK is correct
3888# $1 = name of variable to assign
3889# $2 = name of binary
3890
3891
3892###############################################################################
3893#
3894# We need a Boot JDK to bootstrap the build.
3895#
3896
3897
3898
3899
3900
3901# BUILD_JDK: the location of the latest JDK that can run
3902#   on the host system and supports the target class file version
3903#   generated in this JDK build.  This variable should only be
3904#   used after the launchers are built.
3905#
3906
3907# Execute the check given as argument, and verify the result.
3908# If the JDK was previously found, do nothing.
3909# $1 A command line (typically autoconf macro) to execute
3910
3911
3912# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3913# is different than the host system doing the build (e.g. cross-compilation),
3914# a special BUILD_JDK is built as part of the build process.  An external
3915# prebuilt BUILD_JDK can also be supplied.
3916
3917
3918#
3919# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3920# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3921#
3922# This code is free software; you can redistribute it and/or modify it
3923# under the terms of the GNU General Public License version 2 only, as
3924# published by the Free Software Foundation.  Oracle designates this
3925# particular file as subject to the "Classpath" exception as provided
3926# by Oracle in the LICENSE file that accompanied this code.
3927#
3928# This code is distributed in the hope that it will be useful, but WITHOUT
3929# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3930# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3931# version 2 for more details (a copy is included in the LICENSE file that
3932# accompanied this code).
3933#
3934# You should have received a copy of the GNU General Public License version
3935# 2 along with this work; if not, write to the Free Software Foundation,
3936# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3937#
3938# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3939# or visit www.oracle.com if you need additional information or have any
3940# questions.
3941#
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959################################################################################
3960#
3961# Runs icecc-create-env once and prints the error if it fails
3962#
3963# $1: arguments to icecc-create-env
3964# $2: log file
3965#
3966
3967
3968################################################################################
3969#
3970# Optionally enable distributed compilation of native code using icecc/icecream
3971#
3972
3973
3974
3975
3976
3977
3978
3979#
3980# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3981# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3982#
3983# This code is free software; you can redistribute it and/or modify it
3984# under the terms of the GNU General Public License version 2 only, as
3985# published by the Free Software Foundation.  Oracle designates this
3986# particular file as subject to the "Classpath" exception as provided
3987# by Oracle in the LICENSE file that accompanied this code.
3988#
3989# This code is distributed in the hope that it will be useful, but WITHOUT
3990# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3991# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3992# version 2 for more details (a copy is included in the LICENSE file that
3993# accompanied this code).
3994#
3995# You should have received a copy of the GNU General Public License version
3996# 2 along with this work; if not, write to the Free Software Foundation,
3997# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3998#
3999# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4000# or visit www.oracle.com if you need additional information or have any
4001# questions.
4002#
4003
4004################################################################################
4005#
4006# Setup ABI profile (for arm)
4007#
4008
4009
4010# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4011# corresponding configure arguments instead
4012
4013
4014# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4015# that configure can use them while detecting compilers.
4016# TOOLCHAIN_TYPE is available here.
4017# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4018
4019
4020
4021
4022
4023
4024# Documentation on common flags used for solstudio in HIGHEST.
4025#
4026# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4027#          done with care, there are some assumptions below that need to
4028#          be understood about the use of pointers, and IEEE behavior.
4029#
4030# -fns: Use non-standard floating point mode (not IEEE 754)
4031# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4032# -fsingle: Use single precision floating point with 'float'
4033# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4034#   (Source with excessing pointer casting and data access with mixed
4035#    pointer types are not recommended)
4036# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4037#   (If you expect perfect errno behavior, do not use this)
4038# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4039# -xrestrict: Pointer parameters to functions do not overlap
4040#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4041#    If you pass in multiple pointers to the same data, do not use this)
4042# -xlibmil: Inline some library routines
4043#   (If you expect perfect errno behavior, do not use this)
4044# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4045#   (If you expect perfect errno behavior, do not use this)
4046#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4047
4048    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4049    # Bug?
4050    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4051    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4052    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4053    #fi
4054
4055
4056
4057
4058
4059
4060################################################################################
4061# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4062#      conditionals against.
4063# $2 - Optional prefix for each variable defined.
4064
4065
4066# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4067#                                  IF_FALSE: [RUN-IF-FALSE])
4068# ------------------------------------------------------------
4069# Check that the C compiler supports an argument
4070
4071
4072
4073
4074# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4075#                                    IF_FALSE: [RUN-IF-FALSE])
4076# ------------------------------------------------------------
4077# Check that the C++ compiler supports an argument
4078
4079
4080
4081
4082# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4083#                                IF_FALSE: [RUN-IF-FALSE])
4084# ------------------------------------------------------------
4085# Check that the C and C++ compilers support an argument
4086
4087
4088
4089
4090# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4091#                                   IF_FALSE: [RUN-IF-FALSE])
4092# ------------------------------------------------------------
4093# Check that the linker support an argument
4094
4095
4096
4097
4098
4099
4100# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4101# Arguments:
4102# $1 - Optional prefix for each variable defined.
4103
4104
4105#
4106# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4107# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4108#
4109# This code is free software; you can redistribute it and/or modify it
4110# under the terms of the GNU General Public License version 2 only, as
4111# published by the Free Software Foundation.  Oracle designates this
4112# particular file as subject to the "Classpath" exception as provided
4113# by Oracle in the LICENSE file that accompanied this code.
4114#
4115# This code is distributed in the hope that it will be useful, but WITHOUT
4116# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4117# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4118# version 2 for more details (a copy is included in the LICENSE file that
4119# accompanied this code).
4120#
4121# You should have received a copy of the GNU General Public License version
4122# 2 along with this work; if not, write to the Free Software Foundation,
4123# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4124#
4125# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4126# or visit www.oracle.com if you need additional information or have any
4127# questions.
4128#
4129
4130
4131
4132
4133
4134cygwin_help() {
4135  case $1 in
4136    unzip)
4137      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4138      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4139      ;;
4140    zip)
4141      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4142      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4143      ;;
4144    make)
4145      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4146      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4147      ;;
4148    freetype)
4149      HELP_MSG="
4150The freetype library can now be build during the configure process.
4151Download the freetype sources and unpack them into an arbitrary directory:
4152
4153wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4154tar -xzf freetype-2.5.3.tar.gz
4155
4156Then run configure with '--with-freetype-src=<freetype_src>'. This will
4157automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4158builds or into '<freetype_src>/lib32' for 32-bit builds.
4159Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4160and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4161
4162Alternatively you can unpack the sources like this to use the default directory:
4163
4164tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4165      ;;
4166  esac
4167}
4168
4169msys_help() {
4170  PKGHANDLER_COMMAND=""
4171}
4172
4173apt_help() {
4174  case $1 in
4175    reduced)
4176      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4177    devkit)
4178      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4179    openjdk)
4180      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4181    alsa)
4182      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4183    cups)
4184      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4185    freetype)
4186      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4187    ffi)
4188      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4189    x11)
4190      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4191    ccache)
4192      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4193    dtrace)
4194      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4195    elf)
4196      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4197  esac
4198}
4199
4200yum_help() {
4201  case $1 in
4202    devkit)
4203      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4204    openjdk)
4205      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4206    alsa)
4207      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4208    cups)
4209      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4210    freetype)
4211      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4212    x11)
4213      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4214    ccache)
4215      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4216    elf)
4217      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4218  esac
4219}
4220
4221brew_help() {
4222  case $1 in
4223    openjdk)
4224      PKGHANDLER_COMMAND="brew cask install java" ;;
4225    freetype)
4226      PKGHANDLER_COMMAND="brew install freetype" ;;
4227    ccache)
4228      PKGHANDLER_COMMAND="brew install ccache" ;;
4229  esac
4230}
4231
4232port_help() {
4233  PKGHANDLER_COMMAND=""
4234}
4235
4236pkgutil_help() {
4237  PKGHANDLER_COMMAND=""
4238}
4239
4240pkgadd_help() {
4241  PKGHANDLER_COMMAND=""
4242}
4243
4244# This function will check if we're called from the "configure" wrapper while
4245# printing --help. If so, we will print out additional information that can
4246# only be extracted within the autoconf script, and then exit. This must be
4247# called at the very beginning in configure.ac.
4248
4249
4250
4251
4252
4253
4254#
4255# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4256# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4257#
4258# This code is free software; you can redistribute it and/or modify it
4259# under the terms of the GNU General Public License version 2 only, as
4260# published by the Free Software Foundation.  Oracle designates this
4261# particular file as subject to the "Classpath" exception as provided
4262# by Oracle in the LICENSE file that accompanied this code.
4263#
4264# This code is distributed in the hope that it will be useful, but WITHOUT
4265# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4266# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4267# version 2 for more details (a copy is included in the LICENSE file that
4268# accompanied this code).
4269#
4270# You should have received a copy of the GNU General Public License version
4271# 2 along with this work; if not, write to the Free Software Foundation,
4272# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4273#
4274# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4275# or visit www.oracle.com if you need additional information or have any
4276# questions.
4277#
4278
4279# All valid JVM features, regardless of platform
4280VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4281    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4282    static-build link-time-opt aot"
4283
4284# All valid JVM variants
4285VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4286
4287###############################################################################
4288# Check if the specified JVM variant should be built. To be used in shell if
4289# constructs, like this:
4290# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4291#
4292# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4293
4294# Definition kept in one line to allow inlining in if statements.
4295# Additional [] needed to keep m4 from mangling shell constructs.
4296
4297
4298###############################################################################
4299# Check if the specified JVM features are explicitly enabled. To be used in
4300# shell if constructs, like this:
4301# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4302#
4303# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
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 which variants of the JVM that we want to build. Available variants are:
4311#   server: normal interpreter, and a tiered C1/C2 compiler
4312#   client: normal interpreter, and C1 (no C2 compiler)
4313#   minimal: reduced form of client with optional features stripped out
4314#   core: normal interpreter only, no compiler
4315#   zero: C++ based interpreter only, no compiler
4316#   zeroshark: C++ based interpreter, and a llvm-based compiler
4317#   custom: baseline JVM with no default features
4318#
4319
4320
4321###############################################################################
4322# Check if dtrace should be enabled and has all prerequisites present.
4323#
4324
4325
4326################################################################################
4327# Check if AOT should be enabled
4328#
4329
4330
4331###############################################################################
4332# Set up all JVM features for each JVM variant.
4333#
4334
4335
4336###############################################################################
4337# Validate JVM features once all setup is complete, including custom setup.
4338#
4339
4340
4341################################################################################
4342#
4343# Specify which sources will be used to build the 64-bit ARM port
4344#
4345# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4346# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4347#
4348
4349
4350
4351################################################################################
4352# Check if gtest should be built
4353#
4354
4355
4356#
4357# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4358# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4359#
4360# This code is free software; you can redistribute it and/or modify it
4361# under the terms of the GNU General Public License version 2 only, as
4362# published by the Free Software Foundation.  Oracle designates this
4363# particular file as subject to the "Classpath" exception as provided
4364# by Oracle in the LICENSE file that accompanied this code.
4365#
4366# This code is distributed in the hope that it will be useful, but WITHOUT
4367# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4368# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4369# version 2 for more details (a copy is included in the LICENSE file that
4370# accompanied this code).
4371#
4372# You should have received a copy of the GNU General Public License version
4373# 2 along with this work; if not, write to the Free Software Foundation,
4374# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4375#
4376# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4377# or visit www.oracle.com if you need additional information or have any
4378# questions.
4379#
4380
4381###############################################################################
4382# Check which variant of the JDK that we want to build.
4383# Currently we have:
4384#    normal:   standard edition
4385# but the custom make system may add other variants
4386#
4387# Effectively the JDK variant gives a name to a specific set of
4388# modules to compile into the JDK.
4389
4390
4391###############################################################################
4392# Set the debug level
4393#    release: no debug information, all optimizations, no asserts.
4394#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4395#    fastdebug: debug information (-g), all optimizations, all asserts
4396#    slowdebug: debug information (-g), no optimizations, all asserts
4397
4398
4399###############################################################################
4400#
4401# Should we build only OpenJDK even if closed sources are present?
4402#
4403
4404
4405
4406
4407###############################################################################
4408#
4409# Enable or disable the elliptic curve crypto implementation
4410#
4411
4412
4413
4414
4415################################################################################
4416#
4417# Gcov coverage data for hotspot
4418#
4419
4420
4421################################################################################
4422#
4423# Static build support.  When enabled will generate static
4424# libraries instead of shared libraries for all JDK libs.
4425#
4426
4427
4428################################################################################
4429#
4430# jlink options.
4431# We always keep packaged modules in JDK image.
4432#
4433
4434
4435################################################################################
4436#
4437# Check if building of the jtreg failure handler should be enabled.
4438#
4439
4440
4441################################################################################
4442#
4443# Enable or disable generation of the classlist at build time
4444#
4445
4446
4447#
4448# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4450#
4451# This code is free software; you can redistribute it and/or modify it
4452# under the terms of the GNU General Public License version 2 only, as
4453# published by the Free Software Foundation.  Oracle designates this
4454# particular file as subject to the "Classpath" exception as provided
4455# by Oracle in the LICENSE file that accompanied this code.
4456#
4457# This code is distributed in the hope that it will be useful, but WITHOUT
4458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4460# version 2 for more details (a copy is included in the LICENSE file that
4461# accompanied this code).
4462#
4463# You should have received a copy of the GNU General Public License version
4464# 2 along with this work; if not, write to the Free Software Foundation,
4465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4466#
4467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4468# or visit www.oracle.com if you need additional information or have any
4469# questions.
4470#
4471
4472###############################################################################
4473#
4474# Setup version numbers
4475#
4476
4477# Verify that a given string represents a valid version number, and assign it
4478# to a variable.
4479
4480# Argument 1: the variable to assign to
4481# Argument 2: the value given by the user
4482
4483
4484
4485
4486#
4487# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4488# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4489#
4490# This code is free software; you can redistribute it and/or modify it
4491# under the terms of the GNU General Public License version 2 only, as
4492# published by the Free Software Foundation.  Oracle designates this
4493# particular file as subject to the "Classpath" exception as provided
4494# by Oracle in the LICENSE file that accompanied this code.
4495#
4496# This code is distributed in the hope that it will be useful, but WITHOUT
4497# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4498# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4499# version 2 for more details (a copy is included in the LICENSE file that
4500# accompanied this code).
4501#
4502# You should have received a copy of the GNU General Public License version
4503# 2 along with this work; if not, write to the Free Software Foundation,
4504# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4505#
4506# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4507# or visit www.oracle.com if you need additional information or have any
4508# questions.
4509#
4510
4511# Major library component reside in separate files.
4512#
4513# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4514# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4515#
4516# This code is free software; you can redistribute it and/or modify it
4517# under the terms of the GNU General Public License version 2 only, as
4518# published by the Free Software Foundation.  Oracle designates this
4519# particular file as subject to the "Classpath" exception as provided
4520# by Oracle in the LICENSE file that accompanied this code.
4521#
4522# This code is distributed in the hope that it will be useful, but WITHOUT
4523# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4524# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4525# version 2 for more details (a copy is included in the LICENSE file that
4526# accompanied this code).
4527#
4528# You should have received a copy of the GNU General Public License version
4529# 2 along with this work; if not, write to the Free Software Foundation,
4530# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4531#
4532# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4533# or visit www.oracle.com if you need additional information or have any
4534# questions.
4535#
4536
4537################################################################################
4538# Setup alsa (Advanced Linux Sound Architecture)
4539################################################################################
4540
4541
4542#
4543# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4545#
4546# This code is free software; you can redistribute it and/or modify it
4547# under the terms of the GNU General Public License version 2 only, as
4548# published by the Free Software Foundation.  Oracle designates this
4549# particular file as subject to the "Classpath" exception as provided
4550# by Oracle in the LICENSE file that accompanied this code.
4551#
4552# This code is distributed in the hope that it will be useful, but WITHOUT
4553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4555# version 2 for more details (a copy is included in the LICENSE file that
4556# accompanied this code).
4557#
4558# You should have received a copy of the GNU General Public License version
4559# 2 along with this work; if not, write to the Free Software Foundation,
4560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4561#
4562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4563# or visit www.oracle.com if you need additional information or have any
4564# questions.
4565#
4566
4567################################################################################
4568# Setup bundled libraries.
4569#
4570# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4571# OpenJDK repository. Default is to use these libraries as bundled, but they
4572# might be replaced by en external version by the user.
4573################################################################################
4574
4575
4576################################################################################
4577# Setup libjpeg
4578################################################################################
4579
4580
4581################################################################################
4582# Setup giflib
4583################################################################################
4584
4585
4586################################################################################
4587# Setup libpng
4588################################################################################
4589
4590
4591################################################################################
4592# Setup zlib
4593################################################################################
4594
4595
4596################################################################################
4597# Setup lcms (Little CMS)
4598################################################################################
4599
4600
4601#
4602# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4604#
4605# This code is free software; you can redistribute it and/or modify it
4606# under the terms of the GNU General Public License version 2 only, as
4607# published by the Free Software Foundation.  Oracle designates this
4608# particular file as subject to the "Classpath" exception as provided
4609# by Oracle in the LICENSE file that accompanied this code.
4610#
4611# This code is distributed in the hope that it will be useful, but WITHOUT
4612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4614# version 2 for more details (a copy is included in the LICENSE file that
4615# accompanied this code).
4616#
4617# You should have received a copy of the GNU General Public License version
4618# 2 along with this work; if not, write to the Free Software Foundation,
4619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4620#
4621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4622# or visit www.oracle.com if you need additional information or have any
4623# questions.
4624#
4625
4626################################################################################
4627# Setup cups (Common Unix Printing System)
4628################################################################################
4629
4630
4631#
4632# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4633# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4634#
4635# This code is free software; you can redistribute it and/or modify it
4636# under the terms of the GNU General Public License version 2 only, as
4637# published by the Free Software Foundation.  Oracle designates this
4638# particular file as subject to the "Classpath" exception as provided
4639# by Oracle in the LICENSE file that accompanied this code.
4640#
4641# This code is distributed in the hope that it will be useful, but WITHOUT
4642# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4643# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4644# version 2 for more details (a copy is included in the LICENSE file that
4645# accompanied this code).
4646#
4647# You should have received a copy of the GNU General Public License version
4648# 2 along with this work; if not, write to the Free Software Foundation,
4649# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4650#
4651# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4652# or visit www.oracle.com if you need additional information or have any
4653# questions.
4654#
4655
4656################################################################################
4657# Setup libffi (Foreign Function Interface)
4658################################################################################
4659
4660
4661#
4662# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664#
4665# This code is free software; you can redistribute it and/or modify it
4666# under the terms of the GNU General Public License version 2 only, as
4667# published by the Free Software Foundation.  Oracle designates this
4668# particular file as subject to the "Classpath" exception as provided
4669# by Oracle in the LICENSE file that accompanied this code.
4670#
4671# This code is distributed in the hope that it will be useful, but WITHOUT
4672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674# version 2 for more details (a copy is included in the LICENSE file that
4675# accompanied this code).
4676#
4677# You should have received a copy of the GNU General Public License version
4678# 2 along with this work; if not, write to the Free Software Foundation,
4679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680#
4681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682# or visit www.oracle.com if you need additional information or have any
4683# questions.
4684#
4685
4686################################################################################
4687# Build the freetype lib from source
4688################################################################################
4689
4690
4691################################################################################
4692# Check if a potential freeype library match is correct and usable
4693################################################################################
4694
4695
4696################################################################################
4697# Setup freetype (The FreeType2 font rendering library)
4698################################################################################
4699
4700
4701#
4702# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4703# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4704#
4705# This code is free software; you can redistribute it and/or modify it
4706# under the terms of the GNU General Public License version 2 only, as
4707# published by the Free Software Foundation.  Oracle designates this
4708# particular file as subject to the "Classpath" exception as provided
4709# by Oracle in the LICENSE file that accompanied this code.
4710#
4711# This code is distributed in the hope that it will be useful, but WITHOUT
4712# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4713# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4714# version 2 for more details (a copy is included in the LICENSE file that
4715# accompanied this code).
4716#
4717# You should have received a copy of the GNU General Public License version
4718# 2 along with this work; if not, write to the Free Software Foundation,
4719# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4720#
4721# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4722# or visit www.oracle.com if you need additional information or have any
4723# questions.
4724#
4725
4726################################################################################
4727# Setup the standard C/C++ runtime libraries.
4728#
4729# Most importantly, determine if stdc++ should be linked statically or
4730# dynamically.
4731################################################################################
4732
4733
4734#
4735# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4736# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4737#
4738# This code is free software; you can redistribute it and/or modify it
4739# under the terms of the GNU General Public License version 2 only, as
4740# published by the Free Software Foundation.  Oracle designates this
4741# particular file as subject to the "Classpath" exception as provided
4742# by Oracle in the LICENSE file that accompanied this code.
4743#
4744# This code is distributed in the hope that it will be useful, but WITHOUT
4745# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4746# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4747# version 2 for more details (a copy is included in the LICENSE file that
4748# accompanied this code).
4749#
4750# You should have received a copy of the GNU General Public License version
4751# 2 along with this work; if not, write to the Free Software Foundation,
4752# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4753#
4754# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4755# or visit www.oracle.com if you need additional information or have any
4756# questions.
4757#
4758
4759################################################################################
4760# Setup X11 Windows system
4761################################################################################
4762
4763
4764
4765################################################################################
4766# Determine which libraries are needed for this configuration
4767################################################################################
4768
4769
4770################################################################################
4771# Parse library options, and setup needed libraries
4772################################################################################
4773
4774
4775################################################################################
4776# Setup llvm (Low-Level VM)
4777################################################################################
4778
4779
4780################################################################################
4781# Setup various libraries, typically small system libraries
4782################################################################################
4783
4784
4785################################################################################
4786# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4787# redistribute it in the test image.
4788################################################################################
4789
4790
4791
4792#
4793# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4794# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4795#
4796# This code is free software; you can redistribute it and/or modify it
4797# under the terms of the GNU General Public License version 2 only, as
4798# published by the Free Software Foundation.  Oracle designates this
4799# particular file as subject to the "Classpath" exception as provided
4800# by Oracle in the LICENSE file that accompanied this code.
4801#
4802# This code is distributed in the hope that it will be useful, but WITHOUT
4803# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4804# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4805# version 2 for more details (a copy is included in the LICENSE file that
4806# accompanied this code).
4807#
4808# You should have received a copy of the GNU General Public License version
4809# 2 along with this work; if not, write to the Free Software Foundation,
4810# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4811#
4812# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4813# or visit www.oracle.com if you need additional information or have any
4814# questions.
4815#
4816
4817# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4818# Converts autoconf style CPU name to OpenJDK style, into
4819# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4820
4821
4822# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4823# Converts autoconf style OS name to OpenJDK style, into
4824# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4825
4826
4827# Expects $host_os $host_cpu $build_os and $build_cpu
4828# and $with_target_bits to have been setup!
4829#
4830# Translate the standard triplet(quadruplet) definition
4831# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4832# OPENJDK_BUILD_OS, etc.
4833
4834
4835# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4836# accordingly. Must be done after setting up build and target system, but before
4837# doing anything else with these values.
4838
4839
4840# Setup the legacy variables, for controlling the old makefiles.
4841#
4842
4843
4844# $1 - Either TARGET or BUILD to setup the variables for.
4845
4846
4847
4848
4849#%%% Build and target systems %%%
4850
4851
4852
4853
4854# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4855# Add -mX to various FLAGS variables.
4856
4857
4858
4859
4860
4861
4862#
4863# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4864# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4865#
4866# This code is free software; you can redistribute it and/or modify it
4867# under the terms of the GNU General Public License version 2 only, as
4868# published by the Free Software Foundation.  Oracle designates this
4869# particular file as subject to the "Classpath" exception as provided
4870# by Oracle in the LICENSE file that accompanied this code.
4871#
4872# This code is distributed in the hope that it will be useful, but WITHOUT
4873# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4874# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4875# version 2 for more details (a copy is included in the LICENSE file that
4876# accompanied this code).
4877#
4878# You should have received a copy of the GNU General Public License version
4879# 2 along with this work; if not, write to the Free Software Foundation,
4880# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4881#
4882# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4883# or visit www.oracle.com if you need additional information or have any
4884# questions.
4885#
4886
4887
4888
4889
4890
4891
4892
4893################################################################################
4894# Define a mechanism for importing extra prebuilt modules
4895#
4896
4897
4898
4899#
4900# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4901# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4902#
4903# This code is free software; you can redistribute it and/or modify it
4904# under the terms of the GNU General Public License version 2 only, as
4905# published by the Free Software Foundation.  Oracle designates this
4906# particular file as subject to the "Classpath" exception as provided
4907# by Oracle in the LICENSE file that accompanied this code.
4908#
4909# This code is distributed in the hope that it will be useful, but WITHOUT
4910# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4911# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4912# version 2 for more details (a copy is included in the LICENSE file that
4913# accompanied this code).
4914#
4915# You should have received a copy of the GNU General Public License version
4916# 2 along with this work; if not, write to the Free Software Foundation,
4917# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4918#
4919# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4920# or visit www.oracle.com if you need additional information or have any
4921# questions.
4922#
4923
4924########################################################################
4925# This file is responsible for detecting, verifying and setting up the
4926# toolchain, i.e. the compiler, linker and related utilities. It will setup
4927# proper paths to the binaries, but it will not setup any flags.
4928#
4929# The binaries used is determined by the toolchain type, which is the family of
4930# compilers and related tools that are used.
4931########################################################################
4932
4933
4934# All valid toolchains, regardless of platform (used by help.m4)
4935VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4936
4937# These toolchains are valid on different platforms
4938VALID_TOOLCHAINS_linux="gcc clang"
4939VALID_TOOLCHAINS_solaris="solstudio"
4940VALID_TOOLCHAINS_macosx="gcc clang"
4941VALID_TOOLCHAINS_aix="xlc"
4942VALID_TOOLCHAINS_windows="microsoft"
4943
4944# Toolchain descriptions
4945TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4946TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4947TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4948TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4949TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4950
4951# Minimum supported versions, empty means unspecified
4952TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4953TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4954TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4955TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4956TOOLCHAIN_MINIMUM_VERSION_xlc=""
4957
4958# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4959# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4960# $1 - optional variable prefix for compiler and version variables (BUILD_)
4961# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4962
4963
4964# Check if the configured compiler (C and C++) is of a specific version or
4965# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4966#
4967# Arguments:
4968#   VERSION:   The version string to check against the found version
4969#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4970#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4971#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4972
4973
4974
4975
4976# Setup a number of variables describing how native output files are
4977# named on this platform/toolchain.
4978
4979
4980# Determine which toolchain type to use, and make sure it is valid for this
4981# platform. Setup various information about the selected toolchain.
4982
4983
4984# Before we start detecting the toolchain executables, we might need some
4985# special setup, e.g. additional paths etc.
4986
4987
4988# Restore path, etc
4989
4990
4991# Check if a compiler is of the toolchain type we expect, and save the version
4992# information from it. If the compiler does not match the expected type,
4993# this function will abort using AC_MSG_ERROR. If it matches, the version will
4994# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4995# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4996#
4997# $1 = compiler to test (CC or CXX)
4998# $2 = human readable name of compiler (C or C++)
4999
5000
5001# Try to locate the given C or C++ compiler in the path, or otherwise.
5002#
5003# $1 = compiler to test (CC or CXX)
5004# $2 = human readable name of compiler (C or C++)
5005# $3 = compiler name to search for
5006
5007
5008# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5009# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5010# archiver (AR). Verify that the compilers are correct according to the
5011# toolchain type.
5012
5013
5014# Setup additional tools that is considered a part of the toolchain, but not the
5015# core part. Many of these are highly platform-specific and do not exist,
5016# and/or are not needed on all platforms.
5017
5018
5019# Setup the build tools (i.e, the compiler and linker used to build programs
5020# that should be run on the build platform, not the target platform, as a build
5021# helper). Since the non-cross-compile case uses the normal, target compilers
5022# for this, we can only do this after these have been setup.
5023
5024
5025# Do some additional checks on the detected tools.
5026
5027
5028# Setup the JTReg Regression Test Harness.
5029
5030
5031# Setup the JIB dependency resolver
5032
5033
5034#
5035# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5036# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5037#
5038# This code is free software; you can redistribute it and/or modify it
5039# under the terms of the GNU General Public License version 2 only, as
5040# published by the Free Software Foundation.  Oracle designates this
5041# particular file as subject to the "Classpath" exception as provided
5042# by Oracle in the LICENSE file that accompanied this code.
5043#
5044# This code is distributed in the hope that it will be useful, but WITHOUT
5045# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5046# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5047# version 2 for more details (a copy is included in the LICENSE file that
5048# accompanied this code).
5049#
5050# You should have received a copy of the GNU General Public License version
5051# 2 along with this work; if not, write to the Free Software Foundation,
5052# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5053#
5054# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5055# or visit www.oracle.com if you need additional information or have any
5056# questions.
5057#
5058
5059################################################################################
5060# The order of these defines the priority by which we try to find them.
5061VALID_VS_VERSIONS="2013 2012 2010"
5062
5063VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5064VS_VERSION_INTERNAL_2010=100
5065VS_MSVCR_2010=msvcr100.dll
5066# We don't use msvcp on Visual Studio 2010
5067#VS_MSVCP_2010=msvcp100.dll
5068VS_ENVVAR_2010="VS100COMNTOOLS"
5069VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5070VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5071VS_VS_PLATFORM_NAME_2010="v100"
5072VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5073
5074VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5075VS_VERSION_INTERNAL_2012=110
5076VS_MSVCR_2012=msvcr110.dll
5077VS_MSVCP_2012=msvcp110.dll
5078VS_ENVVAR_2012="VS110COMNTOOLS"
5079VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5080VS_SDK_INSTALLDIR_2012=
5081VS_VS_PLATFORM_NAME_2012="v110"
5082VS_SDK_PLATFORM_NAME_2012=
5083
5084VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5085VS_VERSION_INTERNAL_2013=120
5086VS_MSVCR_2013=msvcr120.dll
5087VS_MSVCP_2013=msvcp120.dll
5088VS_ENVVAR_2013="VS120COMNTOOLS"
5089VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5090VS_SDK_INSTALLDIR_2013=
5091VS_VS_PLATFORM_NAME_2013="v120"
5092VS_SDK_PLATFORM_NAME_2013=
5093
5094################################################################################
5095
5096
5097
5098################################################################################
5099
5100
5101
5102################################################################################
5103# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5104# build environment and assigns it to VS_ENV_CMD
5105
5106
5107################################################################################
5108
5109
5110
5111################################################################################
5112# Check if the VS env variables were setup prior to running configure.
5113# If not, then find vcvarsall.bat and run it automatically, and integrate
5114# the set env variables into the spec file.
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129# This line needs to be here, verbatim, after all includes and the dummy hook
5130# definitions. It is replaced with custom functionality when building
5131# custom sources.
5132#CUSTOM_AUTOCONF_INCLUDE
5133
5134# Do not change or remove the following line, it is needed for consistency checks:
5135DATE_WHEN_GENERATED=1489506920
5136
5137###############################################################################
5138#
5139# Initialization / Boot-strapping
5140#
5141# The bootstrapping process needs to solve the "chicken or the egg" problem,
5142# thus it jumps back and forth, each time gaining something needed later on.
5143#
5144###############################################################################
5145
5146# If we are requested to print additional help, do that and then exit.
5147# This must be the very first call.
5148
5149  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5150
5151    # Print available toolchains
5152    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5153    $PRINTF "Which are valid to use depends on the build platform.\n"
5154    for toolchain in $VALID_TOOLCHAINS_all; do
5155      # Use indirect variable referencing
5156      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5157      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5158      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5159    done
5160    $PRINTF "\n"
5161
5162    # Print available jvm features
5163    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5164    $PRINTF "Which are valid to use depends on the target platform.\n  "
5165    $PRINTF "%s " $VALID_JVM_FEATURES
5166    $PRINTF "\n"
5167
5168    # And now exit directly
5169    exit 0
5170  fi
5171
5172
5173# Basic initialization that must happen first of all in the normal process.
5174
5175  # Save the original command line. This is passed to us by the wrapper configure script.
5176
5177  # Save the path variable before it gets changed
5178  ORIGINAL_PATH="$PATH"
5179
5180  DATE_WHEN_CONFIGURED=`LANG=C date`
5181
5182  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5183$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5184  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5185$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5186
5187
5188  # Start with tools that do not need have cross compilation support
5189  # and can be expected to be found in the default PATH. These tools are
5190  # used by configure.
5191
5192  # First are all the simple required tools.
5193
5194
5195
5196  # Publish this variable in the help.
5197
5198
5199  if [ -z "${BASENAME+x}" ]; then
5200    # The variable is not set by user, try to locate tool using the code snippet
5201    for ac_prog in basename
5202do
5203  # Extract the first word of "$ac_prog", so it can be a program name with args.
5204set dummy $ac_prog; ac_word=$2
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206$as_echo_n "checking for $ac_word... " >&6; }
5207if ${ac_cv_path_BASENAME+:} false; then :
5208  $as_echo_n "(cached) " >&6
5209else
5210  case $BASENAME in
5211  [\\/]* | ?:[\\/]*)
5212  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5213  ;;
5214  *)
5215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
5218  IFS=$as_save_IFS
5219  test -z "$as_dir" && as_dir=.
5220    for ac_exec_ext in '' $ac_executable_extensions; do
5221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224    break 2
5225  fi
5226done
5227  done
5228IFS=$as_save_IFS
5229
5230  ;;
5231esac
5232fi
5233BASENAME=$ac_cv_path_BASENAME
5234if test -n "$BASENAME"; then
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5236$as_echo "$BASENAME" >&6; }
5237else
5238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239$as_echo "no" >&6; }
5240fi
5241
5242
5243  test -n "$BASENAME" && break
5244done
5245
5246  else
5247    # The variable is set, but is it from the command line or the environment?
5248
5249    # Try to remove the string !BASENAME! from our list.
5250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5252      # If it failed, the variable was not from the command line. Ignore it,
5253      # but warn the user (except for BASH, which is always set by the calling BASH).
5254      if test "xBASENAME" != xBASH; then
5255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5256$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5257      fi
5258      # Try to locate tool using the code snippet
5259      for ac_prog in basename
5260do
5261  # Extract the first word of "$ac_prog", so it can be a program name with args.
5262set dummy $ac_prog; ac_word=$2
5263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5264$as_echo_n "checking for $ac_word... " >&6; }
5265if ${ac_cv_path_BASENAME+:} false; then :
5266  $as_echo_n "(cached) " >&6
5267else
5268  case $BASENAME in
5269  [\\/]* | ?:[\\/]*)
5270  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5271  ;;
5272  *)
5273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5274for as_dir in $PATH
5275do
5276  IFS=$as_save_IFS
5277  test -z "$as_dir" && as_dir=.
5278    for ac_exec_ext in '' $ac_executable_extensions; do
5279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5280    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5282    break 2
5283  fi
5284done
5285  done
5286IFS=$as_save_IFS
5287
5288  ;;
5289esac
5290fi
5291BASENAME=$ac_cv_path_BASENAME
5292if test -n "$BASENAME"; then
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5294$as_echo "$BASENAME" >&6; }
5295else
5296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5297$as_echo "no" >&6; }
5298fi
5299
5300
5301  test -n "$BASENAME" && break
5302done
5303
5304    else
5305      # If it succeeded, then it was overridden by the user. We will use it
5306      # for the tool.
5307
5308      # First remove it from the list of overridden variables, so we can test
5309      # for unknown variables in the end.
5310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5311
5312      # Check if we try to supply an empty value
5313      if test "x$BASENAME" = x; then
5314        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5315$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5317$as_echo_n "checking for BASENAME... " >&6; }
5318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5319$as_echo "disabled" >&6; }
5320      else
5321        # Check if the provided tool contains a complete path.
5322        tool_specified="$BASENAME"
5323        tool_basename="${tool_specified##*/}"
5324        if test "x$tool_basename" = "x$tool_specified"; then
5325          # A command without a complete path is provided, search $PATH.
5326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5327$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5328          # Extract the first word of "$tool_basename", so it can be a program name with args.
5329set dummy $tool_basename; ac_word=$2
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5331$as_echo_n "checking for $ac_word... " >&6; }
5332if ${ac_cv_path_BASENAME+:} false; then :
5333  $as_echo_n "(cached) " >&6
5334else
5335  case $BASENAME in
5336  [\\/]* | ?:[\\/]*)
5337  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5338  ;;
5339  *)
5340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5341for as_dir in $PATH
5342do
5343  IFS=$as_save_IFS
5344  test -z "$as_dir" && as_dir=.
5345    for ac_exec_ext in '' $ac_executable_extensions; do
5346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5347    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5349    break 2
5350  fi
5351done
5352  done
5353IFS=$as_save_IFS
5354
5355  ;;
5356esac
5357fi
5358BASENAME=$ac_cv_path_BASENAME
5359if test -n "$BASENAME"; then
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5361$as_echo "$BASENAME" >&6; }
5362else
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5364$as_echo "no" >&6; }
5365fi
5366
5367
5368          if test "x$BASENAME" = x; then
5369            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5370          fi
5371        else
5372          # Otherwise we believe it is a complete path. Use it as it is.
5373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5374$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5375          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5376$as_echo_n "checking for BASENAME... " >&6; }
5377          if test ! -x "$tool_specified"; then
5378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5379$as_echo "not found" >&6; }
5380            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5381          fi
5382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5383$as_echo "$tool_specified" >&6; }
5384        fi
5385      fi
5386    fi
5387
5388  fi
5389
5390
5391
5392  if test "x$BASENAME" = x; then
5393    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5394  fi
5395
5396
5397
5398
5399
5400  # Publish this variable in the help.
5401
5402
5403  if [ -z "${BASH+x}" ]; then
5404    # The variable is not set by user, try to locate tool using the code snippet
5405    for ac_prog in bash
5406do
5407  # Extract the first word of "$ac_prog", so it can be a program name with args.
5408set dummy $ac_prog; ac_word=$2
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5410$as_echo_n "checking for $ac_word... " >&6; }
5411if ${ac_cv_path_BASH+:} false; then :
5412  $as_echo_n "(cached) " >&6
5413else
5414  case $BASH in
5415  [\\/]* | ?:[\\/]*)
5416  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5417  ;;
5418  *)
5419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5420for as_dir in $PATH
5421do
5422  IFS=$as_save_IFS
5423  test -z "$as_dir" && as_dir=.
5424    for ac_exec_ext in '' $ac_executable_extensions; do
5425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5426    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5428    break 2
5429  fi
5430done
5431  done
5432IFS=$as_save_IFS
5433
5434  ;;
5435esac
5436fi
5437BASH=$ac_cv_path_BASH
5438if test -n "$BASH"; then
5439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5440$as_echo "$BASH" >&6; }
5441else
5442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5443$as_echo "no" >&6; }
5444fi
5445
5446
5447  test -n "$BASH" && break
5448done
5449
5450  else
5451    # The variable is set, but is it from the command line or the environment?
5452
5453    # Try to remove the string !BASH! from our list.
5454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5456      # If it failed, the variable was not from the command line. Ignore it,
5457      # but warn the user (except for BASH, which is always set by the calling BASH).
5458      if test "xBASH" != xBASH; then
5459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5460$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5461      fi
5462      # Try to locate tool using the code snippet
5463      for ac_prog in bash
5464do
5465  # Extract the first word of "$ac_prog", so it can be a program name with args.
5466set dummy $ac_prog; ac_word=$2
5467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5468$as_echo_n "checking for $ac_word... " >&6; }
5469if ${ac_cv_path_BASH+:} false; then :
5470  $as_echo_n "(cached) " >&6
5471else
5472  case $BASH in
5473  [\\/]* | ?:[\\/]*)
5474  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5475  ;;
5476  *)
5477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5478for as_dir in $PATH
5479do
5480  IFS=$as_save_IFS
5481  test -z "$as_dir" && as_dir=.
5482    for ac_exec_ext in '' $ac_executable_extensions; do
5483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5484    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5486    break 2
5487  fi
5488done
5489  done
5490IFS=$as_save_IFS
5491
5492  ;;
5493esac
5494fi
5495BASH=$ac_cv_path_BASH
5496if test -n "$BASH"; then
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5498$as_echo "$BASH" >&6; }
5499else
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5501$as_echo "no" >&6; }
5502fi
5503
5504
5505  test -n "$BASH" && break
5506done
5507
5508    else
5509      # If it succeeded, then it was overridden by the user. We will use it
5510      # for the tool.
5511
5512      # First remove it from the list of overridden variables, so we can test
5513      # for unknown variables in the end.
5514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5515
5516      # Check if we try to supply an empty value
5517      if test "x$BASH" = x; then
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5519$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5521$as_echo_n "checking for BASH... " >&6; }
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5523$as_echo "disabled" >&6; }
5524      else
5525        # Check if the provided tool contains a complete path.
5526        tool_specified="$BASH"
5527        tool_basename="${tool_specified##*/}"
5528        if test "x$tool_basename" = "x$tool_specified"; then
5529          # A command without a complete path is provided, search $PATH.
5530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5531$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5532          # Extract the first word of "$tool_basename", so it can be a program name with args.
5533set dummy $tool_basename; ac_word=$2
5534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535$as_echo_n "checking for $ac_word... " >&6; }
5536if ${ac_cv_path_BASH+:} false; then :
5537  $as_echo_n "(cached) " >&6
5538else
5539  case $BASH in
5540  [\\/]* | ?:[\\/]*)
5541  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5542  ;;
5543  *)
5544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5545for as_dir in $PATH
5546do
5547  IFS=$as_save_IFS
5548  test -z "$as_dir" && as_dir=.
5549    for ac_exec_ext in '' $ac_executable_extensions; do
5550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5551    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5553    break 2
5554  fi
5555done
5556  done
5557IFS=$as_save_IFS
5558
5559  ;;
5560esac
5561fi
5562BASH=$ac_cv_path_BASH
5563if test -n "$BASH"; then
5564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5565$as_echo "$BASH" >&6; }
5566else
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568$as_echo "no" >&6; }
5569fi
5570
5571
5572          if test "x$BASH" = x; then
5573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5574          fi
5575        else
5576          # Otherwise we believe it is a complete path. Use it as it is.
5577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5578$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5580$as_echo_n "checking for BASH... " >&6; }
5581          if test ! -x "$tool_specified"; then
5582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5583$as_echo "not found" >&6; }
5584            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5585          fi
5586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5587$as_echo "$tool_specified" >&6; }
5588        fi
5589      fi
5590    fi
5591
5592  fi
5593
5594
5595
5596  if test "x$BASH" = x; then
5597    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5598  fi
5599
5600
5601
5602
5603
5604  # Publish this variable in the help.
5605
5606
5607  if [ -z "${CAT+x}" ]; then
5608    # The variable is not set by user, try to locate tool using the code snippet
5609    for ac_prog in cat
5610do
5611  # Extract the first word of "$ac_prog", so it can be a program name with args.
5612set dummy $ac_prog; ac_word=$2
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5614$as_echo_n "checking for $ac_word... " >&6; }
5615if ${ac_cv_path_CAT+:} false; then :
5616  $as_echo_n "(cached) " >&6
5617else
5618  case $CAT in
5619  [\\/]* | ?:[\\/]*)
5620  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5621  ;;
5622  *)
5623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in $PATH
5625do
5626  IFS=$as_save_IFS
5627  test -z "$as_dir" && as_dir=.
5628    for ac_exec_ext in '' $ac_executable_extensions; do
5629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5630    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5632    break 2
5633  fi
5634done
5635  done
5636IFS=$as_save_IFS
5637
5638  ;;
5639esac
5640fi
5641CAT=$ac_cv_path_CAT
5642if test -n "$CAT"; then
5643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5644$as_echo "$CAT" >&6; }
5645else
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647$as_echo "no" >&6; }
5648fi
5649
5650
5651  test -n "$CAT" && break
5652done
5653
5654  else
5655    # The variable is set, but is it from the command line or the environment?
5656
5657    # Try to remove the string !CAT! from our list.
5658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5660      # If it failed, the variable was not from the command line. Ignore it,
5661      # but warn the user (except for BASH, which is always set by the calling BASH).
5662      if test "xCAT" != xBASH; then
5663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5664$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5665      fi
5666      # Try to locate tool using the code snippet
5667      for ac_prog in cat
5668do
5669  # Extract the first word of "$ac_prog", so it can be a program name with args.
5670set dummy $ac_prog; ac_word=$2
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5672$as_echo_n "checking for $ac_word... " >&6; }
5673if ${ac_cv_path_CAT+:} false; then :
5674  $as_echo_n "(cached) " >&6
5675else
5676  case $CAT in
5677  [\\/]* | ?:[\\/]*)
5678  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5679  ;;
5680  *)
5681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5682for as_dir in $PATH
5683do
5684  IFS=$as_save_IFS
5685  test -z "$as_dir" && as_dir=.
5686    for ac_exec_ext in '' $ac_executable_extensions; do
5687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5688    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5690    break 2
5691  fi
5692done
5693  done
5694IFS=$as_save_IFS
5695
5696  ;;
5697esac
5698fi
5699CAT=$ac_cv_path_CAT
5700if test -n "$CAT"; then
5701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5702$as_echo "$CAT" >&6; }
5703else
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705$as_echo "no" >&6; }
5706fi
5707
5708
5709  test -n "$CAT" && break
5710done
5711
5712    else
5713      # If it succeeded, then it was overridden by the user. We will use it
5714      # for the tool.
5715
5716      # First remove it from the list of overridden variables, so we can test
5717      # for unknown variables in the end.
5718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5719
5720      # Check if we try to supply an empty value
5721      if test "x$CAT" = x; then
5722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5723$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5725$as_echo_n "checking for CAT... " >&6; }
5726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5727$as_echo "disabled" >&6; }
5728      else
5729        # Check if the provided tool contains a complete path.
5730        tool_specified="$CAT"
5731        tool_basename="${tool_specified##*/}"
5732        if test "x$tool_basename" = "x$tool_specified"; then
5733          # A command without a complete path is provided, search $PATH.
5734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5735$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5736          # Extract the first word of "$tool_basename", so it can be a program name with args.
5737set dummy $tool_basename; ac_word=$2
5738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739$as_echo_n "checking for $ac_word... " >&6; }
5740if ${ac_cv_path_CAT+:} false; then :
5741  $as_echo_n "(cached) " >&6
5742else
5743  case $CAT in
5744  [\\/]* | ?:[\\/]*)
5745  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5746  ;;
5747  *)
5748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751  IFS=$as_save_IFS
5752  test -z "$as_dir" && as_dir=.
5753    for ac_exec_ext in '' $ac_executable_extensions; do
5754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5755    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5757    break 2
5758  fi
5759done
5760  done
5761IFS=$as_save_IFS
5762
5763  ;;
5764esac
5765fi
5766CAT=$ac_cv_path_CAT
5767if test -n "$CAT"; then
5768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5769$as_echo "$CAT" >&6; }
5770else
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772$as_echo "no" >&6; }
5773fi
5774
5775
5776          if test "x$CAT" = x; then
5777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5778          fi
5779        else
5780          # Otherwise we believe it is a complete path. Use it as it is.
5781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5782$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5784$as_echo_n "checking for CAT... " >&6; }
5785          if test ! -x "$tool_specified"; then
5786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5787$as_echo "not found" >&6; }
5788            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5789          fi
5790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5791$as_echo "$tool_specified" >&6; }
5792        fi
5793      fi
5794    fi
5795
5796  fi
5797
5798
5799
5800  if test "x$CAT" = x; then
5801    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5802  fi
5803
5804
5805
5806
5807
5808  # Publish this variable in the help.
5809
5810
5811  if [ -z "${CHMOD+x}" ]; then
5812    # The variable is not set by user, try to locate tool using the code snippet
5813    for ac_prog in chmod
5814do
5815  # Extract the first word of "$ac_prog", so it can be a program name with args.
5816set dummy $ac_prog; ac_word=$2
5817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5818$as_echo_n "checking for $ac_word... " >&6; }
5819if ${ac_cv_path_CHMOD+:} false; then :
5820  $as_echo_n "(cached) " >&6
5821else
5822  case $CHMOD in
5823  [\\/]* | ?:[\\/]*)
5824  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5825  ;;
5826  *)
5827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5828for as_dir in $PATH
5829do
5830  IFS=$as_save_IFS
5831  test -z "$as_dir" && as_dir=.
5832    for ac_exec_ext in '' $ac_executable_extensions; do
5833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5834    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5836    break 2
5837  fi
5838done
5839  done
5840IFS=$as_save_IFS
5841
5842  ;;
5843esac
5844fi
5845CHMOD=$ac_cv_path_CHMOD
5846if test -n "$CHMOD"; then
5847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5848$as_echo "$CHMOD" >&6; }
5849else
5850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5851$as_echo "no" >&6; }
5852fi
5853
5854
5855  test -n "$CHMOD" && break
5856done
5857
5858  else
5859    # The variable is set, but is it from the command line or the environment?
5860
5861    # Try to remove the string !CHMOD! from our list.
5862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5864      # If it failed, the variable was not from the command line. Ignore it,
5865      # but warn the user (except for BASH, which is always set by the calling BASH).
5866      if test "xCHMOD" != xBASH; then
5867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5868$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5869      fi
5870      # Try to locate tool using the code snippet
5871      for ac_prog in chmod
5872do
5873  # Extract the first word of "$ac_prog", so it can be a program name with args.
5874set dummy $ac_prog; ac_word=$2
5875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5876$as_echo_n "checking for $ac_word... " >&6; }
5877if ${ac_cv_path_CHMOD+:} false; then :
5878  $as_echo_n "(cached) " >&6
5879else
5880  case $CHMOD in
5881  [\\/]* | ?:[\\/]*)
5882  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5883  ;;
5884  *)
5885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5886for as_dir in $PATH
5887do
5888  IFS=$as_save_IFS
5889  test -z "$as_dir" && as_dir=.
5890    for ac_exec_ext in '' $ac_executable_extensions; do
5891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5892    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5894    break 2
5895  fi
5896done
5897  done
5898IFS=$as_save_IFS
5899
5900  ;;
5901esac
5902fi
5903CHMOD=$ac_cv_path_CHMOD
5904if test -n "$CHMOD"; then
5905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5906$as_echo "$CHMOD" >&6; }
5907else
5908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5909$as_echo "no" >&6; }
5910fi
5911
5912
5913  test -n "$CHMOD" && break
5914done
5915
5916    else
5917      # If it succeeded, then it was overridden by the user. We will use it
5918      # for the tool.
5919
5920      # First remove it from the list of overridden variables, so we can test
5921      # for unknown variables in the end.
5922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5923
5924      # Check if we try to supply an empty value
5925      if test "x$CHMOD" = x; then
5926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5927$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5929$as_echo_n "checking for CHMOD... " >&6; }
5930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5931$as_echo "disabled" >&6; }
5932      else
5933        # Check if the provided tool contains a complete path.
5934        tool_specified="$CHMOD"
5935        tool_basename="${tool_specified##*/}"
5936        if test "x$tool_basename" = "x$tool_specified"; then
5937          # A command without a complete path is provided, search $PATH.
5938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5939$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5940          # Extract the first word of "$tool_basename", so it can be a program name with args.
5941set dummy $tool_basename; ac_word=$2
5942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5943$as_echo_n "checking for $ac_word... " >&6; }
5944if ${ac_cv_path_CHMOD+:} false; then :
5945  $as_echo_n "(cached) " >&6
5946else
5947  case $CHMOD in
5948  [\\/]* | ?:[\\/]*)
5949  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5950  ;;
5951  *)
5952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955  IFS=$as_save_IFS
5956  test -z "$as_dir" && as_dir=.
5957    for ac_exec_ext in '' $ac_executable_extensions; do
5958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5959    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961    break 2
5962  fi
5963done
5964  done
5965IFS=$as_save_IFS
5966
5967  ;;
5968esac
5969fi
5970CHMOD=$ac_cv_path_CHMOD
5971if test -n "$CHMOD"; then
5972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5973$as_echo "$CHMOD" >&6; }
5974else
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
5977fi
5978
5979
5980          if test "x$CHMOD" = x; then
5981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5982          fi
5983        else
5984          # Otherwise we believe it is a complete path. Use it as it is.
5985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5986$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5988$as_echo_n "checking for CHMOD... " >&6; }
5989          if test ! -x "$tool_specified"; then
5990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5991$as_echo "not found" >&6; }
5992            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5993          fi
5994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5995$as_echo "$tool_specified" >&6; }
5996        fi
5997      fi
5998    fi
5999
6000  fi
6001
6002
6003
6004  if test "x$CHMOD" = x; then
6005    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6006  fi
6007
6008
6009
6010
6011
6012  # Publish this variable in the help.
6013
6014
6015  if [ -z "${CMP+x}" ]; then
6016    # The variable is not set by user, try to locate tool using the code snippet
6017    for ac_prog in cmp
6018do
6019  # Extract the first word of "$ac_prog", so it can be a program name with args.
6020set dummy $ac_prog; ac_word=$2
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6022$as_echo_n "checking for $ac_word... " >&6; }
6023if ${ac_cv_path_CMP+:} false; then :
6024  $as_echo_n "(cached) " >&6
6025else
6026  case $CMP in
6027  [\\/]* | ?:[\\/]*)
6028  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6029  ;;
6030  *)
6031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034  IFS=$as_save_IFS
6035  test -z "$as_dir" && as_dir=.
6036    for ac_exec_ext in '' $ac_executable_extensions; do
6037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6038    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040    break 2
6041  fi
6042done
6043  done
6044IFS=$as_save_IFS
6045
6046  ;;
6047esac
6048fi
6049CMP=$ac_cv_path_CMP
6050if test -n "$CMP"; then
6051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6052$as_echo "$CMP" >&6; }
6053else
6054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
6056fi
6057
6058
6059  test -n "$CMP" && break
6060done
6061
6062  else
6063    # The variable is set, but is it from the command line or the environment?
6064
6065    # Try to remove the string !CMP! from our list.
6066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6068      # If it failed, the variable was not from the command line. Ignore it,
6069      # but warn the user (except for BASH, which is always set by the calling BASH).
6070      if test "xCMP" != xBASH; then
6071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6072$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6073      fi
6074      # Try to locate tool using the code snippet
6075      for ac_prog in cmp
6076do
6077  # Extract the first word of "$ac_prog", so it can be a program name with args.
6078set dummy $ac_prog; ac_word=$2
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080$as_echo_n "checking for $ac_word... " >&6; }
6081if ${ac_cv_path_CMP+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  case $CMP in
6085  [\\/]* | ?:[\\/]*)
6086  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6087  ;;
6088  *)
6089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092  IFS=$as_save_IFS
6093  test -z "$as_dir" && as_dir=.
6094    for ac_exec_ext in '' $ac_executable_extensions; do
6095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6096    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6098    break 2
6099  fi
6100done
6101  done
6102IFS=$as_save_IFS
6103
6104  ;;
6105esac
6106fi
6107CMP=$ac_cv_path_CMP
6108if test -n "$CMP"; then
6109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6110$as_echo "$CMP" >&6; }
6111else
6112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
6114fi
6115
6116
6117  test -n "$CMP" && break
6118done
6119
6120    else
6121      # If it succeeded, then it was overridden by the user. We will use it
6122      # for the tool.
6123
6124      # First remove it from the list of overridden variables, so we can test
6125      # for unknown variables in the end.
6126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6127
6128      # Check if we try to supply an empty value
6129      if test "x$CMP" = x; then
6130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6131$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6133$as_echo_n "checking for CMP... " >&6; }
6134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6135$as_echo "disabled" >&6; }
6136      else
6137        # Check if the provided tool contains a complete path.
6138        tool_specified="$CMP"
6139        tool_basename="${tool_specified##*/}"
6140        if test "x$tool_basename" = "x$tool_specified"; then
6141          # A command without a complete path is provided, search $PATH.
6142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6143$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6144          # Extract the first word of "$tool_basename", so it can be a program name with args.
6145set dummy $tool_basename; ac_word=$2
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
6148if ${ac_cv_path_CMP+:} false; then :
6149  $as_echo_n "(cached) " >&6
6150else
6151  case $CMP in
6152  [\\/]* | ?:[\\/]*)
6153  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6154  ;;
6155  *)
6156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159  IFS=$as_save_IFS
6160  test -z "$as_dir" && as_dir=.
6161    for ac_exec_ext in '' $ac_executable_extensions; do
6162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6163    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165    break 2
6166  fi
6167done
6168  done
6169IFS=$as_save_IFS
6170
6171  ;;
6172esac
6173fi
6174CMP=$ac_cv_path_CMP
6175if test -n "$CMP"; then
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6177$as_echo "$CMP" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182
6183
6184          if test "x$CMP" = x; then
6185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6186          fi
6187        else
6188          # Otherwise we believe it is a complete path. Use it as it is.
6189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6190$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6192$as_echo_n "checking for CMP... " >&6; }
6193          if test ! -x "$tool_specified"; then
6194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6195$as_echo "not found" >&6; }
6196            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6197          fi
6198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6199$as_echo "$tool_specified" >&6; }
6200        fi
6201      fi
6202    fi
6203
6204  fi
6205
6206
6207
6208  if test "x$CMP" = x; then
6209    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6210  fi
6211
6212
6213
6214
6215
6216  # Publish this variable in the help.
6217
6218
6219  if [ -z "${COMM+x}" ]; then
6220    # The variable is not set by user, try to locate tool using the code snippet
6221    for ac_prog in comm
6222do
6223  # Extract the first word of "$ac_prog", so it can be a program name with args.
6224set dummy $ac_prog; ac_word=$2
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226$as_echo_n "checking for $ac_word... " >&6; }
6227if ${ac_cv_path_COMM+:} false; then :
6228  $as_echo_n "(cached) " >&6
6229else
6230  case $COMM in
6231  [\\/]* | ?:[\\/]*)
6232  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6233  ;;
6234  *)
6235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238  IFS=$as_save_IFS
6239  test -z "$as_dir" && as_dir=.
6240    for ac_exec_ext in '' $ac_executable_extensions; do
6241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6242    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244    break 2
6245  fi
6246done
6247  done
6248IFS=$as_save_IFS
6249
6250  ;;
6251esac
6252fi
6253COMM=$ac_cv_path_COMM
6254if test -n "$COMM"; then
6255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6256$as_echo "$COMM" >&6; }
6257else
6258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263  test -n "$COMM" && break
6264done
6265
6266  else
6267    # The variable is set, but is it from the command line or the environment?
6268
6269    # Try to remove the string !COMM! from our list.
6270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6272      # If it failed, the variable was not from the command line. Ignore it,
6273      # but warn the user (except for BASH, which is always set by the calling BASH).
6274      if test "xCOMM" != xBASH; then
6275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6276$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6277      fi
6278      # Try to locate tool using the code snippet
6279      for ac_prog in comm
6280do
6281  # Extract the first word of "$ac_prog", so it can be a program name with args.
6282set dummy $ac_prog; ac_word=$2
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284$as_echo_n "checking for $ac_word... " >&6; }
6285if ${ac_cv_path_COMM+:} false; then :
6286  $as_echo_n "(cached) " >&6
6287else
6288  case $COMM in
6289  [\\/]* | ?:[\\/]*)
6290  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6291  ;;
6292  *)
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6300    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308  ;;
6309esac
6310fi
6311COMM=$ac_cv_path_COMM
6312if test -n "$COMM"; then
6313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6314$as_echo "$COMM" >&6; }
6315else
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318fi
6319
6320
6321  test -n "$COMM" && break
6322done
6323
6324    else
6325      # If it succeeded, then it was overridden by the user. We will use it
6326      # for the tool.
6327
6328      # First remove it from the list of overridden variables, so we can test
6329      # for unknown variables in the end.
6330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6331
6332      # Check if we try to supply an empty value
6333      if test "x$COMM" = x; then
6334        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6335$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6337$as_echo_n "checking for COMM... " >&6; }
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6339$as_echo "disabled" >&6; }
6340      else
6341        # Check if the provided tool contains a complete path.
6342        tool_specified="$COMM"
6343        tool_basename="${tool_specified##*/}"
6344        if test "x$tool_basename" = "x$tool_specified"; then
6345          # A command without a complete path is provided, search $PATH.
6346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6347$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6348          # Extract the first word of "$tool_basename", so it can be a program name with args.
6349set dummy $tool_basename; ac_word=$2
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6351$as_echo_n "checking for $ac_word... " >&6; }
6352if ${ac_cv_path_COMM+:} false; then :
6353  $as_echo_n "(cached) " >&6
6354else
6355  case $COMM in
6356  [\\/]* | ?:[\\/]*)
6357  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6358  ;;
6359  *)
6360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361for as_dir in $PATH
6362do
6363  IFS=$as_save_IFS
6364  test -z "$as_dir" && as_dir=.
6365    for ac_exec_ext in '' $ac_executable_extensions; do
6366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6367    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369    break 2
6370  fi
6371done
6372  done
6373IFS=$as_save_IFS
6374
6375  ;;
6376esac
6377fi
6378COMM=$ac_cv_path_COMM
6379if test -n "$COMM"; then
6380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6381$as_echo "$COMM" >&6; }
6382else
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
6387
6388          if test "x$COMM" = x; then
6389            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6390          fi
6391        else
6392          # Otherwise we believe it is a complete path. Use it as it is.
6393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6394$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6395          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6396$as_echo_n "checking for COMM... " >&6; }
6397          if test ! -x "$tool_specified"; then
6398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6399$as_echo "not found" >&6; }
6400            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6401          fi
6402          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6403$as_echo "$tool_specified" >&6; }
6404        fi
6405      fi
6406    fi
6407
6408  fi
6409
6410
6411
6412  if test "x$COMM" = x; then
6413    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6414  fi
6415
6416
6417
6418
6419
6420  # Publish this variable in the help.
6421
6422
6423  if [ -z "${CP+x}" ]; then
6424    # The variable is not set by user, try to locate tool using the code snippet
6425    for ac_prog in cp
6426do
6427  # Extract the first word of "$ac_prog", so it can be a program name with args.
6428set dummy $ac_prog; ac_word=$2
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430$as_echo_n "checking for $ac_word... " >&6; }
6431if ${ac_cv_path_CP+:} false; then :
6432  $as_echo_n "(cached) " >&6
6433else
6434  case $CP in
6435  [\\/]* | ?:[\\/]*)
6436  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6437  ;;
6438  *)
6439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440for as_dir in $PATH
6441do
6442  IFS=$as_save_IFS
6443  test -z "$as_dir" && as_dir=.
6444    for ac_exec_ext in '' $ac_executable_extensions; do
6445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448    break 2
6449  fi
6450done
6451  done
6452IFS=$as_save_IFS
6453
6454  ;;
6455esac
6456fi
6457CP=$ac_cv_path_CP
6458if test -n "$CP"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6460$as_echo "$CP" >&6; }
6461else
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466
6467  test -n "$CP" && break
6468done
6469
6470  else
6471    # The variable is set, but is it from the command line or the environment?
6472
6473    # Try to remove the string !CP! from our list.
6474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6476      # If it failed, the variable was not from the command line. Ignore it,
6477      # but warn the user (except for BASH, which is always set by the calling BASH).
6478      if test "xCP" != xBASH; then
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6480$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6481      fi
6482      # Try to locate tool using the code snippet
6483      for ac_prog in cp
6484do
6485  # Extract the first word of "$ac_prog", so it can be a program name with args.
6486set dummy $ac_prog; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_CP+:} false; then :
6490  $as_echo_n "(cached) " >&6
6491else
6492  case $CP in
6493  [\\/]* | ?:[\\/]*)
6494  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6495  ;;
6496  *)
6497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500  IFS=$as_save_IFS
6501  test -z "$as_dir" && as_dir=.
6502    for ac_exec_ext in '' $ac_executable_extensions; do
6503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506    break 2
6507  fi
6508done
6509  done
6510IFS=$as_save_IFS
6511
6512  ;;
6513esac
6514fi
6515CP=$ac_cv_path_CP
6516if test -n "$CP"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6518$as_echo "$CP" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525  test -n "$CP" && break
6526done
6527
6528    else
6529      # If it succeeded, then it was overridden by the user. We will use it
6530      # for the tool.
6531
6532      # First remove it from the list of overridden variables, so we can test
6533      # for unknown variables in the end.
6534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6535
6536      # Check if we try to supply an empty value
6537      if test "x$CP" = x; then
6538        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6539$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6541$as_echo_n "checking for CP... " >&6; }
6542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6543$as_echo "disabled" >&6; }
6544      else
6545        # Check if the provided tool contains a complete path.
6546        tool_specified="$CP"
6547        tool_basename="${tool_specified##*/}"
6548        if test "x$tool_basename" = "x$tool_specified"; then
6549          # A command without a complete path is provided, search $PATH.
6550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6551$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6552          # Extract the first word of "$tool_basename", so it can be a program name with args.
6553set dummy $tool_basename; ac_word=$2
6554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6555$as_echo_n "checking for $ac_word... " >&6; }
6556if ${ac_cv_path_CP+:} false; then :
6557  $as_echo_n "(cached) " >&6
6558else
6559  case $CP in
6560  [\\/]* | ?:[\\/]*)
6561  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6562  ;;
6563  *)
6564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565for as_dir in $PATH
6566do
6567  IFS=$as_save_IFS
6568  test -z "$as_dir" && as_dir=.
6569    for ac_exec_ext in '' $ac_executable_extensions; do
6570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6571    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6573    break 2
6574  fi
6575done
6576  done
6577IFS=$as_save_IFS
6578
6579  ;;
6580esac
6581fi
6582CP=$ac_cv_path_CP
6583if test -n "$CP"; then
6584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6585$as_echo "$CP" >&6; }
6586else
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588$as_echo "no" >&6; }
6589fi
6590
6591
6592          if test "x$CP" = x; then
6593            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6594          fi
6595        else
6596          # Otherwise we believe it is a complete path. Use it as it is.
6597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6598$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6600$as_echo_n "checking for CP... " >&6; }
6601          if test ! -x "$tool_specified"; then
6602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6603$as_echo "not found" >&6; }
6604            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6605          fi
6606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6607$as_echo "$tool_specified" >&6; }
6608        fi
6609      fi
6610    fi
6611
6612  fi
6613
6614
6615
6616  if test "x$CP" = x; then
6617    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6618  fi
6619
6620
6621
6622
6623
6624  # Publish this variable in the help.
6625
6626
6627  if [ -z "${CUT+x}" ]; then
6628    # The variable is not set by user, try to locate tool using the code snippet
6629    for ac_prog in cut
6630do
6631  # Extract the first word of "$ac_prog", so it can be a program name with args.
6632set dummy $ac_prog; ac_word=$2
6633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6634$as_echo_n "checking for $ac_word... " >&6; }
6635if ${ac_cv_path_CUT+:} false; then :
6636  $as_echo_n "(cached) " >&6
6637else
6638  case $CUT in
6639  [\\/]* | ?:[\\/]*)
6640  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6641  ;;
6642  *)
6643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6644for as_dir in $PATH
6645do
6646  IFS=$as_save_IFS
6647  test -z "$as_dir" && as_dir=.
6648    for ac_exec_ext in '' $ac_executable_extensions; do
6649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6650    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6652    break 2
6653  fi
6654done
6655  done
6656IFS=$as_save_IFS
6657
6658  ;;
6659esac
6660fi
6661CUT=$ac_cv_path_CUT
6662if test -n "$CUT"; then
6663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6664$as_echo "$CUT" >&6; }
6665else
6666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6667$as_echo "no" >&6; }
6668fi
6669
6670
6671  test -n "$CUT" && break
6672done
6673
6674  else
6675    # The variable is set, but is it from the command line or the environment?
6676
6677    # Try to remove the string !CUT! from our list.
6678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6680      # If it failed, the variable was not from the command line. Ignore it,
6681      # but warn the user (except for BASH, which is always set by the calling BASH).
6682      if test "xCUT" != xBASH; then
6683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6684$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6685      fi
6686      # Try to locate tool using the code snippet
6687      for ac_prog in cut
6688do
6689  # Extract the first word of "$ac_prog", so it can be a program name with args.
6690set dummy $ac_prog; ac_word=$2
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6692$as_echo_n "checking for $ac_word... " >&6; }
6693if ${ac_cv_path_CUT+:} false; then :
6694  $as_echo_n "(cached) " >&6
6695else
6696  case $CUT in
6697  [\\/]* | ?:[\\/]*)
6698  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6699  ;;
6700  *)
6701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6702for as_dir in $PATH
6703do
6704  IFS=$as_save_IFS
6705  test -z "$as_dir" && as_dir=.
6706    for ac_exec_ext in '' $ac_executable_extensions; do
6707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6708    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6710    break 2
6711  fi
6712done
6713  done
6714IFS=$as_save_IFS
6715
6716  ;;
6717esac
6718fi
6719CUT=$ac_cv_path_CUT
6720if test -n "$CUT"; then
6721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6722$as_echo "$CUT" >&6; }
6723else
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727
6728
6729  test -n "$CUT" && break
6730done
6731
6732    else
6733      # If it succeeded, then it was overridden by the user. We will use it
6734      # for the tool.
6735
6736      # First remove it from the list of overridden variables, so we can test
6737      # for unknown variables in the end.
6738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6739
6740      # Check if we try to supply an empty value
6741      if test "x$CUT" = x; then
6742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6743$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6745$as_echo_n "checking for CUT... " >&6; }
6746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6747$as_echo "disabled" >&6; }
6748      else
6749        # Check if the provided tool contains a complete path.
6750        tool_specified="$CUT"
6751        tool_basename="${tool_specified##*/}"
6752        if test "x$tool_basename" = "x$tool_specified"; then
6753          # A command without a complete path is provided, search $PATH.
6754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6755$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6756          # Extract the first word of "$tool_basename", so it can be a program name with args.
6757set dummy $tool_basename; ac_word=$2
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6759$as_echo_n "checking for $ac_word... " >&6; }
6760if ${ac_cv_path_CUT+:} false; then :
6761  $as_echo_n "(cached) " >&6
6762else
6763  case $CUT in
6764  [\\/]* | ?:[\\/]*)
6765  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6766  ;;
6767  *)
6768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6769for as_dir in $PATH
6770do
6771  IFS=$as_save_IFS
6772  test -z "$as_dir" && as_dir=.
6773    for ac_exec_ext in '' $ac_executable_extensions; do
6774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6775    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6777    break 2
6778  fi
6779done
6780  done
6781IFS=$as_save_IFS
6782
6783  ;;
6784esac
6785fi
6786CUT=$ac_cv_path_CUT
6787if test -n "$CUT"; then
6788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6789$as_echo "$CUT" >&6; }
6790else
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792$as_echo "no" >&6; }
6793fi
6794
6795
6796          if test "x$CUT" = x; then
6797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6798          fi
6799        else
6800          # Otherwise we believe it is a complete path. Use it as it is.
6801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6802$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6804$as_echo_n "checking for CUT... " >&6; }
6805          if test ! -x "$tool_specified"; then
6806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6807$as_echo "not found" >&6; }
6808            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6809          fi
6810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6811$as_echo "$tool_specified" >&6; }
6812        fi
6813      fi
6814    fi
6815
6816  fi
6817
6818
6819
6820  if test "x$CUT" = x; then
6821    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6822  fi
6823
6824
6825
6826
6827
6828  # Publish this variable in the help.
6829
6830
6831  if [ -z "${DATE+x}" ]; then
6832    # The variable is not set by user, try to locate tool using the code snippet
6833    for ac_prog in date
6834do
6835  # Extract the first word of "$ac_prog", so it can be a program name with args.
6836set dummy $ac_prog; ac_word=$2
6837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6838$as_echo_n "checking for $ac_word... " >&6; }
6839if ${ac_cv_path_DATE+:} false; then :
6840  $as_echo_n "(cached) " >&6
6841else
6842  case $DATE in
6843  [\\/]* | ?:[\\/]*)
6844  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6845  ;;
6846  *)
6847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6848for as_dir in $PATH
6849do
6850  IFS=$as_save_IFS
6851  test -z "$as_dir" && as_dir=.
6852    for ac_exec_ext in '' $ac_executable_extensions; do
6853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6854    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6856    break 2
6857  fi
6858done
6859  done
6860IFS=$as_save_IFS
6861
6862  ;;
6863esac
6864fi
6865DATE=$ac_cv_path_DATE
6866if test -n "$DATE"; then
6867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6868$as_echo "$DATE" >&6; }
6869else
6870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6871$as_echo "no" >&6; }
6872fi
6873
6874
6875  test -n "$DATE" && break
6876done
6877
6878  else
6879    # The variable is set, but is it from the command line or the environment?
6880
6881    # Try to remove the string !DATE! from our list.
6882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6884      # If it failed, the variable was not from the command line. Ignore it,
6885      # but warn the user (except for BASH, which is always set by the calling BASH).
6886      if test "xDATE" != xBASH; then
6887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6888$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6889      fi
6890      # Try to locate tool using the code snippet
6891      for ac_prog in date
6892do
6893  # Extract the first word of "$ac_prog", so it can be a program name with args.
6894set dummy $ac_prog; ac_word=$2
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6896$as_echo_n "checking for $ac_word... " >&6; }
6897if ${ac_cv_path_DATE+:} false; then :
6898  $as_echo_n "(cached) " >&6
6899else
6900  case $DATE in
6901  [\\/]* | ?:[\\/]*)
6902  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6903  ;;
6904  *)
6905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6906for as_dir in $PATH
6907do
6908  IFS=$as_save_IFS
6909  test -z "$as_dir" && as_dir=.
6910    for ac_exec_ext in '' $ac_executable_extensions; do
6911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6912    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6914    break 2
6915  fi
6916done
6917  done
6918IFS=$as_save_IFS
6919
6920  ;;
6921esac
6922fi
6923DATE=$ac_cv_path_DATE
6924if test -n "$DATE"; then
6925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6926$as_echo "$DATE" >&6; }
6927else
6928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929$as_echo "no" >&6; }
6930fi
6931
6932
6933  test -n "$DATE" && break
6934done
6935
6936    else
6937      # If it succeeded, then it was overridden by the user. We will use it
6938      # for the tool.
6939
6940      # First remove it from the list of overridden variables, so we can test
6941      # for unknown variables in the end.
6942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6943
6944      # Check if we try to supply an empty value
6945      if test "x$DATE" = x; then
6946        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6947$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6949$as_echo_n "checking for DATE... " >&6; }
6950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6951$as_echo "disabled" >&6; }
6952      else
6953        # Check if the provided tool contains a complete path.
6954        tool_specified="$DATE"
6955        tool_basename="${tool_specified##*/}"
6956        if test "x$tool_basename" = "x$tool_specified"; then
6957          # A command without a complete path is provided, search $PATH.
6958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6959$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6960          # Extract the first word of "$tool_basename", so it can be a program name with args.
6961set dummy $tool_basename; ac_word=$2
6962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6963$as_echo_n "checking for $ac_word... " >&6; }
6964if ${ac_cv_path_DATE+:} false; then :
6965  $as_echo_n "(cached) " >&6
6966else
6967  case $DATE in
6968  [\\/]* | ?:[\\/]*)
6969  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6970  ;;
6971  *)
6972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6973for as_dir in $PATH
6974do
6975  IFS=$as_save_IFS
6976  test -z "$as_dir" && as_dir=.
6977    for ac_exec_ext in '' $ac_executable_extensions; do
6978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6979    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6981    break 2
6982  fi
6983done
6984  done
6985IFS=$as_save_IFS
6986
6987  ;;
6988esac
6989fi
6990DATE=$ac_cv_path_DATE
6991if test -n "$DATE"; then
6992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6993$as_echo "$DATE" >&6; }
6994else
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6996$as_echo "no" >&6; }
6997fi
6998
6999
7000          if test "x$DATE" = x; then
7001            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7002          fi
7003        else
7004          # Otherwise we believe it is a complete path. Use it as it is.
7005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7006$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7007          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7008$as_echo_n "checking for DATE... " >&6; }
7009          if test ! -x "$tool_specified"; then
7010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7011$as_echo "not found" >&6; }
7012            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7013          fi
7014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7015$as_echo "$tool_specified" >&6; }
7016        fi
7017      fi
7018    fi
7019
7020  fi
7021
7022
7023
7024  if test "x$DATE" = x; then
7025    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7026  fi
7027
7028
7029
7030
7031
7032  # Publish this variable in the help.
7033
7034
7035  if [ -z "${DIFF+x}" ]; then
7036    # The variable is not set by user, try to locate tool using the code snippet
7037    for ac_prog in gdiff diff
7038do
7039  # Extract the first word of "$ac_prog", so it can be a program name with args.
7040set dummy $ac_prog; ac_word=$2
7041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7042$as_echo_n "checking for $ac_word... " >&6; }
7043if ${ac_cv_path_DIFF+:} false; then :
7044  $as_echo_n "(cached) " >&6
7045else
7046  case $DIFF in
7047  [\\/]* | ?:[\\/]*)
7048  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7049  ;;
7050  *)
7051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7052for as_dir in $PATH
7053do
7054  IFS=$as_save_IFS
7055  test -z "$as_dir" && as_dir=.
7056    for ac_exec_ext in '' $ac_executable_extensions; do
7057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7058    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7060    break 2
7061  fi
7062done
7063  done
7064IFS=$as_save_IFS
7065
7066  ;;
7067esac
7068fi
7069DIFF=$ac_cv_path_DIFF
7070if test -n "$DIFF"; then
7071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7072$as_echo "$DIFF" >&6; }
7073else
7074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7075$as_echo "no" >&6; }
7076fi
7077
7078
7079  test -n "$DIFF" && break
7080done
7081
7082  else
7083    # The variable is set, but is it from the command line or the environment?
7084
7085    # Try to remove the string !DIFF! from our list.
7086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7088      # If it failed, the variable was not from the command line. Ignore it,
7089      # but warn the user (except for BASH, which is always set by the calling BASH).
7090      if test "xDIFF" != xBASH; then
7091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7092$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7093      fi
7094      # Try to locate tool using the code snippet
7095      for ac_prog in gdiff diff
7096do
7097  # Extract the first word of "$ac_prog", so it can be a program name with args.
7098set dummy $ac_prog; ac_word=$2
7099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7100$as_echo_n "checking for $ac_word... " >&6; }
7101if ${ac_cv_path_DIFF+:} false; then :
7102  $as_echo_n "(cached) " >&6
7103else
7104  case $DIFF in
7105  [\\/]* | ?:[\\/]*)
7106  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7107  ;;
7108  *)
7109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7110for as_dir in $PATH
7111do
7112  IFS=$as_save_IFS
7113  test -z "$as_dir" && as_dir=.
7114    for ac_exec_ext in '' $ac_executable_extensions; do
7115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7116    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7118    break 2
7119  fi
7120done
7121  done
7122IFS=$as_save_IFS
7123
7124  ;;
7125esac
7126fi
7127DIFF=$ac_cv_path_DIFF
7128if test -n "$DIFF"; then
7129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7130$as_echo "$DIFF" >&6; }
7131else
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133$as_echo "no" >&6; }
7134fi
7135
7136
7137  test -n "$DIFF" && break
7138done
7139
7140    else
7141      # If it succeeded, then it was overridden by the user. We will use it
7142      # for the tool.
7143
7144      # First remove it from the list of overridden variables, so we can test
7145      # for unknown variables in the end.
7146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7147
7148      # Check if we try to supply an empty value
7149      if test "x$DIFF" = x; then
7150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7151$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7153$as_echo_n "checking for DIFF... " >&6; }
7154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7155$as_echo "disabled" >&6; }
7156      else
7157        # Check if the provided tool contains a complete path.
7158        tool_specified="$DIFF"
7159        tool_basename="${tool_specified##*/}"
7160        if test "x$tool_basename" = "x$tool_specified"; then
7161          # A command without a complete path is provided, search $PATH.
7162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7163$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7164          # Extract the first word of "$tool_basename", so it can be a program name with args.
7165set dummy $tool_basename; ac_word=$2
7166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7167$as_echo_n "checking for $ac_word... " >&6; }
7168if ${ac_cv_path_DIFF+:} false; then :
7169  $as_echo_n "(cached) " >&6
7170else
7171  case $DIFF in
7172  [\\/]* | ?:[\\/]*)
7173  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7174  ;;
7175  *)
7176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7177for as_dir in $PATH
7178do
7179  IFS=$as_save_IFS
7180  test -z "$as_dir" && as_dir=.
7181    for ac_exec_ext in '' $ac_executable_extensions; do
7182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7183    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7185    break 2
7186  fi
7187done
7188  done
7189IFS=$as_save_IFS
7190
7191  ;;
7192esac
7193fi
7194DIFF=$ac_cv_path_DIFF
7195if test -n "$DIFF"; then
7196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7197$as_echo "$DIFF" >&6; }
7198else
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7200$as_echo "no" >&6; }
7201fi
7202
7203
7204          if test "x$DIFF" = x; then
7205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7206          fi
7207        else
7208          # Otherwise we believe it is a complete path. Use it as it is.
7209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7210$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7212$as_echo_n "checking for DIFF... " >&6; }
7213          if test ! -x "$tool_specified"; then
7214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7215$as_echo "not found" >&6; }
7216            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7217          fi
7218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7219$as_echo "$tool_specified" >&6; }
7220        fi
7221      fi
7222    fi
7223
7224  fi
7225
7226
7227
7228  if test "x$DIFF" = x; then
7229    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7230  fi
7231
7232
7233
7234
7235
7236  # Publish this variable in the help.
7237
7238
7239  if [ -z "${DIRNAME+x}" ]; then
7240    # The variable is not set by user, try to locate tool using the code snippet
7241    for ac_prog in dirname
7242do
7243  # Extract the first word of "$ac_prog", so it can be a program name with args.
7244set dummy $ac_prog; ac_word=$2
7245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7246$as_echo_n "checking for $ac_word... " >&6; }
7247if ${ac_cv_path_DIRNAME+:} false; then :
7248  $as_echo_n "(cached) " >&6
7249else
7250  case $DIRNAME in
7251  [\\/]* | ?:[\\/]*)
7252  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7253  ;;
7254  *)
7255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7256for as_dir in $PATH
7257do
7258  IFS=$as_save_IFS
7259  test -z "$as_dir" && as_dir=.
7260    for ac_exec_ext in '' $ac_executable_extensions; do
7261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7262    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7264    break 2
7265  fi
7266done
7267  done
7268IFS=$as_save_IFS
7269
7270  ;;
7271esac
7272fi
7273DIRNAME=$ac_cv_path_DIRNAME
7274if test -n "$DIRNAME"; then
7275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7276$as_echo "$DIRNAME" >&6; }
7277else
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7279$as_echo "no" >&6; }
7280fi
7281
7282
7283  test -n "$DIRNAME" && break
7284done
7285
7286  else
7287    # The variable is set, but is it from the command line or the environment?
7288
7289    # Try to remove the string !DIRNAME! from our list.
7290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7292      # If it failed, the variable was not from the command line. Ignore it,
7293      # but warn the user (except for BASH, which is always set by the calling BASH).
7294      if test "xDIRNAME" != xBASH; then
7295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7296$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7297      fi
7298      # Try to locate tool using the code snippet
7299      for ac_prog in dirname
7300do
7301  # Extract the first word of "$ac_prog", so it can be a program name with args.
7302set dummy $ac_prog; ac_word=$2
7303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7304$as_echo_n "checking for $ac_word... " >&6; }
7305if ${ac_cv_path_DIRNAME+:} false; then :
7306  $as_echo_n "(cached) " >&6
7307else
7308  case $DIRNAME in
7309  [\\/]* | ?:[\\/]*)
7310  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7311  ;;
7312  *)
7313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7314for as_dir in $PATH
7315do
7316  IFS=$as_save_IFS
7317  test -z "$as_dir" && as_dir=.
7318    for ac_exec_ext in '' $ac_executable_extensions; do
7319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7320    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7322    break 2
7323  fi
7324done
7325  done
7326IFS=$as_save_IFS
7327
7328  ;;
7329esac
7330fi
7331DIRNAME=$ac_cv_path_DIRNAME
7332if test -n "$DIRNAME"; then
7333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7334$as_echo "$DIRNAME" >&6; }
7335else
7336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337$as_echo "no" >&6; }
7338fi
7339
7340
7341  test -n "$DIRNAME" && break
7342done
7343
7344    else
7345      # If it succeeded, then it was overridden by the user. We will use it
7346      # for the tool.
7347
7348      # First remove it from the list of overridden variables, so we can test
7349      # for unknown variables in the end.
7350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7351
7352      # Check if we try to supply an empty value
7353      if test "x$DIRNAME" = x; then
7354        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7355$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7357$as_echo_n "checking for DIRNAME... " >&6; }
7358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7359$as_echo "disabled" >&6; }
7360      else
7361        # Check if the provided tool contains a complete path.
7362        tool_specified="$DIRNAME"
7363        tool_basename="${tool_specified##*/}"
7364        if test "x$tool_basename" = "x$tool_specified"; then
7365          # A command without a complete path is provided, search $PATH.
7366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7367$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7368          # Extract the first word of "$tool_basename", so it can be a program name with args.
7369set dummy $tool_basename; ac_word=$2
7370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7371$as_echo_n "checking for $ac_word... " >&6; }
7372if ${ac_cv_path_DIRNAME+:} false; then :
7373  $as_echo_n "(cached) " >&6
7374else
7375  case $DIRNAME in
7376  [\\/]* | ?:[\\/]*)
7377  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7378  ;;
7379  *)
7380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7381for as_dir in $PATH
7382do
7383  IFS=$as_save_IFS
7384  test -z "$as_dir" && as_dir=.
7385    for ac_exec_ext in '' $ac_executable_extensions; do
7386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7387    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7389    break 2
7390  fi
7391done
7392  done
7393IFS=$as_save_IFS
7394
7395  ;;
7396esac
7397fi
7398DIRNAME=$ac_cv_path_DIRNAME
7399if test -n "$DIRNAME"; then
7400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7401$as_echo "$DIRNAME" >&6; }
7402else
7403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404$as_echo "no" >&6; }
7405fi
7406
7407
7408          if test "x$DIRNAME" = x; then
7409            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7410          fi
7411        else
7412          # Otherwise we believe it is a complete path. Use it as it is.
7413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7414$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7415          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7416$as_echo_n "checking for DIRNAME... " >&6; }
7417          if test ! -x "$tool_specified"; then
7418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7419$as_echo "not found" >&6; }
7420            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7421          fi
7422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7423$as_echo "$tool_specified" >&6; }
7424        fi
7425      fi
7426    fi
7427
7428  fi
7429
7430
7431
7432  if test "x$DIRNAME" = x; then
7433    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7434  fi
7435
7436
7437
7438
7439
7440  # Publish this variable in the help.
7441
7442
7443  if [ -z "${ECHO+x}" ]; then
7444    # The variable is not set by user, try to locate tool using the code snippet
7445    for ac_prog in echo
7446do
7447  # Extract the first word of "$ac_prog", so it can be a program name with args.
7448set dummy $ac_prog; ac_word=$2
7449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7450$as_echo_n "checking for $ac_word... " >&6; }
7451if ${ac_cv_path_ECHO+:} false; then :
7452  $as_echo_n "(cached) " >&6
7453else
7454  case $ECHO in
7455  [\\/]* | ?:[\\/]*)
7456  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7457  ;;
7458  *)
7459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7460for as_dir in $PATH
7461do
7462  IFS=$as_save_IFS
7463  test -z "$as_dir" && as_dir=.
7464    for ac_exec_ext in '' $ac_executable_extensions; do
7465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7466    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7468    break 2
7469  fi
7470done
7471  done
7472IFS=$as_save_IFS
7473
7474  ;;
7475esac
7476fi
7477ECHO=$ac_cv_path_ECHO
7478if test -n "$ECHO"; then
7479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7480$as_echo "$ECHO" >&6; }
7481else
7482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7483$as_echo "no" >&6; }
7484fi
7485
7486
7487  test -n "$ECHO" && break
7488done
7489
7490  else
7491    # The variable is set, but is it from the command line or the environment?
7492
7493    # Try to remove the string !ECHO! from our list.
7494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7496      # If it failed, the variable was not from the command line. Ignore it,
7497      # but warn the user (except for BASH, which is always set by the calling BASH).
7498      if test "xECHO" != xBASH; then
7499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7500$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7501      fi
7502      # Try to locate tool using the code snippet
7503      for ac_prog in echo
7504do
7505  # Extract the first word of "$ac_prog", so it can be a program name with args.
7506set dummy $ac_prog; ac_word=$2
7507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7508$as_echo_n "checking for $ac_word... " >&6; }
7509if ${ac_cv_path_ECHO+:} false; then :
7510  $as_echo_n "(cached) " >&6
7511else
7512  case $ECHO in
7513  [\\/]* | ?:[\\/]*)
7514  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7515  ;;
7516  *)
7517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7518for as_dir in $PATH
7519do
7520  IFS=$as_save_IFS
7521  test -z "$as_dir" && as_dir=.
7522    for ac_exec_ext in '' $ac_executable_extensions; do
7523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7524    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7526    break 2
7527  fi
7528done
7529  done
7530IFS=$as_save_IFS
7531
7532  ;;
7533esac
7534fi
7535ECHO=$ac_cv_path_ECHO
7536if test -n "$ECHO"; then
7537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7538$as_echo "$ECHO" >&6; }
7539else
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7541$as_echo "no" >&6; }
7542fi
7543
7544
7545  test -n "$ECHO" && break
7546done
7547
7548    else
7549      # If it succeeded, then it was overridden by the user. We will use it
7550      # for the tool.
7551
7552      # First remove it from the list of overridden variables, so we can test
7553      # for unknown variables in the end.
7554      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7555
7556      # Check if we try to supply an empty value
7557      if test "x$ECHO" = x; then
7558        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7559$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7561$as_echo_n "checking for ECHO... " >&6; }
7562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7563$as_echo "disabled" >&6; }
7564      else
7565        # Check if the provided tool contains a complete path.
7566        tool_specified="$ECHO"
7567        tool_basename="${tool_specified##*/}"
7568        if test "x$tool_basename" = "x$tool_specified"; then
7569          # A command without a complete path is provided, search $PATH.
7570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7571$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7572          # Extract the first word of "$tool_basename", so it can be a program name with args.
7573set dummy $tool_basename; ac_word=$2
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7575$as_echo_n "checking for $ac_word... " >&6; }
7576if ${ac_cv_path_ECHO+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  case $ECHO in
7580  [\\/]* | ?:[\\/]*)
7581  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7582  ;;
7583  *)
7584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587  IFS=$as_save_IFS
7588  test -z "$as_dir" && as_dir=.
7589    for ac_exec_ext in '' $ac_executable_extensions; do
7590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7591    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7593    break 2
7594  fi
7595done
7596  done
7597IFS=$as_save_IFS
7598
7599  ;;
7600esac
7601fi
7602ECHO=$ac_cv_path_ECHO
7603if test -n "$ECHO"; then
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7605$as_echo "$ECHO" >&6; }
7606else
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
7609fi
7610
7611
7612          if test "x$ECHO" = x; then
7613            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7614          fi
7615        else
7616          # Otherwise we believe it is a complete path. Use it as it is.
7617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7618$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7619          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7620$as_echo_n "checking for ECHO... " >&6; }
7621          if test ! -x "$tool_specified"; then
7622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7623$as_echo "not found" >&6; }
7624            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7625          fi
7626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7627$as_echo "$tool_specified" >&6; }
7628        fi
7629      fi
7630    fi
7631
7632  fi
7633
7634
7635
7636  if test "x$ECHO" = x; then
7637    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7638  fi
7639
7640
7641
7642
7643
7644  # Publish this variable in the help.
7645
7646
7647  if [ -z "${EXPR+x}" ]; then
7648    # The variable is not set by user, try to locate tool using the code snippet
7649    for ac_prog in expr
7650do
7651  # Extract the first word of "$ac_prog", so it can be a program name with args.
7652set dummy $ac_prog; ac_word=$2
7653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7654$as_echo_n "checking for $ac_word... " >&6; }
7655if ${ac_cv_path_EXPR+:} false; then :
7656  $as_echo_n "(cached) " >&6
7657else
7658  case $EXPR in
7659  [\\/]* | ?:[\\/]*)
7660  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7661  ;;
7662  *)
7663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7664for as_dir in $PATH
7665do
7666  IFS=$as_save_IFS
7667  test -z "$as_dir" && as_dir=.
7668    for ac_exec_ext in '' $ac_executable_extensions; do
7669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7670    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7672    break 2
7673  fi
7674done
7675  done
7676IFS=$as_save_IFS
7677
7678  ;;
7679esac
7680fi
7681EXPR=$ac_cv_path_EXPR
7682if test -n "$EXPR"; then
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7684$as_echo "$EXPR" >&6; }
7685else
7686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7687$as_echo "no" >&6; }
7688fi
7689
7690
7691  test -n "$EXPR" && break
7692done
7693
7694  else
7695    # The variable is set, but is it from the command line or the environment?
7696
7697    # Try to remove the string !EXPR! from our list.
7698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7700      # If it failed, the variable was not from the command line. Ignore it,
7701      # but warn the user (except for BASH, which is always set by the calling BASH).
7702      if test "xEXPR" != xBASH; then
7703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7704$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7705      fi
7706      # Try to locate tool using the code snippet
7707      for ac_prog in expr
7708do
7709  # Extract the first word of "$ac_prog", so it can be a program name with args.
7710set dummy $ac_prog; ac_word=$2
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
7713if ${ac_cv_path_EXPR+:} false; then :
7714  $as_echo_n "(cached) " >&6
7715else
7716  case $EXPR in
7717  [\\/]* | ?:[\\/]*)
7718  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7719  ;;
7720  *)
7721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7722for as_dir in $PATH
7723do
7724  IFS=$as_save_IFS
7725  test -z "$as_dir" && as_dir=.
7726    for ac_exec_ext in '' $ac_executable_extensions; do
7727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7728    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7730    break 2
7731  fi
7732done
7733  done
7734IFS=$as_save_IFS
7735
7736  ;;
7737esac
7738fi
7739EXPR=$ac_cv_path_EXPR
7740if test -n "$EXPR"; then
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7742$as_echo "$EXPR" >&6; }
7743else
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
7746fi
7747
7748
7749  test -n "$EXPR" && break
7750done
7751
7752    else
7753      # If it succeeded, then it was overridden by the user. We will use it
7754      # for the tool.
7755
7756      # First remove it from the list of overridden variables, so we can test
7757      # for unknown variables in the end.
7758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7759
7760      # Check if we try to supply an empty value
7761      if test "x$EXPR" = x; then
7762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7763$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7765$as_echo_n "checking for EXPR... " >&6; }
7766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7767$as_echo "disabled" >&6; }
7768      else
7769        # Check if the provided tool contains a complete path.
7770        tool_specified="$EXPR"
7771        tool_basename="${tool_specified##*/}"
7772        if test "x$tool_basename" = "x$tool_specified"; then
7773          # A command without a complete path is provided, search $PATH.
7774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7775$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7776          # Extract the first word of "$tool_basename", so it can be a program name with args.
7777set dummy $tool_basename; ac_word=$2
7778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7779$as_echo_n "checking for $ac_word... " >&6; }
7780if ${ac_cv_path_EXPR+:} false; then :
7781  $as_echo_n "(cached) " >&6
7782else
7783  case $EXPR in
7784  [\\/]* | ?:[\\/]*)
7785  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7786  ;;
7787  *)
7788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7789for as_dir in $PATH
7790do
7791  IFS=$as_save_IFS
7792  test -z "$as_dir" && as_dir=.
7793    for ac_exec_ext in '' $ac_executable_extensions; do
7794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7795    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7797    break 2
7798  fi
7799done
7800  done
7801IFS=$as_save_IFS
7802
7803  ;;
7804esac
7805fi
7806EXPR=$ac_cv_path_EXPR
7807if test -n "$EXPR"; then
7808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7809$as_echo "$EXPR" >&6; }
7810else
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7812$as_echo "no" >&6; }
7813fi
7814
7815
7816          if test "x$EXPR" = x; then
7817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7818          fi
7819        else
7820          # Otherwise we believe it is a complete path. Use it as it is.
7821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7822$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7824$as_echo_n "checking for EXPR... " >&6; }
7825          if test ! -x "$tool_specified"; then
7826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7827$as_echo "not found" >&6; }
7828            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7829          fi
7830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7831$as_echo "$tool_specified" >&6; }
7832        fi
7833      fi
7834    fi
7835
7836  fi
7837
7838
7839
7840  if test "x$EXPR" = x; then
7841    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7842  fi
7843
7844
7845
7846
7847
7848  # Publish this variable in the help.
7849
7850
7851  if [ -z "${FILE+x}" ]; then
7852    # The variable is not set by user, try to locate tool using the code snippet
7853    for ac_prog in file
7854do
7855  # Extract the first word of "$ac_prog", so it can be a program name with args.
7856set dummy $ac_prog; ac_word=$2
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7858$as_echo_n "checking for $ac_word... " >&6; }
7859if ${ac_cv_path_FILE+:} false; then :
7860  $as_echo_n "(cached) " >&6
7861else
7862  case $FILE in
7863  [\\/]* | ?:[\\/]*)
7864  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7865  ;;
7866  *)
7867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7868for as_dir in $PATH
7869do
7870  IFS=$as_save_IFS
7871  test -z "$as_dir" && as_dir=.
7872    for ac_exec_ext in '' $ac_executable_extensions; do
7873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7874    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7876    break 2
7877  fi
7878done
7879  done
7880IFS=$as_save_IFS
7881
7882  ;;
7883esac
7884fi
7885FILE=$ac_cv_path_FILE
7886if test -n "$FILE"; then
7887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7888$as_echo "$FILE" >&6; }
7889else
7890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7891$as_echo "no" >&6; }
7892fi
7893
7894
7895  test -n "$FILE" && break
7896done
7897
7898  else
7899    # The variable is set, but is it from the command line or the environment?
7900
7901    # Try to remove the string !FILE! from our list.
7902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7904      # If it failed, the variable was not from the command line. Ignore it,
7905      # but warn the user (except for BASH, which is always set by the calling BASH).
7906      if test "xFILE" != xBASH; then
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7908$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7909      fi
7910      # Try to locate tool using the code snippet
7911      for ac_prog in file
7912do
7913  # Extract the first word of "$ac_prog", so it can be a program name with args.
7914set dummy $ac_prog; ac_word=$2
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7916$as_echo_n "checking for $ac_word... " >&6; }
7917if ${ac_cv_path_FILE+:} false; then :
7918  $as_echo_n "(cached) " >&6
7919else
7920  case $FILE in
7921  [\\/]* | ?:[\\/]*)
7922  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7923  ;;
7924  *)
7925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7926for as_dir in $PATH
7927do
7928  IFS=$as_save_IFS
7929  test -z "$as_dir" && as_dir=.
7930    for ac_exec_ext in '' $ac_executable_extensions; do
7931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7932    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7934    break 2
7935  fi
7936done
7937  done
7938IFS=$as_save_IFS
7939
7940  ;;
7941esac
7942fi
7943FILE=$ac_cv_path_FILE
7944if test -n "$FILE"; then
7945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7946$as_echo "$FILE" >&6; }
7947else
7948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7949$as_echo "no" >&6; }
7950fi
7951
7952
7953  test -n "$FILE" && break
7954done
7955
7956    else
7957      # If it succeeded, then it was overridden by the user. We will use it
7958      # for the tool.
7959
7960      # First remove it from the list of overridden variables, so we can test
7961      # for unknown variables in the end.
7962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7963
7964      # Check if we try to supply an empty value
7965      if test "x$FILE" = x; then
7966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7967$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7969$as_echo_n "checking for FILE... " >&6; }
7970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7971$as_echo "disabled" >&6; }
7972      else
7973        # Check if the provided tool contains a complete path.
7974        tool_specified="$FILE"
7975        tool_basename="${tool_specified##*/}"
7976        if test "x$tool_basename" = "x$tool_specified"; then
7977          # A command without a complete path is provided, search $PATH.
7978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7979$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7980          # Extract the first word of "$tool_basename", so it can be a program name with args.
7981set dummy $tool_basename; ac_word=$2
7982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7983$as_echo_n "checking for $ac_word... " >&6; }
7984if ${ac_cv_path_FILE+:} false; then :
7985  $as_echo_n "(cached) " >&6
7986else
7987  case $FILE in
7988  [\\/]* | ?:[\\/]*)
7989  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7990  ;;
7991  *)
7992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7993for as_dir in $PATH
7994do
7995  IFS=$as_save_IFS
7996  test -z "$as_dir" && as_dir=.
7997    for ac_exec_ext in '' $ac_executable_extensions; do
7998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7999    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8001    break 2
8002  fi
8003done
8004  done
8005IFS=$as_save_IFS
8006
8007  ;;
8008esac
8009fi
8010FILE=$ac_cv_path_FILE
8011if test -n "$FILE"; then
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8013$as_echo "$FILE" >&6; }
8014else
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016$as_echo "no" >&6; }
8017fi
8018
8019
8020          if test "x$FILE" = x; then
8021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8022          fi
8023        else
8024          # Otherwise we believe it is a complete path. Use it as it is.
8025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8026$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8028$as_echo_n "checking for FILE... " >&6; }
8029          if test ! -x "$tool_specified"; then
8030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8031$as_echo "not found" >&6; }
8032            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8033          fi
8034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8035$as_echo "$tool_specified" >&6; }
8036        fi
8037      fi
8038    fi
8039
8040  fi
8041
8042
8043
8044  if test "x$FILE" = x; then
8045    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8046  fi
8047
8048
8049
8050
8051
8052  # Publish this variable in the help.
8053
8054
8055  if [ -z "${FIND+x}" ]; then
8056    # The variable is not set by user, try to locate tool using the code snippet
8057    for ac_prog in find
8058do
8059  # Extract the first word of "$ac_prog", so it can be a program name with args.
8060set dummy $ac_prog; ac_word=$2
8061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8062$as_echo_n "checking for $ac_word... " >&6; }
8063if ${ac_cv_path_FIND+:} false; then :
8064  $as_echo_n "(cached) " >&6
8065else
8066  case $FIND in
8067  [\\/]* | ?:[\\/]*)
8068  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8069  ;;
8070  *)
8071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8072for as_dir in $PATH
8073do
8074  IFS=$as_save_IFS
8075  test -z "$as_dir" && as_dir=.
8076    for ac_exec_ext in '' $ac_executable_extensions; do
8077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8078    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8080    break 2
8081  fi
8082done
8083  done
8084IFS=$as_save_IFS
8085
8086  ;;
8087esac
8088fi
8089FIND=$ac_cv_path_FIND
8090if test -n "$FIND"; then
8091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8092$as_echo "$FIND" >&6; }
8093else
8094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8095$as_echo "no" >&6; }
8096fi
8097
8098
8099  test -n "$FIND" && break
8100done
8101
8102  else
8103    # The variable is set, but is it from the command line or the environment?
8104
8105    # Try to remove the string !FIND! from our list.
8106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8108      # If it failed, the variable was not from the command line. Ignore it,
8109      # but warn the user (except for BASH, which is always set by the calling BASH).
8110      if test "xFIND" != xBASH; then
8111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8112$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8113      fi
8114      # Try to locate tool using the code snippet
8115      for ac_prog in find
8116do
8117  # Extract the first word of "$ac_prog", so it can be a program name with args.
8118set dummy $ac_prog; ac_word=$2
8119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120$as_echo_n "checking for $ac_word... " >&6; }
8121if ${ac_cv_path_FIND+:} false; then :
8122  $as_echo_n "(cached) " >&6
8123else
8124  case $FIND in
8125  [\\/]* | ?:[\\/]*)
8126  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8127  ;;
8128  *)
8129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8130for as_dir in $PATH
8131do
8132  IFS=$as_save_IFS
8133  test -z "$as_dir" && as_dir=.
8134    for ac_exec_ext in '' $ac_executable_extensions; do
8135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8136    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8138    break 2
8139  fi
8140done
8141  done
8142IFS=$as_save_IFS
8143
8144  ;;
8145esac
8146fi
8147FIND=$ac_cv_path_FIND
8148if test -n "$FIND"; then
8149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8150$as_echo "$FIND" >&6; }
8151else
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8153$as_echo "no" >&6; }
8154fi
8155
8156
8157  test -n "$FIND" && break
8158done
8159
8160    else
8161      # If it succeeded, then it was overridden by the user. We will use it
8162      # for the tool.
8163
8164      # First remove it from the list of overridden variables, so we can test
8165      # for unknown variables in the end.
8166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8167
8168      # Check if we try to supply an empty value
8169      if test "x$FIND" = x; then
8170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8171$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8173$as_echo_n "checking for FIND... " >&6; }
8174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8175$as_echo "disabled" >&6; }
8176      else
8177        # Check if the provided tool contains a complete path.
8178        tool_specified="$FIND"
8179        tool_basename="${tool_specified##*/}"
8180        if test "x$tool_basename" = "x$tool_specified"; then
8181          # A command without a complete path is provided, search $PATH.
8182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8183$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8184          # Extract the first word of "$tool_basename", so it can be a program name with args.
8185set dummy $tool_basename; ac_word=$2
8186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8187$as_echo_n "checking for $ac_word... " >&6; }
8188if ${ac_cv_path_FIND+:} false; then :
8189  $as_echo_n "(cached) " >&6
8190else
8191  case $FIND in
8192  [\\/]* | ?:[\\/]*)
8193  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8194  ;;
8195  *)
8196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8197for as_dir in $PATH
8198do
8199  IFS=$as_save_IFS
8200  test -z "$as_dir" && as_dir=.
8201    for ac_exec_ext in '' $ac_executable_extensions; do
8202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8203    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8205    break 2
8206  fi
8207done
8208  done
8209IFS=$as_save_IFS
8210
8211  ;;
8212esac
8213fi
8214FIND=$ac_cv_path_FIND
8215if test -n "$FIND"; then
8216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8217$as_echo "$FIND" >&6; }
8218else
8219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8220$as_echo "no" >&6; }
8221fi
8222
8223
8224          if test "x$FIND" = x; then
8225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8226          fi
8227        else
8228          # Otherwise we believe it is a complete path. Use it as it is.
8229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8230$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8232$as_echo_n "checking for FIND... " >&6; }
8233          if test ! -x "$tool_specified"; then
8234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8235$as_echo "not found" >&6; }
8236            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8237          fi
8238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8239$as_echo "$tool_specified" >&6; }
8240        fi
8241      fi
8242    fi
8243
8244  fi
8245
8246
8247
8248  if test "x$FIND" = x; then
8249    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8250  fi
8251
8252
8253
8254
8255
8256  # Publish this variable in the help.
8257
8258
8259  if [ -z "${HEAD+x}" ]; then
8260    # The variable is not set by user, try to locate tool using the code snippet
8261    for ac_prog in head
8262do
8263  # Extract the first word of "$ac_prog", so it can be a program name with args.
8264set dummy $ac_prog; ac_word=$2
8265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8266$as_echo_n "checking for $ac_word... " >&6; }
8267if ${ac_cv_path_HEAD+:} false; then :
8268  $as_echo_n "(cached) " >&6
8269else
8270  case $HEAD in
8271  [\\/]* | ?:[\\/]*)
8272  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8273  ;;
8274  *)
8275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8276for as_dir in $PATH
8277do
8278  IFS=$as_save_IFS
8279  test -z "$as_dir" && as_dir=.
8280    for ac_exec_ext in '' $ac_executable_extensions; do
8281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8282    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8284    break 2
8285  fi
8286done
8287  done
8288IFS=$as_save_IFS
8289
8290  ;;
8291esac
8292fi
8293HEAD=$ac_cv_path_HEAD
8294if test -n "$HEAD"; then
8295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8296$as_echo "$HEAD" >&6; }
8297else
8298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8299$as_echo "no" >&6; }
8300fi
8301
8302
8303  test -n "$HEAD" && break
8304done
8305
8306  else
8307    # The variable is set, but is it from the command line or the environment?
8308
8309    # Try to remove the string !HEAD! from our list.
8310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8312      # If it failed, the variable was not from the command line. Ignore it,
8313      # but warn the user (except for BASH, which is always set by the calling BASH).
8314      if test "xHEAD" != xBASH; then
8315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8316$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8317      fi
8318      # Try to locate tool using the code snippet
8319      for ac_prog in head
8320do
8321  # Extract the first word of "$ac_prog", so it can be a program name with args.
8322set dummy $ac_prog; ac_word=$2
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8324$as_echo_n "checking for $ac_word... " >&6; }
8325if ${ac_cv_path_HEAD+:} false; then :
8326  $as_echo_n "(cached) " >&6
8327else
8328  case $HEAD in
8329  [\\/]* | ?:[\\/]*)
8330  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8331  ;;
8332  *)
8333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8334for as_dir in $PATH
8335do
8336  IFS=$as_save_IFS
8337  test -z "$as_dir" && as_dir=.
8338    for ac_exec_ext in '' $ac_executable_extensions; do
8339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8340    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8342    break 2
8343  fi
8344done
8345  done
8346IFS=$as_save_IFS
8347
8348  ;;
8349esac
8350fi
8351HEAD=$ac_cv_path_HEAD
8352if test -n "$HEAD"; then
8353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8354$as_echo "$HEAD" >&6; }
8355else
8356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8357$as_echo "no" >&6; }
8358fi
8359
8360
8361  test -n "$HEAD" && break
8362done
8363
8364    else
8365      # If it succeeded, then it was overridden by the user. We will use it
8366      # for the tool.
8367
8368      # First remove it from the list of overridden variables, so we can test
8369      # for unknown variables in the end.
8370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8371
8372      # Check if we try to supply an empty value
8373      if test "x$HEAD" = x; then
8374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8375$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8377$as_echo_n "checking for HEAD... " >&6; }
8378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8379$as_echo "disabled" >&6; }
8380      else
8381        # Check if the provided tool contains a complete path.
8382        tool_specified="$HEAD"
8383        tool_basename="${tool_specified##*/}"
8384        if test "x$tool_basename" = "x$tool_specified"; then
8385          # A command without a complete path is provided, search $PATH.
8386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8387$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8388          # Extract the first word of "$tool_basename", so it can be a program name with args.
8389set dummy $tool_basename; ac_word=$2
8390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8391$as_echo_n "checking for $ac_word... " >&6; }
8392if ${ac_cv_path_HEAD+:} false; then :
8393  $as_echo_n "(cached) " >&6
8394else
8395  case $HEAD in
8396  [\\/]* | ?:[\\/]*)
8397  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8398  ;;
8399  *)
8400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8401for as_dir in $PATH
8402do
8403  IFS=$as_save_IFS
8404  test -z "$as_dir" && as_dir=.
8405    for ac_exec_ext in '' $ac_executable_extensions; do
8406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8407    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8409    break 2
8410  fi
8411done
8412  done
8413IFS=$as_save_IFS
8414
8415  ;;
8416esac
8417fi
8418HEAD=$ac_cv_path_HEAD
8419if test -n "$HEAD"; then
8420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8421$as_echo "$HEAD" >&6; }
8422else
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8424$as_echo "no" >&6; }
8425fi
8426
8427
8428          if test "x$HEAD" = x; then
8429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8430          fi
8431        else
8432          # Otherwise we believe it is a complete path. Use it as it is.
8433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8434$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8436$as_echo_n "checking for HEAD... " >&6; }
8437          if test ! -x "$tool_specified"; then
8438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8439$as_echo "not found" >&6; }
8440            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8441          fi
8442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8443$as_echo "$tool_specified" >&6; }
8444        fi
8445      fi
8446    fi
8447
8448  fi
8449
8450
8451
8452  if test "x$HEAD" = x; then
8453    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8454  fi
8455
8456
8457
8458
8459
8460  # Publish this variable in the help.
8461
8462
8463  if [ -z "${GUNZIP+x}" ]; then
8464    # The variable is not set by user, try to locate tool using the code snippet
8465    for ac_prog in gunzip
8466do
8467  # Extract the first word of "$ac_prog", so it can be a program name with args.
8468set dummy $ac_prog; ac_word=$2
8469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8470$as_echo_n "checking for $ac_word... " >&6; }
8471if ${ac_cv_path_GUNZIP+:} false; then :
8472  $as_echo_n "(cached) " >&6
8473else
8474  case $GUNZIP in
8475  [\\/]* | ?:[\\/]*)
8476  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8477  ;;
8478  *)
8479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8480for as_dir in $PATH
8481do
8482  IFS=$as_save_IFS
8483  test -z "$as_dir" && as_dir=.
8484    for ac_exec_ext in '' $ac_executable_extensions; do
8485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8486    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8488    break 2
8489  fi
8490done
8491  done
8492IFS=$as_save_IFS
8493
8494  ;;
8495esac
8496fi
8497GUNZIP=$ac_cv_path_GUNZIP
8498if test -n "$GUNZIP"; then
8499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8500$as_echo "$GUNZIP" >&6; }
8501else
8502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8503$as_echo "no" >&6; }
8504fi
8505
8506
8507  test -n "$GUNZIP" && break
8508done
8509
8510  else
8511    # The variable is set, but is it from the command line or the environment?
8512
8513    # Try to remove the string !GUNZIP! from our list.
8514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8516      # If it failed, the variable was not from the command line. Ignore it,
8517      # but warn the user (except for BASH, which is always set by the calling BASH).
8518      if test "xGUNZIP" != xBASH; then
8519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8520$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8521      fi
8522      # Try to locate tool using the code snippet
8523      for ac_prog in gunzip
8524do
8525  # Extract the first word of "$ac_prog", so it can be a program name with args.
8526set dummy $ac_prog; ac_word=$2
8527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8528$as_echo_n "checking for $ac_word... " >&6; }
8529if ${ac_cv_path_GUNZIP+:} false; then :
8530  $as_echo_n "(cached) " >&6
8531else
8532  case $GUNZIP in
8533  [\\/]* | ?:[\\/]*)
8534  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8535  ;;
8536  *)
8537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538for as_dir in $PATH
8539do
8540  IFS=$as_save_IFS
8541  test -z "$as_dir" && as_dir=.
8542    for ac_exec_ext in '' $ac_executable_extensions; do
8543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8544    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8546    break 2
8547  fi
8548done
8549  done
8550IFS=$as_save_IFS
8551
8552  ;;
8553esac
8554fi
8555GUNZIP=$ac_cv_path_GUNZIP
8556if test -n "$GUNZIP"; then
8557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8558$as_echo "$GUNZIP" >&6; }
8559else
8560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8561$as_echo "no" >&6; }
8562fi
8563
8564
8565  test -n "$GUNZIP" && break
8566done
8567
8568    else
8569      # If it succeeded, then it was overridden by the user. We will use it
8570      # for the tool.
8571
8572      # First remove it from the list of overridden variables, so we can test
8573      # for unknown variables in the end.
8574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8575
8576      # Check if we try to supply an empty value
8577      if test "x$GUNZIP" = x; then
8578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8579$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8581$as_echo_n "checking for GUNZIP... " >&6; }
8582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8583$as_echo "disabled" >&6; }
8584      else
8585        # Check if the provided tool contains a complete path.
8586        tool_specified="$GUNZIP"
8587        tool_basename="${tool_specified##*/}"
8588        if test "x$tool_basename" = "x$tool_specified"; then
8589          # A command without a complete path is provided, search $PATH.
8590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8591$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8592          # Extract the first word of "$tool_basename", so it can be a program name with args.
8593set dummy $tool_basename; ac_word=$2
8594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8595$as_echo_n "checking for $ac_word... " >&6; }
8596if ${ac_cv_path_GUNZIP+:} false; then :
8597  $as_echo_n "(cached) " >&6
8598else
8599  case $GUNZIP in
8600  [\\/]* | ?:[\\/]*)
8601  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8602  ;;
8603  *)
8604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8605for as_dir in $PATH
8606do
8607  IFS=$as_save_IFS
8608  test -z "$as_dir" && as_dir=.
8609    for ac_exec_ext in '' $ac_executable_extensions; do
8610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8611    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8613    break 2
8614  fi
8615done
8616  done
8617IFS=$as_save_IFS
8618
8619  ;;
8620esac
8621fi
8622GUNZIP=$ac_cv_path_GUNZIP
8623if test -n "$GUNZIP"; then
8624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8625$as_echo "$GUNZIP" >&6; }
8626else
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8628$as_echo "no" >&6; }
8629fi
8630
8631
8632          if test "x$GUNZIP" = x; then
8633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8634          fi
8635        else
8636          # Otherwise we believe it is a complete path. Use it as it is.
8637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8638$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8640$as_echo_n "checking for GUNZIP... " >&6; }
8641          if test ! -x "$tool_specified"; then
8642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8643$as_echo "not found" >&6; }
8644            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8645          fi
8646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8647$as_echo "$tool_specified" >&6; }
8648        fi
8649      fi
8650    fi
8651
8652  fi
8653
8654
8655
8656  if test "x$GUNZIP" = x; then
8657    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8658  fi
8659
8660
8661
8662
8663
8664  # Publish this variable in the help.
8665
8666
8667  if [ -z "${GZIP+x}" ]; then
8668    # The variable is not set by user, try to locate tool using the code snippet
8669    for ac_prog in pigz gzip
8670do
8671  # Extract the first word of "$ac_prog", so it can be a program name with args.
8672set dummy $ac_prog; ac_word=$2
8673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8674$as_echo_n "checking for $ac_word... " >&6; }
8675if ${ac_cv_path_GZIP+:} false; then :
8676  $as_echo_n "(cached) " >&6
8677else
8678  case $GZIP in
8679  [\\/]* | ?:[\\/]*)
8680  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8681  ;;
8682  *)
8683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8684for as_dir in $PATH
8685do
8686  IFS=$as_save_IFS
8687  test -z "$as_dir" && as_dir=.
8688    for ac_exec_ext in '' $ac_executable_extensions; do
8689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8690    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8692    break 2
8693  fi
8694done
8695  done
8696IFS=$as_save_IFS
8697
8698  ;;
8699esac
8700fi
8701GZIP=$ac_cv_path_GZIP
8702if test -n "$GZIP"; then
8703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8704$as_echo "$GZIP" >&6; }
8705else
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8707$as_echo "no" >&6; }
8708fi
8709
8710
8711  test -n "$GZIP" && break
8712done
8713
8714  else
8715    # The variable is set, but is it from the command line or the environment?
8716
8717    # Try to remove the string !GZIP! from our list.
8718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8720      # If it failed, the variable was not from the command line. Ignore it,
8721      # but warn the user (except for BASH, which is always set by the calling BASH).
8722      if test "xGZIP" != xBASH; then
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8724$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8725      fi
8726      # Try to locate tool using the code snippet
8727      for ac_prog in pigz gzip
8728do
8729  # Extract the first word of "$ac_prog", so it can be a program name with args.
8730set dummy $ac_prog; ac_word=$2
8731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8732$as_echo_n "checking for $ac_word... " >&6; }
8733if ${ac_cv_path_GZIP+:} false; then :
8734  $as_echo_n "(cached) " >&6
8735else
8736  case $GZIP in
8737  [\\/]* | ?:[\\/]*)
8738  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8739  ;;
8740  *)
8741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742for as_dir in $PATH
8743do
8744  IFS=$as_save_IFS
8745  test -z "$as_dir" && as_dir=.
8746    for ac_exec_ext in '' $ac_executable_extensions; do
8747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8748    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8750    break 2
8751  fi
8752done
8753  done
8754IFS=$as_save_IFS
8755
8756  ;;
8757esac
8758fi
8759GZIP=$ac_cv_path_GZIP
8760if test -n "$GZIP"; then
8761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8762$as_echo "$GZIP" >&6; }
8763else
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8765$as_echo "no" >&6; }
8766fi
8767
8768
8769  test -n "$GZIP" && break
8770done
8771
8772    else
8773      # If it succeeded, then it was overridden by the user. We will use it
8774      # for the tool.
8775
8776      # First remove it from the list of overridden variables, so we can test
8777      # for unknown variables in the end.
8778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8779
8780      # Check if we try to supply an empty value
8781      if test "x$GZIP" = x; then
8782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8783$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8785$as_echo_n "checking for GZIP... " >&6; }
8786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8787$as_echo "disabled" >&6; }
8788      else
8789        # Check if the provided tool contains a complete path.
8790        tool_specified="$GZIP"
8791        tool_basename="${tool_specified##*/}"
8792        if test "x$tool_basename" = "x$tool_specified"; then
8793          # A command without a complete path is provided, search $PATH.
8794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8795$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8796          # Extract the first word of "$tool_basename", so it can be a program name with args.
8797set dummy $tool_basename; ac_word=$2
8798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8799$as_echo_n "checking for $ac_word... " >&6; }
8800if ${ac_cv_path_GZIP+:} false; then :
8801  $as_echo_n "(cached) " >&6
8802else
8803  case $GZIP in
8804  [\\/]* | ?:[\\/]*)
8805  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8806  ;;
8807  *)
8808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8809for as_dir in $PATH
8810do
8811  IFS=$as_save_IFS
8812  test -z "$as_dir" && as_dir=.
8813    for ac_exec_ext in '' $ac_executable_extensions; do
8814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8815    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8817    break 2
8818  fi
8819done
8820  done
8821IFS=$as_save_IFS
8822
8823  ;;
8824esac
8825fi
8826GZIP=$ac_cv_path_GZIP
8827if test -n "$GZIP"; then
8828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8829$as_echo "$GZIP" >&6; }
8830else
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8832$as_echo "no" >&6; }
8833fi
8834
8835
8836          if test "x$GZIP" = x; then
8837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8838          fi
8839        else
8840          # Otherwise we believe it is a complete path. Use it as it is.
8841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8842$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8844$as_echo_n "checking for GZIP... " >&6; }
8845          if test ! -x "$tool_specified"; then
8846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8847$as_echo "not found" >&6; }
8848            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8849          fi
8850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8851$as_echo "$tool_specified" >&6; }
8852        fi
8853      fi
8854    fi
8855
8856  fi
8857
8858
8859
8860  if test "x$GZIP" = x; then
8861    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8862  fi
8863
8864
8865
8866
8867
8868  # Publish this variable in the help.
8869
8870
8871  if [ -z "${LN+x}" ]; then
8872    # The variable is not set by user, try to locate tool using the code snippet
8873    for ac_prog in ln
8874do
8875  # Extract the first word of "$ac_prog", so it can be a program name with args.
8876set dummy $ac_prog; ac_word=$2
8877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8878$as_echo_n "checking for $ac_word... " >&6; }
8879if ${ac_cv_path_LN+:} false; then :
8880  $as_echo_n "(cached) " >&6
8881else
8882  case $LN in
8883  [\\/]* | ?:[\\/]*)
8884  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8885  ;;
8886  *)
8887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8888for as_dir in $PATH
8889do
8890  IFS=$as_save_IFS
8891  test -z "$as_dir" && as_dir=.
8892    for ac_exec_ext in '' $ac_executable_extensions; do
8893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8894    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8896    break 2
8897  fi
8898done
8899  done
8900IFS=$as_save_IFS
8901
8902  ;;
8903esac
8904fi
8905LN=$ac_cv_path_LN
8906if test -n "$LN"; then
8907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8908$as_echo "$LN" >&6; }
8909else
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8911$as_echo "no" >&6; }
8912fi
8913
8914
8915  test -n "$LN" && break
8916done
8917
8918  else
8919    # The variable is set, but is it from the command line or the environment?
8920
8921    # Try to remove the string !LN! from our list.
8922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8924      # If it failed, the variable was not from the command line. Ignore it,
8925      # but warn the user (except for BASH, which is always set by the calling BASH).
8926      if test "xLN" != xBASH; then
8927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8928$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8929      fi
8930      # Try to locate tool using the code snippet
8931      for ac_prog in ln
8932do
8933  # Extract the first word of "$ac_prog", so it can be a program name with args.
8934set dummy $ac_prog; ac_word=$2
8935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8936$as_echo_n "checking for $ac_word... " >&6; }
8937if ${ac_cv_path_LN+:} false; then :
8938  $as_echo_n "(cached) " >&6
8939else
8940  case $LN in
8941  [\\/]* | ?:[\\/]*)
8942  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8943  ;;
8944  *)
8945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8946for as_dir in $PATH
8947do
8948  IFS=$as_save_IFS
8949  test -z "$as_dir" && as_dir=.
8950    for ac_exec_ext in '' $ac_executable_extensions; do
8951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8952    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8954    break 2
8955  fi
8956done
8957  done
8958IFS=$as_save_IFS
8959
8960  ;;
8961esac
8962fi
8963LN=$ac_cv_path_LN
8964if test -n "$LN"; then
8965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8966$as_echo "$LN" >&6; }
8967else
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8969$as_echo "no" >&6; }
8970fi
8971
8972
8973  test -n "$LN" && break
8974done
8975
8976    else
8977      # If it succeeded, then it was overridden by the user. We will use it
8978      # for the tool.
8979
8980      # First remove it from the list of overridden variables, so we can test
8981      # for unknown variables in the end.
8982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8983
8984      # Check if we try to supply an empty value
8985      if test "x$LN" = x; then
8986        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8987$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8989$as_echo_n "checking for LN... " >&6; }
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8991$as_echo "disabled" >&6; }
8992      else
8993        # Check if the provided tool contains a complete path.
8994        tool_specified="$LN"
8995        tool_basename="${tool_specified##*/}"
8996        if test "x$tool_basename" = "x$tool_specified"; then
8997          # A command without a complete path is provided, search $PATH.
8998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8999$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9000          # Extract the first word of "$tool_basename", so it can be a program name with args.
9001set dummy $tool_basename; ac_word=$2
9002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9003$as_echo_n "checking for $ac_word... " >&6; }
9004if ${ac_cv_path_LN+:} false; then :
9005  $as_echo_n "(cached) " >&6
9006else
9007  case $LN in
9008  [\\/]* | ?:[\\/]*)
9009  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9010  ;;
9011  *)
9012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9013for as_dir in $PATH
9014do
9015  IFS=$as_save_IFS
9016  test -z "$as_dir" && as_dir=.
9017    for ac_exec_ext in '' $ac_executable_extensions; do
9018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9019    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9021    break 2
9022  fi
9023done
9024  done
9025IFS=$as_save_IFS
9026
9027  ;;
9028esac
9029fi
9030LN=$ac_cv_path_LN
9031if test -n "$LN"; then
9032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9033$as_echo "$LN" >&6; }
9034else
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9036$as_echo "no" >&6; }
9037fi
9038
9039
9040          if test "x$LN" = x; then
9041            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9042          fi
9043        else
9044          # Otherwise we believe it is a complete path. Use it as it is.
9045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9046$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9047          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9048$as_echo_n "checking for LN... " >&6; }
9049          if test ! -x "$tool_specified"; then
9050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9051$as_echo "not found" >&6; }
9052            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9053          fi
9054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9055$as_echo "$tool_specified" >&6; }
9056        fi
9057      fi
9058    fi
9059
9060  fi
9061
9062
9063
9064  if test "x$LN" = x; then
9065    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9066  fi
9067
9068
9069
9070
9071
9072  # Publish this variable in the help.
9073
9074
9075  if [ -z "${LS+x}" ]; then
9076    # The variable is not set by user, try to locate tool using the code snippet
9077    for ac_prog in ls
9078do
9079  # Extract the first word of "$ac_prog", so it can be a program name with args.
9080set dummy $ac_prog; ac_word=$2
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9082$as_echo_n "checking for $ac_word... " >&6; }
9083if ${ac_cv_path_LS+:} false; then :
9084  $as_echo_n "(cached) " >&6
9085else
9086  case $LS in
9087  [\\/]* | ?:[\\/]*)
9088  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9089  ;;
9090  *)
9091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9092for as_dir in $PATH
9093do
9094  IFS=$as_save_IFS
9095  test -z "$as_dir" && as_dir=.
9096    for ac_exec_ext in '' $ac_executable_extensions; do
9097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9098    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9100    break 2
9101  fi
9102done
9103  done
9104IFS=$as_save_IFS
9105
9106  ;;
9107esac
9108fi
9109LS=$ac_cv_path_LS
9110if test -n "$LS"; then
9111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9112$as_echo "$LS" >&6; }
9113else
9114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9115$as_echo "no" >&6; }
9116fi
9117
9118
9119  test -n "$LS" && break
9120done
9121
9122  else
9123    # The variable is set, but is it from the command line or the environment?
9124
9125    # Try to remove the string !LS! from our list.
9126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9128      # If it failed, the variable was not from the command line. Ignore it,
9129      # but warn the user (except for BASH, which is always set by the calling BASH).
9130      if test "xLS" != xBASH; then
9131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9132$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9133      fi
9134      # Try to locate tool using the code snippet
9135      for ac_prog in ls
9136do
9137  # Extract the first word of "$ac_prog", so it can be a program name with args.
9138set dummy $ac_prog; ac_word=$2
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9140$as_echo_n "checking for $ac_word... " >&6; }
9141if ${ac_cv_path_LS+:} false; then :
9142  $as_echo_n "(cached) " >&6
9143else
9144  case $LS in
9145  [\\/]* | ?:[\\/]*)
9146  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9147  ;;
9148  *)
9149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9150for as_dir in $PATH
9151do
9152  IFS=$as_save_IFS
9153  test -z "$as_dir" && as_dir=.
9154    for ac_exec_ext in '' $ac_executable_extensions; do
9155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9156    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9158    break 2
9159  fi
9160done
9161  done
9162IFS=$as_save_IFS
9163
9164  ;;
9165esac
9166fi
9167LS=$ac_cv_path_LS
9168if test -n "$LS"; then
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9170$as_echo "$LS" >&6; }
9171else
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
9174fi
9175
9176
9177  test -n "$LS" && break
9178done
9179
9180    else
9181      # If it succeeded, then it was overridden by the user. We will use it
9182      # for the tool.
9183
9184      # First remove it from the list of overridden variables, so we can test
9185      # for unknown variables in the end.
9186      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9187
9188      # Check if we try to supply an empty value
9189      if test "x$LS" = x; then
9190        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9191$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9193$as_echo_n "checking for LS... " >&6; }
9194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9195$as_echo "disabled" >&6; }
9196      else
9197        # Check if the provided tool contains a complete path.
9198        tool_specified="$LS"
9199        tool_basename="${tool_specified##*/}"
9200        if test "x$tool_basename" = "x$tool_specified"; then
9201          # A command without a complete path is provided, search $PATH.
9202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9203$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9204          # Extract the first word of "$tool_basename", so it can be a program name with args.
9205set dummy $tool_basename; ac_word=$2
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9207$as_echo_n "checking for $ac_word... " >&6; }
9208if ${ac_cv_path_LS+:} false; then :
9209  $as_echo_n "(cached) " >&6
9210else
9211  case $LS in
9212  [\\/]* | ?:[\\/]*)
9213  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9214  ;;
9215  *)
9216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9217for as_dir in $PATH
9218do
9219  IFS=$as_save_IFS
9220  test -z "$as_dir" && as_dir=.
9221    for ac_exec_ext in '' $ac_executable_extensions; do
9222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9223    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9225    break 2
9226  fi
9227done
9228  done
9229IFS=$as_save_IFS
9230
9231  ;;
9232esac
9233fi
9234LS=$ac_cv_path_LS
9235if test -n "$LS"; then
9236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9237$as_echo "$LS" >&6; }
9238else
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240$as_echo "no" >&6; }
9241fi
9242
9243
9244          if test "x$LS" = x; then
9245            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9246          fi
9247        else
9248          # Otherwise we believe it is a complete path. Use it as it is.
9249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9250$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9251          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9252$as_echo_n "checking for LS... " >&6; }
9253          if test ! -x "$tool_specified"; then
9254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9255$as_echo "not found" >&6; }
9256            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9257          fi
9258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9259$as_echo "$tool_specified" >&6; }
9260        fi
9261      fi
9262    fi
9263
9264  fi
9265
9266
9267
9268  if test "x$LS" = x; then
9269    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9270  fi
9271
9272
9273
9274
9275
9276  # Publish this variable in the help.
9277
9278
9279  if [ -z "${MKDIR+x}" ]; then
9280    # The variable is not set by user, try to locate tool using the code snippet
9281    for ac_prog in mkdir
9282do
9283  # Extract the first word of "$ac_prog", so it can be a program name with args.
9284set dummy $ac_prog; ac_word=$2
9285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9286$as_echo_n "checking for $ac_word... " >&6; }
9287if ${ac_cv_path_MKDIR+:} false; then :
9288  $as_echo_n "(cached) " >&6
9289else
9290  case $MKDIR in
9291  [\\/]* | ?:[\\/]*)
9292  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9293  ;;
9294  *)
9295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9296for as_dir in $PATH
9297do
9298  IFS=$as_save_IFS
9299  test -z "$as_dir" && as_dir=.
9300    for ac_exec_ext in '' $ac_executable_extensions; do
9301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9302    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9304    break 2
9305  fi
9306done
9307  done
9308IFS=$as_save_IFS
9309
9310  ;;
9311esac
9312fi
9313MKDIR=$ac_cv_path_MKDIR
9314if test -n "$MKDIR"; then
9315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9316$as_echo "$MKDIR" >&6; }
9317else
9318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
9320fi
9321
9322
9323  test -n "$MKDIR" && break
9324done
9325
9326  else
9327    # The variable is set, but is it from the command line or the environment?
9328
9329    # Try to remove the string !MKDIR! from our list.
9330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9332      # If it failed, the variable was not from the command line. Ignore it,
9333      # but warn the user (except for BASH, which is always set by the calling BASH).
9334      if test "xMKDIR" != xBASH; then
9335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9336$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9337      fi
9338      # Try to locate tool using the code snippet
9339      for ac_prog in mkdir
9340do
9341  # Extract the first word of "$ac_prog", so it can be a program name with args.
9342set dummy $ac_prog; ac_word=$2
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344$as_echo_n "checking for $ac_word... " >&6; }
9345if ${ac_cv_path_MKDIR+:} false; then :
9346  $as_echo_n "(cached) " >&6
9347else
9348  case $MKDIR in
9349  [\\/]* | ?:[\\/]*)
9350  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9351  ;;
9352  *)
9353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354for as_dir in $PATH
9355do
9356  IFS=$as_save_IFS
9357  test -z "$as_dir" && as_dir=.
9358    for ac_exec_ext in '' $ac_executable_extensions; do
9359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9362    break 2
9363  fi
9364done
9365  done
9366IFS=$as_save_IFS
9367
9368  ;;
9369esac
9370fi
9371MKDIR=$ac_cv_path_MKDIR
9372if test -n "$MKDIR"; then
9373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9374$as_echo "$MKDIR" >&6; }
9375else
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
9378fi
9379
9380
9381  test -n "$MKDIR" && break
9382done
9383
9384    else
9385      # If it succeeded, then it was overridden by the user. We will use it
9386      # for the tool.
9387
9388      # First remove it from the list of overridden variables, so we can test
9389      # for unknown variables in the end.
9390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9391
9392      # Check if we try to supply an empty value
9393      if test "x$MKDIR" = x; then
9394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9395$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9397$as_echo_n "checking for MKDIR... " >&6; }
9398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9399$as_echo "disabled" >&6; }
9400      else
9401        # Check if the provided tool contains a complete path.
9402        tool_specified="$MKDIR"
9403        tool_basename="${tool_specified##*/}"
9404        if test "x$tool_basename" = "x$tool_specified"; then
9405          # A command without a complete path is provided, search $PATH.
9406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9407$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9408          # Extract the first word of "$tool_basename", so it can be a program name with args.
9409set dummy $tool_basename; ac_word=$2
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9411$as_echo_n "checking for $ac_word... " >&6; }
9412if ${ac_cv_path_MKDIR+:} false; then :
9413  $as_echo_n "(cached) " >&6
9414else
9415  case $MKDIR in
9416  [\\/]* | ?:[\\/]*)
9417  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9418  ;;
9419  *)
9420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9421for as_dir in $PATH
9422do
9423  IFS=$as_save_IFS
9424  test -z "$as_dir" && as_dir=.
9425    for ac_exec_ext in '' $ac_executable_extensions; do
9426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9427    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9429    break 2
9430  fi
9431done
9432  done
9433IFS=$as_save_IFS
9434
9435  ;;
9436esac
9437fi
9438MKDIR=$ac_cv_path_MKDIR
9439if test -n "$MKDIR"; then
9440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9441$as_echo "$MKDIR" >&6; }
9442else
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
9445fi
9446
9447
9448          if test "x$MKDIR" = x; then
9449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9450          fi
9451        else
9452          # Otherwise we believe it is a complete path. Use it as it is.
9453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9454$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9456$as_echo_n "checking for MKDIR... " >&6; }
9457          if test ! -x "$tool_specified"; then
9458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9459$as_echo "not found" >&6; }
9460            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9461          fi
9462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9463$as_echo "$tool_specified" >&6; }
9464        fi
9465      fi
9466    fi
9467
9468  fi
9469
9470
9471
9472  if test "x$MKDIR" = x; then
9473    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9474  fi
9475
9476
9477
9478
9479
9480  # Publish this variable in the help.
9481
9482
9483  if [ -z "${MKTEMP+x}" ]; then
9484    # The variable is not set by user, try to locate tool using the code snippet
9485    for ac_prog in mktemp
9486do
9487  # Extract the first word of "$ac_prog", so it can be a program name with args.
9488set dummy $ac_prog; ac_word=$2
9489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9490$as_echo_n "checking for $ac_word... " >&6; }
9491if ${ac_cv_path_MKTEMP+:} false; then :
9492  $as_echo_n "(cached) " >&6
9493else
9494  case $MKTEMP in
9495  [\\/]* | ?:[\\/]*)
9496  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9497  ;;
9498  *)
9499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9500for as_dir in $PATH
9501do
9502  IFS=$as_save_IFS
9503  test -z "$as_dir" && as_dir=.
9504    for ac_exec_ext in '' $ac_executable_extensions; do
9505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9506    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9508    break 2
9509  fi
9510done
9511  done
9512IFS=$as_save_IFS
9513
9514  ;;
9515esac
9516fi
9517MKTEMP=$ac_cv_path_MKTEMP
9518if test -n "$MKTEMP"; then
9519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9520$as_echo "$MKTEMP" >&6; }
9521else
9522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523$as_echo "no" >&6; }
9524fi
9525
9526
9527  test -n "$MKTEMP" && break
9528done
9529
9530  else
9531    # The variable is set, but is it from the command line or the environment?
9532
9533    # Try to remove the string !MKTEMP! from our list.
9534    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9535    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9536      # If it failed, the variable was not from the command line. Ignore it,
9537      # but warn the user (except for BASH, which is always set by the calling BASH).
9538      if test "xMKTEMP" != xBASH; then
9539        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9540$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9541      fi
9542      # Try to locate tool using the code snippet
9543      for ac_prog in mktemp
9544do
9545  # Extract the first word of "$ac_prog", so it can be a program name with args.
9546set dummy $ac_prog; ac_word=$2
9547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9548$as_echo_n "checking for $ac_word... " >&6; }
9549if ${ac_cv_path_MKTEMP+:} false; then :
9550  $as_echo_n "(cached) " >&6
9551else
9552  case $MKTEMP in
9553  [\\/]* | ?:[\\/]*)
9554  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9555  ;;
9556  *)
9557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9558for as_dir in $PATH
9559do
9560  IFS=$as_save_IFS
9561  test -z "$as_dir" && as_dir=.
9562    for ac_exec_ext in '' $ac_executable_extensions; do
9563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9564    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9566    break 2
9567  fi
9568done
9569  done
9570IFS=$as_save_IFS
9571
9572  ;;
9573esac
9574fi
9575MKTEMP=$ac_cv_path_MKTEMP
9576if test -n "$MKTEMP"; then
9577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9578$as_echo "$MKTEMP" >&6; }
9579else
9580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9581$as_echo "no" >&6; }
9582fi
9583
9584
9585  test -n "$MKTEMP" && break
9586done
9587
9588    else
9589      # If it succeeded, then it was overridden by the user. We will use it
9590      # for the tool.
9591
9592      # First remove it from the list of overridden variables, so we can test
9593      # for unknown variables in the end.
9594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9595
9596      # Check if we try to supply an empty value
9597      if test "x$MKTEMP" = x; then
9598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9599$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9601$as_echo_n "checking for MKTEMP... " >&6; }
9602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9603$as_echo "disabled" >&6; }
9604      else
9605        # Check if the provided tool contains a complete path.
9606        tool_specified="$MKTEMP"
9607        tool_basename="${tool_specified##*/}"
9608        if test "x$tool_basename" = "x$tool_specified"; then
9609          # A command without a complete path is provided, search $PATH.
9610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9611$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9612          # Extract the first word of "$tool_basename", so it can be a program name with args.
9613set dummy $tool_basename; ac_word=$2
9614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9615$as_echo_n "checking for $ac_word... " >&6; }
9616if ${ac_cv_path_MKTEMP+:} false; then :
9617  $as_echo_n "(cached) " >&6
9618else
9619  case $MKTEMP in
9620  [\\/]* | ?:[\\/]*)
9621  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9622  ;;
9623  *)
9624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9625for as_dir in $PATH
9626do
9627  IFS=$as_save_IFS
9628  test -z "$as_dir" && as_dir=.
9629    for ac_exec_ext in '' $ac_executable_extensions; do
9630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9631    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9633    break 2
9634  fi
9635done
9636  done
9637IFS=$as_save_IFS
9638
9639  ;;
9640esac
9641fi
9642MKTEMP=$ac_cv_path_MKTEMP
9643if test -n "$MKTEMP"; then
9644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9645$as_echo "$MKTEMP" >&6; }
9646else
9647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9648$as_echo "no" >&6; }
9649fi
9650
9651
9652          if test "x$MKTEMP" = x; then
9653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9654          fi
9655        else
9656          # Otherwise we believe it is a complete path. Use it as it is.
9657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9658$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9660$as_echo_n "checking for MKTEMP... " >&6; }
9661          if test ! -x "$tool_specified"; then
9662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9663$as_echo "not found" >&6; }
9664            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9665          fi
9666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9667$as_echo "$tool_specified" >&6; }
9668        fi
9669      fi
9670    fi
9671
9672  fi
9673
9674
9675
9676  if test "x$MKTEMP" = x; then
9677    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9678  fi
9679
9680
9681
9682
9683
9684  # Publish this variable in the help.
9685
9686
9687  if [ -z "${MV+x}" ]; then
9688    # The variable is not set by user, try to locate tool using the code snippet
9689    for ac_prog in mv
9690do
9691  # Extract the first word of "$ac_prog", so it can be a program name with args.
9692set dummy $ac_prog; ac_word=$2
9693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9694$as_echo_n "checking for $ac_word... " >&6; }
9695if ${ac_cv_path_MV+:} false; then :
9696  $as_echo_n "(cached) " >&6
9697else
9698  case $MV in
9699  [\\/]* | ?:[\\/]*)
9700  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9701  ;;
9702  *)
9703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9704for as_dir in $PATH
9705do
9706  IFS=$as_save_IFS
9707  test -z "$as_dir" && as_dir=.
9708    for ac_exec_ext in '' $ac_executable_extensions; do
9709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9710    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9712    break 2
9713  fi
9714done
9715  done
9716IFS=$as_save_IFS
9717
9718  ;;
9719esac
9720fi
9721MV=$ac_cv_path_MV
9722if test -n "$MV"; then
9723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9724$as_echo "$MV" >&6; }
9725else
9726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9727$as_echo "no" >&6; }
9728fi
9729
9730
9731  test -n "$MV" && break
9732done
9733
9734  else
9735    # The variable is set, but is it from the command line or the environment?
9736
9737    # Try to remove the string !MV! from our list.
9738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9740      # If it failed, the variable was not from the command line. Ignore it,
9741      # but warn the user (except for BASH, which is always set by the calling BASH).
9742      if test "xMV" != xBASH; then
9743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9744$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9745      fi
9746      # Try to locate tool using the code snippet
9747      for ac_prog in mv
9748do
9749  # Extract the first word of "$ac_prog", so it can be a program name with args.
9750set dummy $ac_prog; ac_word=$2
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9752$as_echo_n "checking for $ac_word... " >&6; }
9753if ${ac_cv_path_MV+:} false; then :
9754  $as_echo_n "(cached) " >&6
9755else
9756  case $MV in
9757  [\\/]* | ?:[\\/]*)
9758  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9759  ;;
9760  *)
9761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9762for as_dir in $PATH
9763do
9764  IFS=$as_save_IFS
9765  test -z "$as_dir" && as_dir=.
9766    for ac_exec_ext in '' $ac_executable_extensions; do
9767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9768    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9770    break 2
9771  fi
9772done
9773  done
9774IFS=$as_save_IFS
9775
9776  ;;
9777esac
9778fi
9779MV=$ac_cv_path_MV
9780if test -n "$MV"; then
9781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9782$as_echo "$MV" >&6; }
9783else
9784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
9786fi
9787
9788
9789  test -n "$MV" && break
9790done
9791
9792    else
9793      # If it succeeded, then it was overridden by the user. We will use it
9794      # for the tool.
9795
9796      # First remove it from the list of overridden variables, so we can test
9797      # for unknown variables in the end.
9798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9799
9800      # Check if we try to supply an empty value
9801      if test "x$MV" = x; then
9802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9803$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9805$as_echo_n "checking for MV... " >&6; }
9806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9807$as_echo "disabled" >&6; }
9808      else
9809        # Check if the provided tool contains a complete path.
9810        tool_specified="$MV"
9811        tool_basename="${tool_specified##*/}"
9812        if test "x$tool_basename" = "x$tool_specified"; then
9813          # A command without a complete path is provided, search $PATH.
9814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9815$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9816          # Extract the first word of "$tool_basename", so it can be a program name with args.
9817set dummy $tool_basename; ac_word=$2
9818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9819$as_echo_n "checking for $ac_word... " >&6; }
9820if ${ac_cv_path_MV+:} false; then :
9821  $as_echo_n "(cached) " >&6
9822else
9823  case $MV in
9824  [\\/]* | ?:[\\/]*)
9825  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9826  ;;
9827  *)
9828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9829for as_dir in $PATH
9830do
9831  IFS=$as_save_IFS
9832  test -z "$as_dir" && as_dir=.
9833    for ac_exec_ext in '' $ac_executable_extensions; do
9834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9835    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9837    break 2
9838  fi
9839done
9840  done
9841IFS=$as_save_IFS
9842
9843  ;;
9844esac
9845fi
9846MV=$ac_cv_path_MV
9847if test -n "$MV"; then
9848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9849$as_echo "$MV" >&6; }
9850else
9851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9852$as_echo "no" >&6; }
9853fi
9854
9855
9856          if test "x$MV" = x; then
9857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9858          fi
9859        else
9860          # Otherwise we believe it is a complete path. Use it as it is.
9861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9862$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9864$as_echo_n "checking for MV... " >&6; }
9865          if test ! -x "$tool_specified"; then
9866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9867$as_echo "not found" >&6; }
9868            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9869          fi
9870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9871$as_echo "$tool_specified" >&6; }
9872        fi
9873      fi
9874    fi
9875
9876  fi
9877
9878
9879
9880  if test "x$MV" = x; then
9881    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9882  fi
9883
9884
9885
9886
9887
9888  # Publish this variable in the help.
9889
9890
9891  if [ -z "${NAWK+x}" ]; then
9892    # The variable is not set by user, try to locate tool using the code snippet
9893    for ac_prog in nawk gawk awk
9894do
9895  # Extract the first word of "$ac_prog", so it can be a program name with args.
9896set dummy $ac_prog; ac_word=$2
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9898$as_echo_n "checking for $ac_word... " >&6; }
9899if ${ac_cv_path_NAWK+:} false; then :
9900  $as_echo_n "(cached) " >&6
9901else
9902  case $NAWK in
9903  [\\/]* | ?:[\\/]*)
9904  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9905  ;;
9906  *)
9907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9908for as_dir in $PATH
9909do
9910  IFS=$as_save_IFS
9911  test -z "$as_dir" && as_dir=.
9912    for ac_exec_ext in '' $ac_executable_extensions; do
9913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9914    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9916    break 2
9917  fi
9918done
9919  done
9920IFS=$as_save_IFS
9921
9922  ;;
9923esac
9924fi
9925NAWK=$ac_cv_path_NAWK
9926if test -n "$NAWK"; then
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9928$as_echo "$NAWK" >&6; }
9929else
9930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; }
9932fi
9933
9934
9935  test -n "$NAWK" && break
9936done
9937
9938  else
9939    # The variable is set, but is it from the command line or the environment?
9940
9941    # Try to remove the string !NAWK! from our list.
9942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9944      # If it failed, the variable was not from the command line. Ignore it,
9945      # but warn the user (except for BASH, which is always set by the calling BASH).
9946      if test "xNAWK" != xBASH; then
9947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9948$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9949      fi
9950      # Try to locate tool using the code snippet
9951      for ac_prog in nawk gawk awk
9952do
9953  # Extract the first word of "$ac_prog", so it can be a program name with args.
9954set dummy $ac_prog; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if ${ac_cv_path_NAWK+:} false; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  case $NAWK in
9961  [\\/]* | ?:[\\/]*)
9962  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9963  ;;
9964  *)
9965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968  IFS=$as_save_IFS
9969  test -z "$as_dir" && as_dir=.
9970    for ac_exec_ext in '' $ac_executable_extensions; do
9971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9972    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974    break 2
9975  fi
9976done
9977  done
9978IFS=$as_save_IFS
9979
9980  ;;
9981esac
9982fi
9983NAWK=$ac_cv_path_NAWK
9984if test -n "$NAWK"; then
9985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9986$as_echo "$NAWK" >&6; }
9987else
9988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993  test -n "$NAWK" && break
9994done
9995
9996    else
9997      # If it succeeded, then it was overridden by the user. We will use it
9998      # for the tool.
9999
10000      # First remove it from the list of overridden variables, so we can test
10001      # for unknown variables in the end.
10002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10003
10004      # Check if we try to supply an empty value
10005      if test "x$NAWK" = x; then
10006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10007$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10009$as_echo_n "checking for NAWK... " >&6; }
10010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10011$as_echo "disabled" >&6; }
10012      else
10013        # Check if the provided tool contains a complete path.
10014        tool_specified="$NAWK"
10015        tool_basename="${tool_specified##*/}"
10016        if test "x$tool_basename" = "x$tool_specified"; then
10017          # A command without a complete path is provided, search $PATH.
10018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10019$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10020          # Extract the first word of "$tool_basename", so it can be a program name with args.
10021set dummy $tool_basename; ac_word=$2
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10023$as_echo_n "checking for $ac_word... " >&6; }
10024if ${ac_cv_path_NAWK+:} false; then :
10025  $as_echo_n "(cached) " >&6
10026else
10027  case $NAWK in
10028  [\\/]* | ?:[\\/]*)
10029  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10030  ;;
10031  *)
10032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10033for as_dir in $PATH
10034do
10035  IFS=$as_save_IFS
10036  test -z "$as_dir" && as_dir=.
10037    for ac_exec_ext in '' $ac_executable_extensions; do
10038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10039    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10041    break 2
10042  fi
10043done
10044  done
10045IFS=$as_save_IFS
10046
10047  ;;
10048esac
10049fi
10050NAWK=$ac_cv_path_NAWK
10051if test -n "$NAWK"; then
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10053$as_echo "$NAWK" >&6; }
10054else
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10056$as_echo "no" >&6; }
10057fi
10058
10059
10060          if test "x$NAWK" = x; then
10061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10062          fi
10063        else
10064          # Otherwise we believe it is a complete path. Use it as it is.
10065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10066$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10068$as_echo_n "checking for NAWK... " >&6; }
10069          if test ! -x "$tool_specified"; then
10070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10071$as_echo "not found" >&6; }
10072            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10073          fi
10074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10075$as_echo "$tool_specified" >&6; }
10076        fi
10077      fi
10078    fi
10079
10080  fi
10081
10082
10083
10084  if test "x$NAWK" = x; then
10085    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10086  fi
10087
10088
10089
10090
10091
10092  # Publish this variable in the help.
10093
10094
10095  if [ -z "${PRINTF+x}" ]; then
10096    # The variable is not set by user, try to locate tool using the code snippet
10097    for ac_prog in printf
10098do
10099  # Extract the first word of "$ac_prog", so it can be a program name with args.
10100set dummy $ac_prog; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if ${ac_cv_path_PRINTF+:} false; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $PRINTF in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129PRINTF=$ac_cv_path_PRINTF
10130if test -n "$PRINTF"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10132$as_echo "$PRINTF" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139  test -n "$PRINTF" && break
10140done
10141
10142  else
10143    # The variable is set, but is it from the command line or the environment?
10144
10145    # Try to remove the string !PRINTF! from our list.
10146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10148      # If it failed, the variable was not from the command line. Ignore it,
10149      # but warn the user (except for BASH, which is always set by the calling BASH).
10150      if test "xPRINTF" != xBASH; then
10151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10152$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10153      fi
10154      # Try to locate tool using the code snippet
10155      for ac_prog in printf
10156do
10157  # Extract the first word of "$ac_prog", so it can be a program name with args.
10158set dummy $ac_prog; ac_word=$2
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160$as_echo_n "checking for $ac_word... " >&6; }
10161if ${ac_cv_path_PRINTF+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  case $PRINTF in
10165  [\\/]* | ?:[\\/]*)
10166  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10167  ;;
10168  *)
10169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170for as_dir in $PATH
10171do
10172  IFS=$as_save_IFS
10173  test -z "$as_dir" && as_dir=.
10174    for ac_exec_ext in '' $ac_executable_extensions; do
10175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178    break 2
10179  fi
10180done
10181  done
10182IFS=$as_save_IFS
10183
10184  ;;
10185esac
10186fi
10187PRINTF=$ac_cv_path_PRINTF
10188if test -n "$PRINTF"; then
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10190$as_echo "$PRINTF" >&6; }
10191else
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194fi
10195
10196
10197  test -n "$PRINTF" && break
10198done
10199
10200    else
10201      # If it succeeded, then it was overridden by the user. We will use it
10202      # for the tool.
10203
10204      # First remove it from the list of overridden variables, so we can test
10205      # for unknown variables in the end.
10206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10207
10208      # Check if we try to supply an empty value
10209      if test "x$PRINTF" = x; then
10210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10211$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10213$as_echo_n "checking for PRINTF... " >&6; }
10214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10215$as_echo "disabled" >&6; }
10216      else
10217        # Check if the provided tool contains a complete path.
10218        tool_specified="$PRINTF"
10219        tool_basename="${tool_specified##*/}"
10220        if test "x$tool_basename" = "x$tool_specified"; then
10221          # A command without a complete path is provided, search $PATH.
10222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10223$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10224          # Extract the first word of "$tool_basename", so it can be a program name with args.
10225set dummy $tool_basename; ac_word=$2
10226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10227$as_echo_n "checking for $ac_word... " >&6; }
10228if ${ac_cv_path_PRINTF+:} false; then :
10229  $as_echo_n "(cached) " >&6
10230else
10231  case $PRINTF in
10232  [\\/]* | ?:[\\/]*)
10233  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10234  ;;
10235  *)
10236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10237for as_dir in $PATH
10238do
10239  IFS=$as_save_IFS
10240  test -z "$as_dir" && as_dir=.
10241    for ac_exec_ext in '' $ac_executable_extensions; do
10242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10243    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10245    break 2
10246  fi
10247done
10248  done
10249IFS=$as_save_IFS
10250
10251  ;;
10252esac
10253fi
10254PRINTF=$ac_cv_path_PRINTF
10255if test -n "$PRINTF"; then
10256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10257$as_echo "$PRINTF" >&6; }
10258else
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10260$as_echo "no" >&6; }
10261fi
10262
10263
10264          if test "x$PRINTF" = x; then
10265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10266          fi
10267        else
10268          # Otherwise we believe it is a complete path. Use it as it is.
10269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10270$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10272$as_echo_n "checking for PRINTF... " >&6; }
10273          if test ! -x "$tool_specified"; then
10274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10275$as_echo "not found" >&6; }
10276            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10277          fi
10278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10279$as_echo "$tool_specified" >&6; }
10280        fi
10281      fi
10282    fi
10283
10284  fi
10285
10286
10287
10288  if test "x$PRINTF" = x; then
10289    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10290  fi
10291
10292
10293
10294
10295
10296  # Publish this variable in the help.
10297
10298
10299  if [ -z "${RM+x}" ]; then
10300    # The variable is not set by user, try to locate tool using the code snippet
10301    for ac_prog in rm
10302do
10303  # Extract the first word of "$ac_prog", so it can be a program name with args.
10304set dummy $ac_prog; ac_word=$2
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10306$as_echo_n "checking for $ac_word... " >&6; }
10307if ${ac_cv_path_RM+:} false; then :
10308  $as_echo_n "(cached) " >&6
10309else
10310  case $RM in
10311  [\\/]* | ?:[\\/]*)
10312  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10313  ;;
10314  *)
10315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10316for as_dir in $PATH
10317do
10318  IFS=$as_save_IFS
10319  test -z "$as_dir" && as_dir=.
10320    for ac_exec_ext in '' $ac_executable_extensions; do
10321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10322    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10324    break 2
10325  fi
10326done
10327  done
10328IFS=$as_save_IFS
10329
10330  ;;
10331esac
10332fi
10333RM=$ac_cv_path_RM
10334if test -n "$RM"; then
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10336$as_echo "$RM" >&6; }
10337else
10338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
10340fi
10341
10342
10343  test -n "$RM" && break
10344done
10345
10346  else
10347    # The variable is set, but is it from the command line or the environment?
10348
10349    # Try to remove the string !RM! from our list.
10350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10352      # If it failed, the variable was not from the command line. Ignore it,
10353      # but warn the user (except for BASH, which is always set by the calling BASH).
10354      if test "xRM" != xBASH; then
10355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10356$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10357      fi
10358      # Try to locate tool using the code snippet
10359      for ac_prog in rm
10360do
10361  # Extract the first word of "$ac_prog", so it can be a program name with args.
10362set dummy $ac_prog; ac_word=$2
10363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10364$as_echo_n "checking for $ac_word... " >&6; }
10365if ${ac_cv_path_RM+:} false; then :
10366  $as_echo_n "(cached) " >&6
10367else
10368  case $RM in
10369  [\\/]* | ?:[\\/]*)
10370  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10371  ;;
10372  *)
10373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10374for as_dir in $PATH
10375do
10376  IFS=$as_save_IFS
10377  test -z "$as_dir" && as_dir=.
10378    for ac_exec_ext in '' $ac_executable_extensions; do
10379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10380    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10382    break 2
10383  fi
10384done
10385  done
10386IFS=$as_save_IFS
10387
10388  ;;
10389esac
10390fi
10391RM=$ac_cv_path_RM
10392if test -n "$RM"; then
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10394$as_echo "$RM" >&6; }
10395else
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398fi
10399
10400
10401  test -n "$RM" && break
10402done
10403
10404    else
10405      # If it succeeded, then it was overridden by the user. We will use it
10406      # for the tool.
10407
10408      # First remove it from the list of overridden variables, so we can test
10409      # for unknown variables in the end.
10410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10411
10412      # Check if we try to supply an empty value
10413      if test "x$RM" = x; then
10414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10415$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10417$as_echo_n "checking for RM... " >&6; }
10418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10419$as_echo "disabled" >&6; }
10420      else
10421        # Check if the provided tool contains a complete path.
10422        tool_specified="$RM"
10423        tool_basename="${tool_specified##*/}"
10424        if test "x$tool_basename" = "x$tool_specified"; then
10425          # A command without a complete path is provided, search $PATH.
10426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10427$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10428          # Extract the first word of "$tool_basename", so it can be a program name with args.
10429set dummy $tool_basename; ac_word=$2
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10431$as_echo_n "checking for $ac_word... " >&6; }
10432if ${ac_cv_path_RM+:} false; then :
10433  $as_echo_n "(cached) " >&6
10434else
10435  case $RM in
10436  [\\/]* | ?:[\\/]*)
10437  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10438  ;;
10439  *)
10440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10441for as_dir in $PATH
10442do
10443  IFS=$as_save_IFS
10444  test -z "$as_dir" && as_dir=.
10445    for ac_exec_ext in '' $ac_executable_extensions; do
10446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10447    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10449    break 2
10450  fi
10451done
10452  done
10453IFS=$as_save_IFS
10454
10455  ;;
10456esac
10457fi
10458RM=$ac_cv_path_RM
10459if test -n "$RM"; then
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10461$as_echo "$RM" >&6; }
10462else
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464$as_echo "no" >&6; }
10465fi
10466
10467
10468          if test "x$RM" = x; then
10469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10470          fi
10471        else
10472          # Otherwise we believe it is a complete path. Use it as it is.
10473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10474$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10476$as_echo_n "checking for RM... " >&6; }
10477          if test ! -x "$tool_specified"; then
10478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10479$as_echo "not found" >&6; }
10480            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10481          fi
10482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10483$as_echo "$tool_specified" >&6; }
10484        fi
10485      fi
10486    fi
10487
10488  fi
10489
10490
10491
10492  if test "x$RM" = x; then
10493    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10494  fi
10495
10496
10497
10498
10499
10500  # Publish this variable in the help.
10501
10502
10503  if [ -z "${RMDIR+x}" ]; then
10504    # The variable is not set by user, try to locate tool using the code snippet
10505    for ac_prog in rmdir
10506do
10507  # Extract the first word of "$ac_prog", so it can be a program name with args.
10508set dummy $ac_prog; ac_word=$2
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10510$as_echo_n "checking for $ac_word... " >&6; }
10511if ${ac_cv_path_RMDIR+:} false; then :
10512  $as_echo_n "(cached) " >&6
10513else
10514  case $RMDIR in
10515  [\\/]* | ?:[\\/]*)
10516  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10517  ;;
10518  *)
10519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10520for as_dir in $PATH
10521do
10522  IFS=$as_save_IFS
10523  test -z "$as_dir" && as_dir=.
10524    for ac_exec_ext in '' $ac_executable_extensions; do
10525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10526    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10528    break 2
10529  fi
10530done
10531  done
10532IFS=$as_save_IFS
10533
10534  ;;
10535esac
10536fi
10537RMDIR=$ac_cv_path_RMDIR
10538if test -n "$RMDIR"; then
10539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10540$as_echo "$RMDIR" >&6; }
10541else
10542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10543$as_echo "no" >&6; }
10544fi
10545
10546
10547  test -n "$RMDIR" && break
10548done
10549
10550  else
10551    # The variable is set, but is it from the command line or the environment?
10552
10553    # Try to remove the string !RMDIR! from our list.
10554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10556      # If it failed, the variable was not from the command line. Ignore it,
10557      # but warn the user (except for BASH, which is always set by the calling BASH).
10558      if test "xRMDIR" != xBASH; then
10559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10560$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10561      fi
10562      # Try to locate tool using the code snippet
10563      for ac_prog in rmdir
10564do
10565  # Extract the first word of "$ac_prog", so it can be a program name with args.
10566set dummy $ac_prog; ac_word=$2
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10568$as_echo_n "checking for $ac_word... " >&6; }
10569if ${ac_cv_path_RMDIR+:} false; then :
10570  $as_echo_n "(cached) " >&6
10571else
10572  case $RMDIR in
10573  [\\/]* | ?:[\\/]*)
10574  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10575  ;;
10576  *)
10577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10578for as_dir in $PATH
10579do
10580  IFS=$as_save_IFS
10581  test -z "$as_dir" && as_dir=.
10582    for ac_exec_ext in '' $ac_executable_extensions; do
10583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10584    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10586    break 2
10587  fi
10588done
10589  done
10590IFS=$as_save_IFS
10591
10592  ;;
10593esac
10594fi
10595RMDIR=$ac_cv_path_RMDIR
10596if test -n "$RMDIR"; then
10597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10598$as_echo "$RMDIR" >&6; }
10599else
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10601$as_echo "no" >&6; }
10602fi
10603
10604
10605  test -n "$RMDIR" && break
10606done
10607
10608    else
10609      # If it succeeded, then it was overridden by the user. We will use it
10610      # for the tool.
10611
10612      # First remove it from the list of overridden variables, so we can test
10613      # for unknown variables in the end.
10614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10615
10616      # Check if we try to supply an empty value
10617      if test "x$RMDIR" = x; then
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10619$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10621$as_echo_n "checking for RMDIR... " >&6; }
10622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10623$as_echo "disabled" >&6; }
10624      else
10625        # Check if the provided tool contains a complete path.
10626        tool_specified="$RMDIR"
10627        tool_basename="${tool_specified##*/}"
10628        if test "x$tool_basename" = "x$tool_specified"; then
10629          # A command without a complete path is provided, search $PATH.
10630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10631$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10632          # Extract the first word of "$tool_basename", so it can be a program name with args.
10633set dummy $tool_basename; ac_word=$2
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10635$as_echo_n "checking for $ac_word... " >&6; }
10636if ${ac_cv_path_RMDIR+:} false; then :
10637  $as_echo_n "(cached) " >&6
10638else
10639  case $RMDIR in
10640  [\\/]* | ?:[\\/]*)
10641  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10642  ;;
10643  *)
10644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10645for as_dir in $PATH
10646do
10647  IFS=$as_save_IFS
10648  test -z "$as_dir" && as_dir=.
10649    for ac_exec_ext in '' $ac_executable_extensions; do
10650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10651    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10653    break 2
10654  fi
10655done
10656  done
10657IFS=$as_save_IFS
10658
10659  ;;
10660esac
10661fi
10662RMDIR=$ac_cv_path_RMDIR
10663if test -n "$RMDIR"; then
10664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10665$as_echo "$RMDIR" >&6; }
10666else
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10668$as_echo "no" >&6; }
10669fi
10670
10671
10672          if test "x$RMDIR" = x; then
10673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10674          fi
10675        else
10676          # Otherwise we believe it is a complete path. Use it as it is.
10677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10678$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10680$as_echo_n "checking for RMDIR... " >&6; }
10681          if test ! -x "$tool_specified"; then
10682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10683$as_echo "not found" >&6; }
10684            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10685          fi
10686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10687$as_echo "$tool_specified" >&6; }
10688        fi
10689      fi
10690    fi
10691
10692  fi
10693
10694
10695
10696  if test "x$RMDIR" = x; then
10697    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10698  fi
10699
10700
10701
10702
10703
10704  # Publish this variable in the help.
10705
10706
10707  if [ -z "${SH+x}" ]; then
10708    # The variable is not set by user, try to locate tool using the code snippet
10709    for ac_prog in sh
10710do
10711  # Extract the first word of "$ac_prog", so it can be a program name with args.
10712set dummy $ac_prog; ac_word=$2
10713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10714$as_echo_n "checking for $ac_word... " >&6; }
10715if ${ac_cv_path_SH+:} false; then :
10716  $as_echo_n "(cached) " >&6
10717else
10718  case $SH in
10719  [\\/]* | ?:[\\/]*)
10720  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10721  ;;
10722  *)
10723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10724for as_dir in $PATH
10725do
10726  IFS=$as_save_IFS
10727  test -z "$as_dir" && as_dir=.
10728    for ac_exec_ext in '' $ac_executable_extensions; do
10729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10730    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10732    break 2
10733  fi
10734done
10735  done
10736IFS=$as_save_IFS
10737
10738  ;;
10739esac
10740fi
10741SH=$ac_cv_path_SH
10742if test -n "$SH"; then
10743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10744$as_echo "$SH" >&6; }
10745else
10746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10747$as_echo "no" >&6; }
10748fi
10749
10750
10751  test -n "$SH" && break
10752done
10753
10754  else
10755    # The variable is set, but is it from the command line or the environment?
10756
10757    # Try to remove the string !SH! from our list.
10758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10760      # If it failed, the variable was not from the command line. Ignore it,
10761      # but warn the user (except for BASH, which is always set by the calling BASH).
10762      if test "xSH" != xBASH; then
10763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10764$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10765      fi
10766      # Try to locate tool using the code snippet
10767      for ac_prog in sh
10768do
10769  # Extract the first word of "$ac_prog", so it can be a program name with args.
10770set dummy $ac_prog; ac_word=$2
10771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10772$as_echo_n "checking for $ac_word... " >&6; }
10773if ${ac_cv_path_SH+:} false; then :
10774  $as_echo_n "(cached) " >&6
10775else
10776  case $SH in
10777  [\\/]* | ?:[\\/]*)
10778  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10779  ;;
10780  *)
10781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10782for as_dir in $PATH
10783do
10784  IFS=$as_save_IFS
10785  test -z "$as_dir" && as_dir=.
10786    for ac_exec_ext in '' $ac_executable_extensions; do
10787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10788    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10790    break 2
10791  fi
10792done
10793  done
10794IFS=$as_save_IFS
10795
10796  ;;
10797esac
10798fi
10799SH=$ac_cv_path_SH
10800if test -n "$SH"; then
10801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10802$as_echo "$SH" >&6; }
10803else
10804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10805$as_echo "no" >&6; }
10806fi
10807
10808
10809  test -n "$SH" && break
10810done
10811
10812    else
10813      # If it succeeded, then it was overridden by the user. We will use it
10814      # for the tool.
10815
10816      # First remove it from the list of overridden variables, so we can test
10817      # for unknown variables in the end.
10818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10819
10820      # Check if we try to supply an empty value
10821      if test "x$SH" = x; then
10822        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10823$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10824        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10825$as_echo_n "checking for SH... " >&6; }
10826        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10827$as_echo "disabled" >&6; }
10828      else
10829        # Check if the provided tool contains a complete path.
10830        tool_specified="$SH"
10831        tool_basename="${tool_specified##*/}"
10832        if test "x$tool_basename" = "x$tool_specified"; then
10833          # A command without a complete path is provided, search $PATH.
10834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10835$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10836          # Extract the first word of "$tool_basename", so it can be a program name with args.
10837set dummy $tool_basename; ac_word=$2
10838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10839$as_echo_n "checking for $ac_word... " >&6; }
10840if ${ac_cv_path_SH+:} false; then :
10841  $as_echo_n "(cached) " >&6
10842else
10843  case $SH in
10844  [\\/]* | ?:[\\/]*)
10845  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10846  ;;
10847  *)
10848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10849for as_dir in $PATH
10850do
10851  IFS=$as_save_IFS
10852  test -z "$as_dir" && as_dir=.
10853    for ac_exec_ext in '' $ac_executable_extensions; do
10854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10855    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10857    break 2
10858  fi
10859done
10860  done
10861IFS=$as_save_IFS
10862
10863  ;;
10864esac
10865fi
10866SH=$ac_cv_path_SH
10867if test -n "$SH"; then
10868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10869$as_echo "$SH" >&6; }
10870else
10871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10872$as_echo "no" >&6; }
10873fi
10874
10875
10876          if test "x$SH" = x; then
10877            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10878          fi
10879        else
10880          # Otherwise we believe it is a complete path. Use it as it is.
10881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10882$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10883          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10884$as_echo_n "checking for SH... " >&6; }
10885          if test ! -x "$tool_specified"; then
10886            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10887$as_echo "not found" >&6; }
10888            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10889          fi
10890          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10891$as_echo "$tool_specified" >&6; }
10892        fi
10893      fi
10894    fi
10895
10896  fi
10897
10898
10899
10900  if test "x$SH" = x; then
10901    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10902  fi
10903
10904
10905
10906
10907
10908  # Publish this variable in the help.
10909
10910
10911  if [ -z "${SORT+x}" ]; then
10912    # The variable is not set by user, try to locate tool using the code snippet
10913    for ac_prog in sort
10914do
10915  # Extract the first word of "$ac_prog", so it can be a program name with args.
10916set dummy $ac_prog; ac_word=$2
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10918$as_echo_n "checking for $ac_word... " >&6; }
10919if ${ac_cv_path_SORT+:} false; then :
10920  $as_echo_n "(cached) " >&6
10921else
10922  case $SORT in
10923  [\\/]* | ?:[\\/]*)
10924  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10925  ;;
10926  *)
10927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10928for as_dir in $PATH
10929do
10930  IFS=$as_save_IFS
10931  test -z "$as_dir" && as_dir=.
10932    for ac_exec_ext in '' $ac_executable_extensions; do
10933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10934    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10936    break 2
10937  fi
10938done
10939  done
10940IFS=$as_save_IFS
10941
10942  ;;
10943esac
10944fi
10945SORT=$ac_cv_path_SORT
10946if test -n "$SORT"; then
10947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10948$as_echo "$SORT" >&6; }
10949else
10950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10951$as_echo "no" >&6; }
10952fi
10953
10954
10955  test -n "$SORT" && break
10956done
10957
10958  else
10959    # The variable is set, but is it from the command line or the environment?
10960
10961    # Try to remove the string !SORT! from our list.
10962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10964      # If it failed, the variable was not from the command line. Ignore it,
10965      # but warn the user (except for BASH, which is always set by the calling BASH).
10966      if test "xSORT" != xBASH; then
10967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10968$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10969      fi
10970      # Try to locate tool using the code snippet
10971      for ac_prog in sort
10972do
10973  # Extract the first word of "$ac_prog", so it can be a program name with args.
10974set dummy $ac_prog; ac_word=$2
10975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10976$as_echo_n "checking for $ac_word... " >&6; }
10977if ${ac_cv_path_SORT+:} false; then :
10978  $as_echo_n "(cached) " >&6
10979else
10980  case $SORT in
10981  [\\/]* | ?:[\\/]*)
10982  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10983  ;;
10984  *)
10985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10986for as_dir in $PATH
10987do
10988  IFS=$as_save_IFS
10989  test -z "$as_dir" && as_dir=.
10990    for ac_exec_ext in '' $ac_executable_extensions; do
10991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10992    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10994    break 2
10995  fi
10996done
10997  done
10998IFS=$as_save_IFS
10999
11000  ;;
11001esac
11002fi
11003SORT=$ac_cv_path_SORT
11004if test -n "$SORT"; then
11005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11006$as_echo "$SORT" >&6; }
11007else
11008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11009$as_echo "no" >&6; }
11010fi
11011
11012
11013  test -n "$SORT" && break
11014done
11015
11016    else
11017      # If it succeeded, then it was overridden by the user. We will use it
11018      # for the tool.
11019
11020      # First remove it from the list of overridden variables, so we can test
11021      # for unknown variables in the end.
11022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11023
11024      # Check if we try to supply an empty value
11025      if test "x$SORT" = x; then
11026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11027$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11029$as_echo_n "checking for SORT... " >&6; }
11030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11031$as_echo "disabled" >&6; }
11032      else
11033        # Check if the provided tool contains a complete path.
11034        tool_specified="$SORT"
11035        tool_basename="${tool_specified##*/}"
11036        if test "x$tool_basename" = "x$tool_specified"; then
11037          # A command without a complete path is provided, search $PATH.
11038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11039$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11040          # Extract the first word of "$tool_basename", so it can be a program name with args.
11041set dummy $tool_basename; ac_word=$2
11042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11043$as_echo_n "checking for $ac_word... " >&6; }
11044if ${ac_cv_path_SORT+:} false; then :
11045  $as_echo_n "(cached) " >&6
11046else
11047  case $SORT in
11048  [\\/]* | ?:[\\/]*)
11049  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11050  ;;
11051  *)
11052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11053for as_dir in $PATH
11054do
11055  IFS=$as_save_IFS
11056  test -z "$as_dir" && as_dir=.
11057    for ac_exec_ext in '' $ac_executable_extensions; do
11058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11059    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11061    break 2
11062  fi
11063done
11064  done
11065IFS=$as_save_IFS
11066
11067  ;;
11068esac
11069fi
11070SORT=$ac_cv_path_SORT
11071if test -n "$SORT"; then
11072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11073$as_echo "$SORT" >&6; }
11074else
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11076$as_echo "no" >&6; }
11077fi
11078
11079
11080          if test "x$SORT" = x; then
11081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11082          fi
11083        else
11084          # Otherwise we believe it is a complete path. Use it as it is.
11085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11086$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11088$as_echo_n "checking for SORT... " >&6; }
11089          if test ! -x "$tool_specified"; then
11090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11091$as_echo "not found" >&6; }
11092            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11093          fi
11094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11095$as_echo "$tool_specified" >&6; }
11096        fi
11097      fi
11098    fi
11099
11100  fi
11101
11102
11103
11104  if test "x$SORT" = x; then
11105    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11106  fi
11107
11108
11109
11110
11111
11112  # Publish this variable in the help.
11113
11114
11115  if [ -z "${TAIL+x}" ]; then
11116    # The variable is not set by user, try to locate tool using the code snippet
11117    for ac_prog in tail
11118do
11119  # Extract the first word of "$ac_prog", so it can be a program name with args.
11120set dummy $ac_prog; ac_word=$2
11121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11122$as_echo_n "checking for $ac_word... " >&6; }
11123if ${ac_cv_path_TAIL+:} false; then :
11124  $as_echo_n "(cached) " >&6
11125else
11126  case $TAIL in
11127  [\\/]* | ?:[\\/]*)
11128  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11129  ;;
11130  *)
11131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11132for as_dir in $PATH
11133do
11134  IFS=$as_save_IFS
11135  test -z "$as_dir" && as_dir=.
11136    for ac_exec_ext in '' $ac_executable_extensions; do
11137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11138    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11140    break 2
11141  fi
11142done
11143  done
11144IFS=$as_save_IFS
11145
11146  ;;
11147esac
11148fi
11149TAIL=$ac_cv_path_TAIL
11150if test -n "$TAIL"; then
11151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11152$as_echo "$TAIL" >&6; }
11153else
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11155$as_echo "no" >&6; }
11156fi
11157
11158
11159  test -n "$TAIL" && break
11160done
11161
11162  else
11163    # The variable is set, but is it from the command line or the environment?
11164
11165    # Try to remove the string !TAIL! from our list.
11166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11168      # If it failed, the variable was not from the command line. Ignore it,
11169      # but warn the user (except for BASH, which is always set by the calling BASH).
11170      if test "xTAIL" != xBASH; then
11171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11172$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11173      fi
11174      # Try to locate tool using the code snippet
11175      for ac_prog in tail
11176do
11177  # Extract the first word of "$ac_prog", so it can be a program name with args.
11178set dummy $ac_prog; ac_word=$2
11179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11180$as_echo_n "checking for $ac_word... " >&6; }
11181if ${ac_cv_path_TAIL+:} false; then :
11182  $as_echo_n "(cached) " >&6
11183else
11184  case $TAIL in
11185  [\\/]* | ?:[\\/]*)
11186  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11187  ;;
11188  *)
11189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11190for as_dir in $PATH
11191do
11192  IFS=$as_save_IFS
11193  test -z "$as_dir" && as_dir=.
11194    for ac_exec_ext in '' $ac_executable_extensions; do
11195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11196    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11198    break 2
11199  fi
11200done
11201  done
11202IFS=$as_save_IFS
11203
11204  ;;
11205esac
11206fi
11207TAIL=$ac_cv_path_TAIL
11208if test -n "$TAIL"; then
11209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11210$as_echo "$TAIL" >&6; }
11211else
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
11214fi
11215
11216
11217  test -n "$TAIL" && break
11218done
11219
11220    else
11221      # If it succeeded, then it was overridden by the user. We will use it
11222      # for the tool.
11223
11224      # First remove it from the list of overridden variables, so we can test
11225      # for unknown variables in the end.
11226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11227
11228      # Check if we try to supply an empty value
11229      if test "x$TAIL" = x; then
11230        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11231$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11233$as_echo_n "checking for TAIL... " >&6; }
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11235$as_echo "disabled" >&6; }
11236      else
11237        # Check if the provided tool contains a complete path.
11238        tool_specified="$TAIL"
11239        tool_basename="${tool_specified##*/}"
11240        if test "x$tool_basename" = "x$tool_specified"; then
11241          # A command without a complete path is provided, search $PATH.
11242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11243$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11244          # Extract the first word of "$tool_basename", so it can be a program name with args.
11245set dummy $tool_basename; ac_word=$2
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11247$as_echo_n "checking for $ac_word... " >&6; }
11248if ${ac_cv_path_TAIL+:} false; then :
11249  $as_echo_n "(cached) " >&6
11250else
11251  case $TAIL in
11252  [\\/]* | ?:[\\/]*)
11253  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11254  ;;
11255  *)
11256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11257for as_dir in $PATH
11258do
11259  IFS=$as_save_IFS
11260  test -z "$as_dir" && as_dir=.
11261    for ac_exec_ext in '' $ac_executable_extensions; do
11262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11263    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11265    break 2
11266  fi
11267done
11268  done
11269IFS=$as_save_IFS
11270
11271  ;;
11272esac
11273fi
11274TAIL=$ac_cv_path_TAIL
11275if test -n "$TAIL"; then
11276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11277$as_echo "$TAIL" >&6; }
11278else
11279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11280$as_echo "no" >&6; }
11281fi
11282
11283
11284          if test "x$TAIL" = x; then
11285            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11286          fi
11287        else
11288          # Otherwise we believe it is a complete path. Use it as it is.
11289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11290$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11291          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11292$as_echo_n "checking for TAIL... " >&6; }
11293          if test ! -x "$tool_specified"; then
11294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11295$as_echo "not found" >&6; }
11296            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11297          fi
11298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11299$as_echo "$tool_specified" >&6; }
11300        fi
11301      fi
11302    fi
11303
11304  fi
11305
11306
11307
11308  if test "x$TAIL" = x; then
11309    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11310  fi
11311
11312
11313
11314
11315
11316  # Publish this variable in the help.
11317
11318
11319  if [ -z "${TAR+x}" ]; then
11320    # The variable is not set by user, try to locate tool using the code snippet
11321    for ac_prog in gtar tar
11322do
11323  # Extract the first word of "$ac_prog", so it can be a program name with args.
11324set dummy $ac_prog; ac_word=$2
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11326$as_echo_n "checking for $ac_word... " >&6; }
11327if ${ac_cv_path_TAR+:} false; then :
11328  $as_echo_n "(cached) " >&6
11329else
11330  case $TAR in
11331  [\\/]* | ?:[\\/]*)
11332  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11333  ;;
11334  *)
11335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11336for as_dir in $PATH
11337do
11338  IFS=$as_save_IFS
11339  test -z "$as_dir" && as_dir=.
11340    for ac_exec_ext in '' $ac_executable_extensions; do
11341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11342    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11344    break 2
11345  fi
11346done
11347  done
11348IFS=$as_save_IFS
11349
11350  ;;
11351esac
11352fi
11353TAR=$ac_cv_path_TAR
11354if test -n "$TAR"; then
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11356$as_echo "$TAR" >&6; }
11357else
11358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
11360fi
11361
11362
11363  test -n "$TAR" && break
11364done
11365
11366  else
11367    # The variable is set, but is it from the command line or the environment?
11368
11369    # Try to remove the string !TAR! from our list.
11370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11372      # If it failed, the variable was not from the command line. Ignore it,
11373      # but warn the user (except for BASH, which is always set by the calling BASH).
11374      if test "xTAR" != xBASH; then
11375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11376$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11377      fi
11378      # Try to locate tool using the code snippet
11379      for ac_prog in gtar tar
11380do
11381  # Extract the first word of "$ac_prog", so it can be a program name with args.
11382set dummy $ac_prog; ac_word=$2
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11384$as_echo_n "checking for $ac_word... " >&6; }
11385if ${ac_cv_path_TAR+:} false; then :
11386  $as_echo_n "(cached) " >&6
11387else
11388  case $TAR in
11389  [\\/]* | ?:[\\/]*)
11390  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11391  ;;
11392  *)
11393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11394for as_dir in $PATH
11395do
11396  IFS=$as_save_IFS
11397  test -z "$as_dir" && as_dir=.
11398    for ac_exec_ext in '' $ac_executable_extensions; do
11399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11400    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11402    break 2
11403  fi
11404done
11405  done
11406IFS=$as_save_IFS
11407
11408  ;;
11409esac
11410fi
11411TAR=$ac_cv_path_TAR
11412if test -n "$TAR"; then
11413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11414$as_echo "$TAR" >&6; }
11415else
11416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
11418fi
11419
11420
11421  test -n "$TAR" && break
11422done
11423
11424    else
11425      # If it succeeded, then it was overridden by the user. We will use it
11426      # for the tool.
11427
11428      # First remove it from the list of overridden variables, so we can test
11429      # for unknown variables in the end.
11430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11431
11432      # Check if we try to supply an empty value
11433      if test "x$TAR" = x; then
11434        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11435$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11437$as_echo_n "checking for TAR... " >&6; }
11438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11439$as_echo "disabled" >&6; }
11440      else
11441        # Check if the provided tool contains a complete path.
11442        tool_specified="$TAR"
11443        tool_basename="${tool_specified##*/}"
11444        if test "x$tool_basename" = "x$tool_specified"; then
11445          # A command without a complete path is provided, search $PATH.
11446          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11447$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11448          # Extract the first word of "$tool_basename", so it can be a program name with args.
11449set dummy $tool_basename; ac_word=$2
11450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11451$as_echo_n "checking for $ac_word... " >&6; }
11452if ${ac_cv_path_TAR+:} false; then :
11453  $as_echo_n "(cached) " >&6
11454else
11455  case $TAR in
11456  [\\/]* | ?:[\\/]*)
11457  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11458  ;;
11459  *)
11460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11461for as_dir in $PATH
11462do
11463  IFS=$as_save_IFS
11464  test -z "$as_dir" && as_dir=.
11465    for ac_exec_ext in '' $ac_executable_extensions; do
11466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11467    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11469    break 2
11470  fi
11471done
11472  done
11473IFS=$as_save_IFS
11474
11475  ;;
11476esac
11477fi
11478TAR=$ac_cv_path_TAR
11479if test -n "$TAR"; then
11480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11481$as_echo "$TAR" >&6; }
11482else
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
11485fi
11486
11487
11488          if test "x$TAR" = x; then
11489            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11490          fi
11491        else
11492          # Otherwise we believe it is a complete path. Use it as it is.
11493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11494$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11495          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11496$as_echo_n "checking for TAR... " >&6; }
11497          if test ! -x "$tool_specified"; then
11498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11499$as_echo "not found" >&6; }
11500            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11501          fi
11502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11503$as_echo "$tool_specified" >&6; }
11504        fi
11505      fi
11506    fi
11507
11508  fi
11509
11510
11511
11512  if test "x$TAR" = x; then
11513    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11514  fi
11515
11516
11517
11518
11519
11520  # Publish this variable in the help.
11521
11522
11523  if [ -z "${TEE+x}" ]; then
11524    # The variable is not set by user, try to locate tool using the code snippet
11525    for ac_prog in tee
11526do
11527  # Extract the first word of "$ac_prog", so it can be a program name with args.
11528set dummy $ac_prog; ac_word=$2
11529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11530$as_echo_n "checking for $ac_word... " >&6; }
11531if ${ac_cv_path_TEE+:} false; then :
11532  $as_echo_n "(cached) " >&6
11533else
11534  case $TEE in
11535  [\\/]* | ?:[\\/]*)
11536  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11537  ;;
11538  *)
11539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11540for as_dir in $PATH
11541do
11542  IFS=$as_save_IFS
11543  test -z "$as_dir" && as_dir=.
11544    for ac_exec_ext in '' $ac_executable_extensions; do
11545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11546    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11548    break 2
11549  fi
11550done
11551  done
11552IFS=$as_save_IFS
11553
11554  ;;
11555esac
11556fi
11557TEE=$ac_cv_path_TEE
11558if test -n "$TEE"; then
11559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11560$as_echo "$TEE" >&6; }
11561else
11562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
11564fi
11565
11566
11567  test -n "$TEE" && break
11568done
11569
11570  else
11571    # The variable is set, but is it from the command line or the environment?
11572
11573    # Try to remove the string !TEE! from our list.
11574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11576      # If it failed, the variable was not from the command line. Ignore it,
11577      # but warn the user (except for BASH, which is always set by the calling BASH).
11578      if test "xTEE" != xBASH; then
11579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11580$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11581      fi
11582      # Try to locate tool using the code snippet
11583      for ac_prog in tee
11584do
11585  # Extract the first word of "$ac_prog", so it can be a program name with args.
11586set dummy $ac_prog; ac_word=$2
11587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11588$as_echo_n "checking for $ac_word... " >&6; }
11589if ${ac_cv_path_TEE+:} false; then :
11590  $as_echo_n "(cached) " >&6
11591else
11592  case $TEE in
11593  [\\/]* | ?:[\\/]*)
11594  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11595  ;;
11596  *)
11597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598for as_dir in $PATH
11599do
11600  IFS=$as_save_IFS
11601  test -z "$as_dir" && as_dir=.
11602    for ac_exec_ext in '' $ac_executable_extensions; do
11603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11604    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11606    break 2
11607  fi
11608done
11609  done
11610IFS=$as_save_IFS
11611
11612  ;;
11613esac
11614fi
11615TEE=$ac_cv_path_TEE
11616if test -n "$TEE"; then
11617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11618$as_echo "$TEE" >&6; }
11619else
11620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
11622fi
11623
11624
11625  test -n "$TEE" && break
11626done
11627
11628    else
11629      # If it succeeded, then it was overridden by the user. We will use it
11630      # for the tool.
11631
11632      # First remove it from the list of overridden variables, so we can test
11633      # for unknown variables in the end.
11634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11635
11636      # Check if we try to supply an empty value
11637      if test "x$TEE" = x; then
11638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11639$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11641$as_echo_n "checking for TEE... " >&6; }
11642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11643$as_echo "disabled" >&6; }
11644      else
11645        # Check if the provided tool contains a complete path.
11646        tool_specified="$TEE"
11647        tool_basename="${tool_specified##*/}"
11648        if test "x$tool_basename" = "x$tool_specified"; then
11649          # A command without a complete path is provided, search $PATH.
11650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11651$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11652          # Extract the first word of "$tool_basename", so it can be a program name with args.
11653set dummy $tool_basename; ac_word=$2
11654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11655$as_echo_n "checking for $ac_word... " >&6; }
11656if ${ac_cv_path_TEE+:} false; then :
11657  $as_echo_n "(cached) " >&6
11658else
11659  case $TEE in
11660  [\\/]* | ?:[\\/]*)
11661  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11662  ;;
11663  *)
11664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11665for as_dir in $PATH
11666do
11667  IFS=$as_save_IFS
11668  test -z "$as_dir" && as_dir=.
11669    for ac_exec_ext in '' $ac_executable_extensions; do
11670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11671    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11673    break 2
11674  fi
11675done
11676  done
11677IFS=$as_save_IFS
11678
11679  ;;
11680esac
11681fi
11682TEE=$ac_cv_path_TEE
11683if test -n "$TEE"; then
11684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11685$as_echo "$TEE" >&6; }
11686else
11687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11688$as_echo "no" >&6; }
11689fi
11690
11691
11692          if test "x$TEE" = x; then
11693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11694          fi
11695        else
11696          # Otherwise we believe it is a complete path. Use it as it is.
11697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11698$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11700$as_echo_n "checking for TEE... " >&6; }
11701          if test ! -x "$tool_specified"; then
11702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11703$as_echo "not found" >&6; }
11704            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11705          fi
11706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11707$as_echo "$tool_specified" >&6; }
11708        fi
11709      fi
11710    fi
11711
11712  fi
11713
11714
11715
11716  if test "x$TEE" = x; then
11717    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11718  fi
11719
11720
11721
11722
11723
11724  # Publish this variable in the help.
11725
11726
11727  if [ -z "${TOUCH+x}" ]; then
11728    # The variable is not set by user, try to locate tool using the code snippet
11729    for ac_prog in touch
11730do
11731  # Extract the first word of "$ac_prog", so it can be a program name with args.
11732set dummy $ac_prog; ac_word=$2
11733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11734$as_echo_n "checking for $ac_word... " >&6; }
11735if ${ac_cv_path_TOUCH+:} false; then :
11736  $as_echo_n "(cached) " >&6
11737else
11738  case $TOUCH in
11739  [\\/]* | ?:[\\/]*)
11740  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11741  ;;
11742  *)
11743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11744for as_dir in $PATH
11745do
11746  IFS=$as_save_IFS
11747  test -z "$as_dir" && as_dir=.
11748    for ac_exec_ext in '' $ac_executable_extensions; do
11749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11750    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11752    break 2
11753  fi
11754done
11755  done
11756IFS=$as_save_IFS
11757
11758  ;;
11759esac
11760fi
11761TOUCH=$ac_cv_path_TOUCH
11762if test -n "$TOUCH"; then
11763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11764$as_echo "$TOUCH" >&6; }
11765else
11766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11767$as_echo "no" >&6; }
11768fi
11769
11770
11771  test -n "$TOUCH" && break
11772done
11773
11774  else
11775    # The variable is set, but is it from the command line or the environment?
11776
11777    # Try to remove the string !TOUCH! from our list.
11778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11780      # If it failed, the variable was not from the command line. Ignore it,
11781      # but warn the user (except for BASH, which is always set by the calling BASH).
11782      if test "xTOUCH" != xBASH; then
11783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11784$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11785      fi
11786      # Try to locate tool using the code snippet
11787      for ac_prog in touch
11788do
11789  # Extract the first word of "$ac_prog", so it can be a program name with args.
11790set dummy $ac_prog; ac_word=$2
11791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11792$as_echo_n "checking for $ac_word... " >&6; }
11793if ${ac_cv_path_TOUCH+:} false; then :
11794  $as_echo_n "(cached) " >&6
11795else
11796  case $TOUCH in
11797  [\\/]* | ?:[\\/]*)
11798  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11799  ;;
11800  *)
11801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11802for as_dir in $PATH
11803do
11804  IFS=$as_save_IFS
11805  test -z "$as_dir" && as_dir=.
11806    for ac_exec_ext in '' $ac_executable_extensions; do
11807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11808    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11810    break 2
11811  fi
11812done
11813  done
11814IFS=$as_save_IFS
11815
11816  ;;
11817esac
11818fi
11819TOUCH=$ac_cv_path_TOUCH
11820if test -n "$TOUCH"; then
11821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11822$as_echo "$TOUCH" >&6; }
11823else
11824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11825$as_echo "no" >&6; }
11826fi
11827
11828
11829  test -n "$TOUCH" && break
11830done
11831
11832    else
11833      # If it succeeded, then it was overridden by the user. We will use it
11834      # for the tool.
11835
11836      # First remove it from the list of overridden variables, so we can test
11837      # for unknown variables in the end.
11838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11839
11840      # Check if we try to supply an empty value
11841      if test "x$TOUCH" = x; then
11842        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11843$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11845$as_echo_n "checking for TOUCH... " >&6; }
11846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11847$as_echo "disabled" >&6; }
11848      else
11849        # Check if the provided tool contains a complete path.
11850        tool_specified="$TOUCH"
11851        tool_basename="${tool_specified##*/}"
11852        if test "x$tool_basename" = "x$tool_specified"; then
11853          # A command without a complete path is provided, search $PATH.
11854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11855$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11856          # Extract the first word of "$tool_basename", so it can be a program name with args.
11857set dummy $tool_basename; ac_word=$2
11858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11859$as_echo_n "checking for $ac_word... " >&6; }
11860if ${ac_cv_path_TOUCH+:} false; then :
11861  $as_echo_n "(cached) " >&6
11862else
11863  case $TOUCH in
11864  [\\/]* | ?:[\\/]*)
11865  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11866  ;;
11867  *)
11868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11869for as_dir in $PATH
11870do
11871  IFS=$as_save_IFS
11872  test -z "$as_dir" && as_dir=.
11873    for ac_exec_ext in '' $ac_executable_extensions; do
11874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11875    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11877    break 2
11878  fi
11879done
11880  done
11881IFS=$as_save_IFS
11882
11883  ;;
11884esac
11885fi
11886TOUCH=$ac_cv_path_TOUCH
11887if test -n "$TOUCH"; then
11888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11889$as_echo "$TOUCH" >&6; }
11890else
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11892$as_echo "no" >&6; }
11893fi
11894
11895
11896          if test "x$TOUCH" = x; then
11897            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11898          fi
11899        else
11900          # Otherwise we believe it is a complete path. Use it as it is.
11901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11902$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11903          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11904$as_echo_n "checking for TOUCH... " >&6; }
11905          if test ! -x "$tool_specified"; then
11906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11907$as_echo "not found" >&6; }
11908            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11909          fi
11910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11911$as_echo "$tool_specified" >&6; }
11912        fi
11913      fi
11914    fi
11915
11916  fi
11917
11918
11919
11920  if test "x$TOUCH" = x; then
11921    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11922  fi
11923
11924
11925
11926
11927
11928  # Publish this variable in the help.
11929
11930
11931  if [ -z "${TR+x}" ]; then
11932    # The variable is not set by user, try to locate tool using the code snippet
11933    for ac_prog in tr
11934do
11935  # Extract the first word of "$ac_prog", so it can be a program name with args.
11936set dummy $ac_prog; ac_word=$2
11937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11938$as_echo_n "checking for $ac_word... " >&6; }
11939if ${ac_cv_path_TR+:} false; then :
11940  $as_echo_n "(cached) " >&6
11941else
11942  case $TR in
11943  [\\/]* | ?:[\\/]*)
11944  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11945  ;;
11946  *)
11947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11948for as_dir in $PATH
11949do
11950  IFS=$as_save_IFS
11951  test -z "$as_dir" && as_dir=.
11952    for ac_exec_ext in '' $ac_executable_extensions; do
11953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11954    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11956    break 2
11957  fi
11958done
11959  done
11960IFS=$as_save_IFS
11961
11962  ;;
11963esac
11964fi
11965TR=$ac_cv_path_TR
11966if test -n "$TR"; then
11967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11968$as_echo "$TR" >&6; }
11969else
11970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11971$as_echo "no" >&6; }
11972fi
11973
11974
11975  test -n "$TR" && break
11976done
11977
11978  else
11979    # The variable is set, but is it from the command line or the environment?
11980
11981    # Try to remove the string !TR! from our list.
11982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11984      # If it failed, the variable was not from the command line. Ignore it,
11985      # but warn the user (except for BASH, which is always set by the calling BASH).
11986      if test "xTR" != xBASH; then
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11988$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11989      fi
11990      # Try to locate tool using the code snippet
11991      for ac_prog in tr
11992do
11993  # Extract the first word of "$ac_prog", so it can be a program name with args.
11994set dummy $ac_prog; ac_word=$2
11995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11996$as_echo_n "checking for $ac_word... " >&6; }
11997if ${ac_cv_path_TR+:} false; then :
11998  $as_echo_n "(cached) " >&6
11999else
12000  case $TR in
12001  [\\/]* | ?:[\\/]*)
12002  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12003  ;;
12004  *)
12005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12006for as_dir in $PATH
12007do
12008  IFS=$as_save_IFS
12009  test -z "$as_dir" && as_dir=.
12010    for ac_exec_ext in '' $ac_executable_extensions; do
12011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12012    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12014    break 2
12015  fi
12016done
12017  done
12018IFS=$as_save_IFS
12019
12020  ;;
12021esac
12022fi
12023TR=$ac_cv_path_TR
12024if test -n "$TR"; then
12025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12026$as_echo "$TR" >&6; }
12027else
12028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12029$as_echo "no" >&6; }
12030fi
12031
12032
12033  test -n "$TR" && break
12034done
12035
12036    else
12037      # If it succeeded, then it was overridden by the user. We will use it
12038      # for the tool.
12039
12040      # First remove it from the list of overridden variables, so we can test
12041      # for unknown variables in the end.
12042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12043
12044      # Check if we try to supply an empty value
12045      if test "x$TR" = x; then
12046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12047$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12049$as_echo_n "checking for TR... " >&6; }
12050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12051$as_echo "disabled" >&6; }
12052      else
12053        # Check if the provided tool contains a complete path.
12054        tool_specified="$TR"
12055        tool_basename="${tool_specified##*/}"
12056        if test "x$tool_basename" = "x$tool_specified"; then
12057          # A command without a complete path is provided, search $PATH.
12058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12059$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12060          # Extract the first word of "$tool_basename", so it can be a program name with args.
12061set dummy $tool_basename; ac_word=$2
12062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12063$as_echo_n "checking for $ac_word... " >&6; }
12064if ${ac_cv_path_TR+:} false; then :
12065  $as_echo_n "(cached) " >&6
12066else
12067  case $TR in
12068  [\\/]* | ?:[\\/]*)
12069  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12070  ;;
12071  *)
12072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12073for as_dir in $PATH
12074do
12075  IFS=$as_save_IFS
12076  test -z "$as_dir" && as_dir=.
12077    for ac_exec_ext in '' $ac_executable_extensions; do
12078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12079    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12081    break 2
12082  fi
12083done
12084  done
12085IFS=$as_save_IFS
12086
12087  ;;
12088esac
12089fi
12090TR=$ac_cv_path_TR
12091if test -n "$TR"; then
12092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12093$as_echo "$TR" >&6; }
12094else
12095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12096$as_echo "no" >&6; }
12097fi
12098
12099
12100          if test "x$TR" = x; then
12101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12102          fi
12103        else
12104          # Otherwise we believe it is a complete path. Use it as it is.
12105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12106$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12108$as_echo_n "checking for TR... " >&6; }
12109          if test ! -x "$tool_specified"; then
12110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12111$as_echo "not found" >&6; }
12112            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12113          fi
12114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12115$as_echo "$tool_specified" >&6; }
12116        fi
12117      fi
12118    fi
12119
12120  fi
12121
12122
12123
12124  if test "x$TR" = x; then
12125    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12126  fi
12127
12128
12129
12130
12131
12132  # Publish this variable in the help.
12133
12134
12135  if [ -z "${UNAME+x}" ]; then
12136    # The variable is not set by user, try to locate tool using the code snippet
12137    for ac_prog in uname
12138do
12139  # Extract the first word of "$ac_prog", so it can be a program name with args.
12140set dummy $ac_prog; ac_word=$2
12141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12142$as_echo_n "checking for $ac_word... " >&6; }
12143if ${ac_cv_path_UNAME+:} false; then :
12144  $as_echo_n "(cached) " >&6
12145else
12146  case $UNAME in
12147  [\\/]* | ?:[\\/]*)
12148  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12149  ;;
12150  *)
12151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12152for as_dir in $PATH
12153do
12154  IFS=$as_save_IFS
12155  test -z "$as_dir" && as_dir=.
12156    for ac_exec_ext in '' $ac_executable_extensions; do
12157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12158    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12160    break 2
12161  fi
12162done
12163  done
12164IFS=$as_save_IFS
12165
12166  ;;
12167esac
12168fi
12169UNAME=$ac_cv_path_UNAME
12170if test -n "$UNAME"; then
12171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12172$as_echo "$UNAME" >&6; }
12173else
12174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12175$as_echo "no" >&6; }
12176fi
12177
12178
12179  test -n "$UNAME" && break
12180done
12181
12182  else
12183    # The variable is set, but is it from the command line or the environment?
12184
12185    # Try to remove the string !UNAME! from our list.
12186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12188      # If it failed, the variable was not from the command line. Ignore it,
12189      # but warn the user (except for BASH, which is always set by the calling BASH).
12190      if test "xUNAME" != xBASH; then
12191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12192$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12193      fi
12194      # Try to locate tool using the code snippet
12195      for ac_prog in uname
12196do
12197  # Extract the first word of "$ac_prog", so it can be a program name with args.
12198set dummy $ac_prog; ac_word=$2
12199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12200$as_echo_n "checking for $ac_word... " >&6; }
12201if ${ac_cv_path_UNAME+:} false; then :
12202  $as_echo_n "(cached) " >&6
12203else
12204  case $UNAME in
12205  [\\/]* | ?:[\\/]*)
12206  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12207  ;;
12208  *)
12209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12210for as_dir in $PATH
12211do
12212  IFS=$as_save_IFS
12213  test -z "$as_dir" && as_dir=.
12214    for ac_exec_ext in '' $ac_executable_extensions; do
12215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12216    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12218    break 2
12219  fi
12220done
12221  done
12222IFS=$as_save_IFS
12223
12224  ;;
12225esac
12226fi
12227UNAME=$ac_cv_path_UNAME
12228if test -n "$UNAME"; then
12229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12230$as_echo "$UNAME" >&6; }
12231else
12232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12233$as_echo "no" >&6; }
12234fi
12235
12236
12237  test -n "$UNAME" && break
12238done
12239
12240    else
12241      # If it succeeded, then it was overridden by the user. We will use it
12242      # for the tool.
12243
12244      # First remove it from the list of overridden variables, so we can test
12245      # for unknown variables in the end.
12246      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12247
12248      # Check if we try to supply an empty value
12249      if test "x$UNAME" = x; then
12250        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12251$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12253$as_echo_n "checking for UNAME... " >&6; }
12254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12255$as_echo "disabled" >&6; }
12256      else
12257        # Check if the provided tool contains a complete path.
12258        tool_specified="$UNAME"
12259        tool_basename="${tool_specified##*/}"
12260        if test "x$tool_basename" = "x$tool_specified"; then
12261          # A command without a complete path is provided, search $PATH.
12262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12263$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12264          # Extract the first word of "$tool_basename", so it can be a program name with args.
12265set dummy $tool_basename; ac_word=$2
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12267$as_echo_n "checking for $ac_word... " >&6; }
12268if ${ac_cv_path_UNAME+:} false; then :
12269  $as_echo_n "(cached) " >&6
12270else
12271  case $UNAME in
12272  [\\/]* | ?:[\\/]*)
12273  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12274  ;;
12275  *)
12276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12277for as_dir in $PATH
12278do
12279  IFS=$as_save_IFS
12280  test -z "$as_dir" && as_dir=.
12281    for ac_exec_ext in '' $ac_executable_extensions; do
12282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12283    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12285    break 2
12286  fi
12287done
12288  done
12289IFS=$as_save_IFS
12290
12291  ;;
12292esac
12293fi
12294UNAME=$ac_cv_path_UNAME
12295if test -n "$UNAME"; then
12296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12297$as_echo "$UNAME" >&6; }
12298else
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12300$as_echo "no" >&6; }
12301fi
12302
12303
12304          if test "x$UNAME" = x; then
12305            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12306          fi
12307        else
12308          # Otherwise we believe it is a complete path. Use it as it is.
12309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12310$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12311          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12312$as_echo_n "checking for UNAME... " >&6; }
12313          if test ! -x "$tool_specified"; then
12314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12315$as_echo "not found" >&6; }
12316            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12317          fi
12318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12319$as_echo "$tool_specified" >&6; }
12320        fi
12321      fi
12322    fi
12323
12324  fi
12325
12326
12327
12328  if test "x$UNAME" = x; then
12329    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12330  fi
12331
12332
12333
12334
12335
12336  # Publish this variable in the help.
12337
12338
12339  if [ -z "${UNIQ+x}" ]; then
12340    # The variable is not set by user, try to locate tool using the code snippet
12341    for ac_prog in uniq
12342do
12343  # Extract the first word of "$ac_prog", so it can be a program name with args.
12344set dummy $ac_prog; ac_word=$2
12345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12346$as_echo_n "checking for $ac_word... " >&6; }
12347if ${ac_cv_path_UNIQ+:} false; then :
12348  $as_echo_n "(cached) " >&6
12349else
12350  case $UNIQ in
12351  [\\/]* | ?:[\\/]*)
12352  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12353  ;;
12354  *)
12355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12356for as_dir in $PATH
12357do
12358  IFS=$as_save_IFS
12359  test -z "$as_dir" && as_dir=.
12360    for ac_exec_ext in '' $ac_executable_extensions; do
12361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12362    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12364    break 2
12365  fi
12366done
12367  done
12368IFS=$as_save_IFS
12369
12370  ;;
12371esac
12372fi
12373UNIQ=$ac_cv_path_UNIQ
12374if test -n "$UNIQ"; then
12375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12376$as_echo "$UNIQ" >&6; }
12377else
12378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12379$as_echo "no" >&6; }
12380fi
12381
12382
12383  test -n "$UNIQ" && break
12384done
12385
12386  else
12387    # The variable is set, but is it from the command line or the environment?
12388
12389    # Try to remove the string !UNIQ! from our list.
12390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12392      # If it failed, the variable was not from the command line. Ignore it,
12393      # but warn the user (except for BASH, which is always set by the calling BASH).
12394      if test "xUNIQ" != xBASH; then
12395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12396$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12397      fi
12398      # Try to locate tool using the code snippet
12399      for ac_prog in uniq
12400do
12401  # Extract the first word of "$ac_prog", so it can be a program name with args.
12402set dummy $ac_prog; ac_word=$2
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12404$as_echo_n "checking for $ac_word... " >&6; }
12405if ${ac_cv_path_UNIQ+:} false; then :
12406  $as_echo_n "(cached) " >&6
12407else
12408  case $UNIQ in
12409  [\\/]* | ?:[\\/]*)
12410  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12411  ;;
12412  *)
12413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12414for as_dir in $PATH
12415do
12416  IFS=$as_save_IFS
12417  test -z "$as_dir" && as_dir=.
12418    for ac_exec_ext in '' $ac_executable_extensions; do
12419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12420    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12422    break 2
12423  fi
12424done
12425  done
12426IFS=$as_save_IFS
12427
12428  ;;
12429esac
12430fi
12431UNIQ=$ac_cv_path_UNIQ
12432if test -n "$UNIQ"; then
12433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12434$as_echo "$UNIQ" >&6; }
12435else
12436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12437$as_echo "no" >&6; }
12438fi
12439
12440
12441  test -n "$UNIQ" && break
12442done
12443
12444    else
12445      # If it succeeded, then it was overridden by the user. We will use it
12446      # for the tool.
12447
12448      # First remove it from the list of overridden variables, so we can test
12449      # for unknown variables in the end.
12450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12451
12452      # Check if we try to supply an empty value
12453      if test "x$UNIQ" = x; then
12454        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12455$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12457$as_echo_n "checking for UNIQ... " >&6; }
12458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12459$as_echo "disabled" >&6; }
12460      else
12461        # Check if the provided tool contains a complete path.
12462        tool_specified="$UNIQ"
12463        tool_basename="${tool_specified##*/}"
12464        if test "x$tool_basename" = "x$tool_specified"; then
12465          # A command without a complete path is provided, search $PATH.
12466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12467$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12468          # Extract the first word of "$tool_basename", so it can be a program name with args.
12469set dummy $tool_basename; ac_word=$2
12470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12471$as_echo_n "checking for $ac_word... " >&6; }
12472if ${ac_cv_path_UNIQ+:} false; then :
12473  $as_echo_n "(cached) " >&6
12474else
12475  case $UNIQ in
12476  [\\/]* | ?:[\\/]*)
12477  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12478  ;;
12479  *)
12480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12481for as_dir in $PATH
12482do
12483  IFS=$as_save_IFS
12484  test -z "$as_dir" && as_dir=.
12485    for ac_exec_ext in '' $ac_executable_extensions; do
12486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12487    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12489    break 2
12490  fi
12491done
12492  done
12493IFS=$as_save_IFS
12494
12495  ;;
12496esac
12497fi
12498UNIQ=$ac_cv_path_UNIQ
12499if test -n "$UNIQ"; then
12500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12501$as_echo "$UNIQ" >&6; }
12502else
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12504$as_echo "no" >&6; }
12505fi
12506
12507
12508          if test "x$UNIQ" = x; then
12509            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12510          fi
12511        else
12512          # Otherwise we believe it is a complete path. Use it as it is.
12513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12514$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12515          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12516$as_echo_n "checking for UNIQ... " >&6; }
12517          if test ! -x "$tool_specified"; then
12518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12519$as_echo "not found" >&6; }
12520            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12521          fi
12522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12523$as_echo "$tool_specified" >&6; }
12524        fi
12525      fi
12526    fi
12527
12528  fi
12529
12530
12531
12532  if test "x$UNIQ" = x; then
12533    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12534  fi
12535
12536
12537
12538
12539
12540  # Publish this variable in the help.
12541
12542
12543  if [ -z "${WC+x}" ]; then
12544    # The variable is not set by user, try to locate tool using the code snippet
12545    for ac_prog in wc
12546do
12547  # Extract the first word of "$ac_prog", so it can be a program name with args.
12548set dummy $ac_prog; ac_word=$2
12549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12550$as_echo_n "checking for $ac_word... " >&6; }
12551if ${ac_cv_path_WC+:} false; then :
12552  $as_echo_n "(cached) " >&6
12553else
12554  case $WC in
12555  [\\/]* | ?:[\\/]*)
12556  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12557  ;;
12558  *)
12559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12560for as_dir in $PATH
12561do
12562  IFS=$as_save_IFS
12563  test -z "$as_dir" && as_dir=.
12564    for ac_exec_ext in '' $ac_executable_extensions; do
12565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12566    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12568    break 2
12569  fi
12570done
12571  done
12572IFS=$as_save_IFS
12573
12574  ;;
12575esac
12576fi
12577WC=$ac_cv_path_WC
12578if test -n "$WC"; then
12579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12580$as_echo "$WC" >&6; }
12581else
12582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12583$as_echo "no" >&6; }
12584fi
12585
12586
12587  test -n "$WC" && break
12588done
12589
12590  else
12591    # The variable is set, but is it from the command line or the environment?
12592
12593    # Try to remove the string !WC! from our list.
12594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12596      # If it failed, the variable was not from the command line. Ignore it,
12597      # but warn the user (except for BASH, which is always set by the calling BASH).
12598      if test "xWC" != xBASH; then
12599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12600$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12601      fi
12602      # Try to locate tool using the code snippet
12603      for ac_prog in wc
12604do
12605  # Extract the first word of "$ac_prog", so it can be a program name with args.
12606set dummy $ac_prog; ac_word=$2
12607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12608$as_echo_n "checking for $ac_word... " >&6; }
12609if ${ac_cv_path_WC+:} false; then :
12610  $as_echo_n "(cached) " >&6
12611else
12612  case $WC in
12613  [\\/]* | ?:[\\/]*)
12614  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12615  ;;
12616  *)
12617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12618for as_dir in $PATH
12619do
12620  IFS=$as_save_IFS
12621  test -z "$as_dir" && as_dir=.
12622    for ac_exec_ext in '' $ac_executable_extensions; do
12623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12624    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12626    break 2
12627  fi
12628done
12629  done
12630IFS=$as_save_IFS
12631
12632  ;;
12633esac
12634fi
12635WC=$ac_cv_path_WC
12636if test -n "$WC"; then
12637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12638$as_echo "$WC" >&6; }
12639else
12640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12641$as_echo "no" >&6; }
12642fi
12643
12644
12645  test -n "$WC" && break
12646done
12647
12648    else
12649      # If it succeeded, then it was overridden by the user. We will use it
12650      # for the tool.
12651
12652      # First remove it from the list of overridden variables, so we can test
12653      # for unknown variables in the end.
12654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12655
12656      # Check if we try to supply an empty value
12657      if test "x$WC" = x; then
12658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12659$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12661$as_echo_n "checking for WC... " >&6; }
12662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12663$as_echo "disabled" >&6; }
12664      else
12665        # Check if the provided tool contains a complete path.
12666        tool_specified="$WC"
12667        tool_basename="${tool_specified##*/}"
12668        if test "x$tool_basename" = "x$tool_specified"; then
12669          # A command without a complete path is provided, search $PATH.
12670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12671$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12672          # Extract the first word of "$tool_basename", so it can be a program name with args.
12673set dummy $tool_basename; ac_word=$2
12674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12675$as_echo_n "checking for $ac_word... " >&6; }
12676if ${ac_cv_path_WC+:} false; then :
12677  $as_echo_n "(cached) " >&6
12678else
12679  case $WC in
12680  [\\/]* | ?:[\\/]*)
12681  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12682  ;;
12683  *)
12684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12685for as_dir in $PATH
12686do
12687  IFS=$as_save_IFS
12688  test -z "$as_dir" && as_dir=.
12689    for ac_exec_ext in '' $ac_executable_extensions; do
12690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12691    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12693    break 2
12694  fi
12695done
12696  done
12697IFS=$as_save_IFS
12698
12699  ;;
12700esac
12701fi
12702WC=$ac_cv_path_WC
12703if test -n "$WC"; then
12704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12705$as_echo "$WC" >&6; }
12706else
12707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12708$as_echo "no" >&6; }
12709fi
12710
12711
12712          if test "x$WC" = x; then
12713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12714          fi
12715        else
12716          # Otherwise we believe it is a complete path. Use it as it is.
12717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12718$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12720$as_echo_n "checking for WC... " >&6; }
12721          if test ! -x "$tool_specified"; then
12722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12723$as_echo "not found" >&6; }
12724            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12725          fi
12726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12727$as_echo "$tool_specified" >&6; }
12728        fi
12729      fi
12730    fi
12731
12732  fi
12733
12734
12735
12736  if test "x$WC" = x; then
12737    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12738  fi
12739
12740
12741
12742
12743
12744  # Publish this variable in the help.
12745
12746
12747  if [ -z "${WHICH+x}" ]; then
12748    # The variable is not set by user, try to locate tool using the code snippet
12749    for ac_prog in which
12750do
12751  # Extract the first word of "$ac_prog", so it can be a program name with args.
12752set dummy $ac_prog; ac_word=$2
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12754$as_echo_n "checking for $ac_word... " >&6; }
12755if ${ac_cv_path_WHICH+:} false; then :
12756  $as_echo_n "(cached) " >&6
12757else
12758  case $WHICH in
12759  [\\/]* | ?:[\\/]*)
12760  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12761  ;;
12762  *)
12763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764for as_dir in $PATH
12765do
12766  IFS=$as_save_IFS
12767  test -z "$as_dir" && as_dir=.
12768    for ac_exec_ext in '' $ac_executable_extensions; do
12769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12770    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12772    break 2
12773  fi
12774done
12775  done
12776IFS=$as_save_IFS
12777
12778  ;;
12779esac
12780fi
12781WHICH=$ac_cv_path_WHICH
12782if test -n "$WHICH"; then
12783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12784$as_echo "$WHICH" >&6; }
12785else
12786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12787$as_echo "no" >&6; }
12788fi
12789
12790
12791  test -n "$WHICH" && break
12792done
12793
12794  else
12795    # The variable is set, but is it from the command line or the environment?
12796
12797    # Try to remove the string !WHICH! from our list.
12798    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12799    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12800      # If it failed, the variable was not from the command line. Ignore it,
12801      # but warn the user (except for BASH, which is always set by the calling BASH).
12802      if test "xWHICH" != xBASH; then
12803        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12804$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12805      fi
12806      # Try to locate tool using the code snippet
12807      for ac_prog in which
12808do
12809  # Extract the first word of "$ac_prog", so it can be a program name with args.
12810set dummy $ac_prog; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_WHICH+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $WHICH in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839WHICH=$ac_cv_path_WHICH
12840if test -n "$WHICH"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12842$as_echo "$WHICH" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849  test -n "$WHICH" && break
12850done
12851
12852    else
12853      # If it succeeded, then it was overridden by the user. We will use it
12854      # for the tool.
12855
12856      # First remove it from the list of overridden variables, so we can test
12857      # for unknown variables in the end.
12858      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12859
12860      # Check if we try to supply an empty value
12861      if test "x$WHICH" = x; then
12862        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12863$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12864        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12865$as_echo_n "checking for WHICH... " >&6; }
12866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12867$as_echo "disabled" >&6; }
12868      else
12869        # Check if the provided tool contains a complete path.
12870        tool_specified="$WHICH"
12871        tool_basename="${tool_specified##*/}"
12872        if test "x$tool_basename" = "x$tool_specified"; then
12873          # A command without a complete path is provided, search $PATH.
12874          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12875$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12876          # Extract the first word of "$tool_basename", so it can be a program name with args.
12877set dummy $tool_basename; ac_word=$2
12878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12879$as_echo_n "checking for $ac_word... " >&6; }
12880if ${ac_cv_path_WHICH+:} false; then :
12881  $as_echo_n "(cached) " >&6
12882else
12883  case $WHICH in
12884  [\\/]* | ?:[\\/]*)
12885  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12886  ;;
12887  *)
12888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12889for as_dir in $PATH
12890do
12891  IFS=$as_save_IFS
12892  test -z "$as_dir" && as_dir=.
12893    for ac_exec_ext in '' $ac_executable_extensions; do
12894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12895    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12897    break 2
12898  fi
12899done
12900  done
12901IFS=$as_save_IFS
12902
12903  ;;
12904esac
12905fi
12906WHICH=$ac_cv_path_WHICH
12907if test -n "$WHICH"; then
12908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12909$as_echo "$WHICH" >&6; }
12910else
12911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12912$as_echo "no" >&6; }
12913fi
12914
12915
12916          if test "x$WHICH" = x; then
12917            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12918          fi
12919        else
12920          # Otherwise we believe it is a complete path. Use it as it is.
12921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12922$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12923          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12924$as_echo_n "checking for WHICH... " >&6; }
12925          if test ! -x "$tool_specified"; then
12926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12927$as_echo "not found" >&6; }
12928            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12929          fi
12930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12931$as_echo "$tool_specified" >&6; }
12932        fi
12933      fi
12934    fi
12935
12936  fi
12937
12938
12939
12940  if test "x$WHICH" = x; then
12941    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12942  fi
12943
12944
12945
12946
12947
12948  # Publish this variable in the help.
12949
12950
12951  if [ -z "${XARGS+x}" ]; then
12952    # The variable is not set by user, try to locate tool using the code snippet
12953    for ac_prog in xargs
12954do
12955  # Extract the first word of "$ac_prog", so it can be a program name with args.
12956set dummy $ac_prog; ac_word=$2
12957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12958$as_echo_n "checking for $ac_word... " >&6; }
12959if ${ac_cv_path_XARGS+:} false; then :
12960  $as_echo_n "(cached) " >&6
12961else
12962  case $XARGS in
12963  [\\/]* | ?:[\\/]*)
12964  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12965  ;;
12966  *)
12967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12968for as_dir in $PATH
12969do
12970  IFS=$as_save_IFS
12971  test -z "$as_dir" && as_dir=.
12972    for ac_exec_ext in '' $ac_executable_extensions; do
12973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12974    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12976    break 2
12977  fi
12978done
12979  done
12980IFS=$as_save_IFS
12981
12982  ;;
12983esac
12984fi
12985XARGS=$ac_cv_path_XARGS
12986if test -n "$XARGS"; then
12987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12988$as_echo "$XARGS" >&6; }
12989else
12990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12991$as_echo "no" >&6; }
12992fi
12993
12994
12995  test -n "$XARGS" && break
12996done
12997
12998  else
12999    # The variable is set, but is it from the command line or the environment?
13000
13001    # Try to remove the string !XARGS! from our list.
13002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13004      # If it failed, the variable was not from the command line. Ignore it,
13005      # but warn the user (except for BASH, which is always set by the calling BASH).
13006      if test "xXARGS" != xBASH; then
13007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13008$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13009      fi
13010      # Try to locate tool using the code snippet
13011      for ac_prog in xargs
13012do
13013  # Extract the first word of "$ac_prog", so it can be a program name with args.
13014set dummy $ac_prog; ac_word=$2
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13016$as_echo_n "checking for $ac_word... " >&6; }
13017if ${ac_cv_path_XARGS+:} false; then :
13018  $as_echo_n "(cached) " >&6
13019else
13020  case $XARGS in
13021  [\\/]* | ?:[\\/]*)
13022  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13023  ;;
13024  *)
13025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13026for as_dir in $PATH
13027do
13028  IFS=$as_save_IFS
13029  test -z "$as_dir" && as_dir=.
13030    for ac_exec_ext in '' $ac_executable_extensions; do
13031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13032    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13034    break 2
13035  fi
13036done
13037  done
13038IFS=$as_save_IFS
13039
13040  ;;
13041esac
13042fi
13043XARGS=$ac_cv_path_XARGS
13044if test -n "$XARGS"; then
13045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13046$as_echo "$XARGS" >&6; }
13047else
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13049$as_echo "no" >&6; }
13050fi
13051
13052
13053  test -n "$XARGS" && break
13054done
13055
13056    else
13057      # If it succeeded, then it was overridden by the user. We will use it
13058      # for the tool.
13059
13060      # First remove it from the list of overridden variables, so we can test
13061      # for unknown variables in the end.
13062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13063
13064      # Check if we try to supply an empty value
13065      if test "x$XARGS" = x; then
13066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13067$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13069$as_echo_n "checking for XARGS... " >&6; }
13070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13071$as_echo "disabled" >&6; }
13072      else
13073        # Check if the provided tool contains a complete path.
13074        tool_specified="$XARGS"
13075        tool_basename="${tool_specified##*/}"
13076        if test "x$tool_basename" = "x$tool_specified"; then
13077          # A command without a complete path is provided, search $PATH.
13078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13079$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13080          # Extract the first word of "$tool_basename", so it can be a program name with args.
13081set dummy $tool_basename; ac_word=$2
13082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13083$as_echo_n "checking for $ac_word... " >&6; }
13084if ${ac_cv_path_XARGS+:} false; then :
13085  $as_echo_n "(cached) " >&6
13086else
13087  case $XARGS in
13088  [\\/]* | ?:[\\/]*)
13089  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13090  ;;
13091  *)
13092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13093for as_dir in $PATH
13094do
13095  IFS=$as_save_IFS
13096  test -z "$as_dir" && as_dir=.
13097    for ac_exec_ext in '' $ac_executable_extensions; do
13098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13099    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13101    break 2
13102  fi
13103done
13104  done
13105IFS=$as_save_IFS
13106
13107  ;;
13108esac
13109fi
13110XARGS=$ac_cv_path_XARGS
13111if test -n "$XARGS"; then
13112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13113$as_echo "$XARGS" >&6; }
13114else
13115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13116$as_echo "no" >&6; }
13117fi
13118
13119
13120          if test "x$XARGS" = x; then
13121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13122          fi
13123        else
13124          # Otherwise we believe it is a complete path. Use it as it is.
13125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13126$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13128$as_echo_n "checking for XARGS... " >&6; }
13129          if test ! -x "$tool_specified"; then
13130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13131$as_echo "not found" >&6; }
13132            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13133          fi
13134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13135$as_echo "$tool_specified" >&6; }
13136        fi
13137      fi
13138    fi
13139
13140  fi
13141
13142
13143
13144  if test "x$XARGS" = x; then
13145    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13146  fi
13147
13148
13149
13150  # Then required tools that require some special treatment.
13151
13152
13153  # Publish this variable in the help.
13154
13155
13156  if [ -z "${AWK+x}" ]; then
13157    # The variable is not set by user, try to locate tool using the code snippet
13158    for ac_prog in gawk mawk nawk awk
13159do
13160  # Extract the first word of "$ac_prog", so it can be a program name with args.
13161set dummy $ac_prog; ac_word=$2
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13163$as_echo_n "checking for $ac_word... " >&6; }
13164if ${ac_cv_prog_AWK+:} false; then :
13165  $as_echo_n "(cached) " >&6
13166else
13167  if test -n "$AWK"; then
13168  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13169else
13170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13171for as_dir in $PATH
13172do
13173  IFS=$as_save_IFS
13174  test -z "$as_dir" && as_dir=.
13175    for ac_exec_ext in '' $ac_executable_extensions; do
13176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13177    ac_cv_prog_AWK="$ac_prog"
13178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13179    break 2
13180  fi
13181done
13182  done
13183IFS=$as_save_IFS
13184
13185fi
13186fi
13187AWK=$ac_cv_prog_AWK
13188if test -n "$AWK"; then
13189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13190$as_echo "$AWK" >&6; }
13191else
13192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13193$as_echo "no" >&6; }
13194fi
13195
13196
13197  test -n "$AWK" && break
13198done
13199
13200  else
13201    # The variable is set, but is it from the command line or the environment?
13202
13203    # Try to remove the string !AWK! from our list.
13204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13206      # If it failed, the variable was not from the command line. Ignore it,
13207      # but warn the user (except for BASH, which is always set by the calling BASH).
13208      if test "xAWK" != xBASH; then
13209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13210$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13211      fi
13212      # Try to locate tool using the code snippet
13213      for ac_prog in gawk mawk nawk awk
13214do
13215  # Extract the first word of "$ac_prog", so it can be a program name with args.
13216set dummy $ac_prog; ac_word=$2
13217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13218$as_echo_n "checking for $ac_word... " >&6; }
13219if ${ac_cv_prog_AWK+:} false; then :
13220  $as_echo_n "(cached) " >&6
13221else
13222  if test -n "$AWK"; then
13223  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13224else
13225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226for as_dir in $PATH
13227do
13228  IFS=$as_save_IFS
13229  test -z "$as_dir" && as_dir=.
13230    for ac_exec_ext in '' $ac_executable_extensions; do
13231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232    ac_cv_prog_AWK="$ac_prog"
13233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13234    break 2
13235  fi
13236done
13237  done
13238IFS=$as_save_IFS
13239
13240fi
13241fi
13242AWK=$ac_cv_prog_AWK
13243if test -n "$AWK"; then
13244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13245$as_echo "$AWK" >&6; }
13246else
13247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13248$as_echo "no" >&6; }
13249fi
13250
13251
13252  test -n "$AWK" && break
13253done
13254
13255    else
13256      # If it succeeded, then it was overridden by the user. We will use it
13257      # for the tool.
13258
13259      # First remove it from the list of overridden variables, so we can test
13260      # for unknown variables in the end.
13261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13262
13263      # Check if we try to supply an empty value
13264      if test "x$AWK" = x; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13266$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13268$as_echo_n "checking for AWK... " >&6; }
13269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13270$as_echo "disabled" >&6; }
13271      else
13272        # Check if the provided tool contains a complete path.
13273        tool_specified="$AWK"
13274        tool_basename="${tool_specified##*/}"
13275        if test "x$tool_basename" = "x$tool_specified"; then
13276          # A command without a complete path is provided, search $PATH.
13277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13278$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13279          # Extract the first word of "$tool_basename", so it can be a program name with args.
13280set dummy $tool_basename; ac_word=$2
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282$as_echo_n "checking for $ac_word... " >&6; }
13283if ${ac_cv_path_AWK+:} false; then :
13284  $as_echo_n "(cached) " >&6
13285else
13286  case $AWK in
13287  [\\/]* | ?:[\\/]*)
13288  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13289  ;;
13290  *)
13291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292for as_dir in $PATH
13293do
13294  IFS=$as_save_IFS
13295  test -z "$as_dir" && as_dir=.
13296    for ac_exec_ext in '' $ac_executable_extensions; do
13297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300    break 2
13301  fi
13302done
13303  done
13304IFS=$as_save_IFS
13305
13306  ;;
13307esac
13308fi
13309AWK=$ac_cv_path_AWK
13310if test -n "$AWK"; then
13311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13312$as_echo "$AWK" >&6; }
13313else
13314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315$as_echo "no" >&6; }
13316fi
13317
13318
13319          if test "x$AWK" = x; then
13320            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13321          fi
13322        else
13323          # Otherwise we believe it is a complete path. Use it as it is.
13324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13325$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13326          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13327$as_echo_n "checking for AWK... " >&6; }
13328          if test ! -x "$tool_specified"; then
13329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13330$as_echo "not found" >&6; }
13331            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13332          fi
13333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13334$as_echo "$tool_specified" >&6; }
13335        fi
13336      fi
13337    fi
13338
13339  fi
13340
13341
13342  if test "x$AWK" = x; then
13343    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13344  fi
13345
13346
13347
13348
13349  # Publish this variable in the help.
13350
13351
13352  if [ -z "${GREP+x}" ]; then
13353    # The variable is not set by user, try to locate tool using the code snippet
13354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13355$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13356if ${ac_cv_path_GREP+:} false; then :
13357  $as_echo_n "(cached) " >&6
13358else
13359  if test -z "$GREP"; then
13360  ac_path_GREP_found=false
13361  # Loop through the user's path and test for each of PROGNAME-LIST
13362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13363for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13364do
13365  IFS=$as_save_IFS
13366  test -z "$as_dir" && as_dir=.
13367    for ac_prog in grep ggrep; do
13368    for ac_exec_ext in '' $ac_executable_extensions; do
13369      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13370      as_fn_executable_p "$ac_path_GREP" || continue
13371# Check for GNU ac_path_GREP and select it if it is found.
13372  # Check for GNU $ac_path_GREP
13373case `"$ac_path_GREP" --version 2>&1` in
13374*GNU*)
13375  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13376*)
13377  ac_count=0
13378  $as_echo_n 0123456789 >"conftest.in"
13379  while :
13380  do
13381    cat "conftest.in" "conftest.in" >"conftest.tmp"
13382    mv "conftest.tmp" "conftest.in"
13383    cp "conftest.in" "conftest.nl"
13384    $as_echo 'GREP' >> "conftest.nl"
13385    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13386    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13387    as_fn_arith $ac_count + 1 && ac_count=$as_val
13388    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13389      # Best one so far, save it but keep looking for a better one
13390      ac_cv_path_GREP="$ac_path_GREP"
13391      ac_path_GREP_max=$ac_count
13392    fi
13393    # 10*(2^10) chars as input seems more than enough
13394    test $ac_count -gt 10 && break
13395  done
13396  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13397esac
13398
13399      $ac_path_GREP_found && break 3
13400    done
13401  done
13402  done
13403IFS=$as_save_IFS
13404  if test -z "$ac_cv_path_GREP"; then
13405    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13406  fi
13407else
13408  ac_cv_path_GREP=$GREP
13409fi
13410
13411fi
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13413$as_echo "$ac_cv_path_GREP" >&6; }
13414 GREP="$ac_cv_path_GREP"
13415
13416
13417  else
13418    # The variable is set, but is it from the command line or the environment?
13419
13420    # Try to remove the string !GREP! from our list.
13421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13423      # If it failed, the variable was not from the command line. Ignore it,
13424      # but warn the user (except for BASH, which is always set by the calling BASH).
13425      if test "xGREP" != xBASH; then
13426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13427$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13428      fi
13429      # Try to locate tool using the code snippet
13430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13431$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13432if ${ac_cv_path_GREP+:} false; then :
13433  $as_echo_n "(cached) " >&6
13434else
13435  if test -z "$GREP"; then
13436  ac_path_GREP_found=false
13437  # Loop through the user's path and test for each of PROGNAME-LIST
13438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13439for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13440do
13441  IFS=$as_save_IFS
13442  test -z "$as_dir" && as_dir=.
13443    for ac_prog in grep ggrep; do
13444    for ac_exec_ext in '' $ac_executable_extensions; do
13445      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13446      as_fn_executable_p "$ac_path_GREP" || continue
13447# Check for GNU ac_path_GREP and select it if it is found.
13448  # Check for GNU $ac_path_GREP
13449case `"$ac_path_GREP" --version 2>&1` in
13450*GNU*)
13451  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13452*)
13453  ac_count=0
13454  $as_echo_n 0123456789 >"conftest.in"
13455  while :
13456  do
13457    cat "conftest.in" "conftest.in" >"conftest.tmp"
13458    mv "conftest.tmp" "conftest.in"
13459    cp "conftest.in" "conftest.nl"
13460    $as_echo 'GREP' >> "conftest.nl"
13461    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13462    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13463    as_fn_arith $ac_count + 1 && ac_count=$as_val
13464    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13465      # Best one so far, save it but keep looking for a better one
13466      ac_cv_path_GREP="$ac_path_GREP"
13467      ac_path_GREP_max=$ac_count
13468    fi
13469    # 10*(2^10) chars as input seems more than enough
13470    test $ac_count -gt 10 && break
13471  done
13472  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13473esac
13474
13475      $ac_path_GREP_found && break 3
13476    done
13477  done
13478  done
13479IFS=$as_save_IFS
13480  if test -z "$ac_cv_path_GREP"; then
13481    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13482  fi
13483else
13484  ac_cv_path_GREP=$GREP
13485fi
13486
13487fi
13488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13489$as_echo "$ac_cv_path_GREP" >&6; }
13490 GREP="$ac_cv_path_GREP"
13491
13492
13493    else
13494      # If it succeeded, then it was overridden by the user. We will use it
13495      # for the tool.
13496
13497      # First remove it from the list of overridden variables, so we can test
13498      # for unknown variables in the end.
13499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13500
13501      # Check if we try to supply an empty value
13502      if test "x$GREP" = x; then
13503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13504$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13506$as_echo_n "checking for GREP... " >&6; }
13507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13508$as_echo "disabled" >&6; }
13509      else
13510        # Check if the provided tool contains a complete path.
13511        tool_specified="$GREP"
13512        tool_basename="${tool_specified##*/}"
13513        if test "x$tool_basename" = "x$tool_specified"; then
13514          # A command without a complete path is provided, search $PATH.
13515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13516$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13517          # Extract the first word of "$tool_basename", so it can be a program name with args.
13518set dummy $tool_basename; ac_word=$2
13519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13520$as_echo_n "checking for $ac_word... " >&6; }
13521if ${ac_cv_path_GREP+:} false; then :
13522  $as_echo_n "(cached) " >&6
13523else
13524  case $GREP in
13525  [\\/]* | ?:[\\/]*)
13526  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13527  ;;
13528  *)
13529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13530for as_dir in $PATH
13531do
13532  IFS=$as_save_IFS
13533  test -z "$as_dir" && as_dir=.
13534    for ac_exec_ext in '' $ac_executable_extensions; do
13535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13536    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13538    break 2
13539  fi
13540done
13541  done
13542IFS=$as_save_IFS
13543
13544  ;;
13545esac
13546fi
13547GREP=$ac_cv_path_GREP
13548if test -n "$GREP"; then
13549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13550$as_echo "$GREP" >&6; }
13551else
13552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553$as_echo "no" >&6; }
13554fi
13555
13556
13557          if test "x$GREP" = x; then
13558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13559          fi
13560        else
13561          # Otherwise we believe it is a complete path. Use it as it is.
13562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13563$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13565$as_echo_n "checking for GREP... " >&6; }
13566          if test ! -x "$tool_specified"; then
13567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13568$as_echo "not found" >&6; }
13569            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13570          fi
13571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13572$as_echo "$tool_specified" >&6; }
13573        fi
13574      fi
13575    fi
13576
13577  fi
13578
13579
13580  if test "x$GREP" = x; then
13581    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13582  fi
13583
13584
13585
13586
13587  # Publish this variable in the help.
13588
13589
13590  if [ -z "${EGREP+x}" ]; then
13591    # The variable is not set by user, try to locate tool using the code snippet
13592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13593$as_echo_n "checking for egrep... " >&6; }
13594if ${ac_cv_path_EGREP+:} false; then :
13595  $as_echo_n "(cached) " >&6
13596else
13597  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13598   then ac_cv_path_EGREP="$GREP -E"
13599   else
13600     if test -z "$EGREP"; then
13601  ac_path_EGREP_found=false
13602  # Loop through the user's path and test for each of PROGNAME-LIST
13603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13604for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13605do
13606  IFS=$as_save_IFS
13607  test -z "$as_dir" && as_dir=.
13608    for ac_prog in egrep; do
13609    for ac_exec_ext in '' $ac_executable_extensions; do
13610      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13611      as_fn_executable_p "$ac_path_EGREP" || continue
13612# Check for GNU ac_path_EGREP and select it if it is found.
13613  # Check for GNU $ac_path_EGREP
13614case `"$ac_path_EGREP" --version 2>&1` in
13615*GNU*)
13616  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13617*)
13618  ac_count=0
13619  $as_echo_n 0123456789 >"conftest.in"
13620  while :
13621  do
13622    cat "conftest.in" "conftest.in" >"conftest.tmp"
13623    mv "conftest.tmp" "conftest.in"
13624    cp "conftest.in" "conftest.nl"
13625    $as_echo 'EGREP' >> "conftest.nl"
13626    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13627    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13628    as_fn_arith $ac_count + 1 && ac_count=$as_val
13629    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13630      # Best one so far, save it but keep looking for a better one
13631      ac_cv_path_EGREP="$ac_path_EGREP"
13632      ac_path_EGREP_max=$ac_count
13633    fi
13634    # 10*(2^10) chars as input seems more than enough
13635    test $ac_count -gt 10 && break
13636  done
13637  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13638esac
13639
13640      $ac_path_EGREP_found && break 3
13641    done
13642  done
13643  done
13644IFS=$as_save_IFS
13645  if test -z "$ac_cv_path_EGREP"; then
13646    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13647  fi
13648else
13649  ac_cv_path_EGREP=$EGREP
13650fi
13651
13652   fi
13653fi
13654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13655$as_echo "$ac_cv_path_EGREP" >&6; }
13656 EGREP="$ac_cv_path_EGREP"
13657
13658
13659  else
13660    # The variable is set, but is it from the command line or the environment?
13661
13662    # Try to remove the string !EGREP! from our list.
13663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13665      # If it failed, the variable was not from the command line. Ignore it,
13666      # but warn the user (except for BASH, which is always set by the calling BASH).
13667      if test "xEGREP" != xBASH; then
13668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13669$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13670      fi
13671      # Try to locate tool using the code snippet
13672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13673$as_echo_n "checking for egrep... " >&6; }
13674if ${ac_cv_path_EGREP+:} false; then :
13675  $as_echo_n "(cached) " >&6
13676else
13677  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13678   then ac_cv_path_EGREP="$GREP -E"
13679   else
13680     if test -z "$EGREP"; then
13681  ac_path_EGREP_found=false
13682  # Loop through the user's path and test for each of PROGNAME-LIST
13683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13684for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13685do
13686  IFS=$as_save_IFS
13687  test -z "$as_dir" && as_dir=.
13688    for ac_prog in egrep; do
13689    for ac_exec_ext in '' $ac_executable_extensions; do
13690      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13691      as_fn_executable_p "$ac_path_EGREP" || continue
13692# Check for GNU ac_path_EGREP and select it if it is found.
13693  # Check for GNU $ac_path_EGREP
13694case `"$ac_path_EGREP" --version 2>&1` in
13695*GNU*)
13696  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13697*)
13698  ac_count=0
13699  $as_echo_n 0123456789 >"conftest.in"
13700  while :
13701  do
13702    cat "conftest.in" "conftest.in" >"conftest.tmp"
13703    mv "conftest.tmp" "conftest.in"
13704    cp "conftest.in" "conftest.nl"
13705    $as_echo 'EGREP' >> "conftest.nl"
13706    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13707    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13708    as_fn_arith $ac_count + 1 && ac_count=$as_val
13709    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13710      # Best one so far, save it but keep looking for a better one
13711      ac_cv_path_EGREP="$ac_path_EGREP"
13712      ac_path_EGREP_max=$ac_count
13713    fi
13714    # 10*(2^10) chars as input seems more than enough
13715    test $ac_count -gt 10 && break
13716  done
13717  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13718esac
13719
13720      $ac_path_EGREP_found && break 3
13721    done
13722  done
13723  done
13724IFS=$as_save_IFS
13725  if test -z "$ac_cv_path_EGREP"; then
13726    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13727  fi
13728else
13729  ac_cv_path_EGREP=$EGREP
13730fi
13731
13732   fi
13733fi
13734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13735$as_echo "$ac_cv_path_EGREP" >&6; }
13736 EGREP="$ac_cv_path_EGREP"
13737
13738
13739    else
13740      # If it succeeded, then it was overridden by the user. We will use it
13741      # for the tool.
13742
13743      # First remove it from the list of overridden variables, so we can test
13744      # for unknown variables in the end.
13745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13746
13747      # Check if we try to supply an empty value
13748      if test "x$EGREP" = x; then
13749        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13750$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13752$as_echo_n "checking for EGREP... " >&6; }
13753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13754$as_echo "disabled" >&6; }
13755      else
13756        # Check if the provided tool contains a complete path.
13757        tool_specified="$EGREP"
13758        tool_basename="${tool_specified##*/}"
13759        if test "x$tool_basename" = "x$tool_specified"; then
13760          # A command without a complete path is provided, search $PATH.
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13762$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13763          # Extract the first word of "$tool_basename", so it can be a program name with args.
13764set dummy $tool_basename; ac_word=$2
13765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13766$as_echo_n "checking for $ac_word... " >&6; }
13767if ${ac_cv_path_EGREP+:} false; then :
13768  $as_echo_n "(cached) " >&6
13769else
13770  case $EGREP in
13771  [\\/]* | ?:[\\/]*)
13772  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13773  ;;
13774  *)
13775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13776for as_dir in $PATH
13777do
13778  IFS=$as_save_IFS
13779  test -z "$as_dir" && as_dir=.
13780    for ac_exec_ext in '' $ac_executable_extensions; do
13781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13782    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13784    break 2
13785  fi
13786done
13787  done
13788IFS=$as_save_IFS
13789
13790  ;;
13791esac
13792fi
13793EGREP=$ac_cv_path_EGREP
13794if test -n "$EGREP"; then
13795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13796$as_echo "$EGREP" >&6; }
13797else
13798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13799$as_echo "no" >&6; }
13800fi
13801
13802
13803          if test "x$EGREP" = x; then
13804            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13805          fi
13806        else
13807          # Otherwise we believe it is a complete path. Use it as it is.
13808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13809$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13810          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13811$as_echo_n "checking for EGREP... " >&6; }
13812          if test ! -x "$tool_specified"; then
13813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13814$as_echo "not found" >&6; }
13815            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13816          fi
13817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13818$as_echo "$tool_specified" >&6; }
13819        fi
13820      fi
13821    fi
13822
13823  fi
13824
13825
13826  if test "x$EGREP" = x; then
13827    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13828  fi
13829
13830
13831
13832
13833  # Publish this variable in the help.
13834
13835
13836  if [ -z "${FGREP+x}" ]; then
13837    # The variable is not set by user, try to locate tool using the code snippet
13838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13839$as_echo_n "checking for fgrep... " >&6; }
13840if ${ac_cv_path_FGREP+:} false; then :
13841  $as_echo_n "(cached) " >&6
13842else
13843  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13844   then ac_cv_path_FGREP="$GREP -F"
13845   else
13846     if test -z "$FGREP"; then
13847  ac_path_FGREP_found=false
13848  # Loop through the user's path and test for each of PROGNAME-LIST
13849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13850for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13851do
13852  IFS=$as_save_IFS
13853  test -z "$as_dir" && as_dir=.
13854    for ac_prog in fgrep; do
13855    for ac_exec_ext in '' $ac_executable_extensions; do
13856      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13857      as_fn_executable_p "$ac_path_FGREP" || continue
13858# Check for GNU ac_path_FGREP and select it if it is found.
13859  # Check for GNU $ac_path_FGREP
13860case `"$ac_path_FGREP" --version 2>&1` in
13861*GNU*)
13862  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13863*)
13864  ac_count=0
13865  $as_echo_n 0123456789 >"conftest.in"
13866  while :
13867  do
13868    cat "conftest.in" "conftest.in" >"conftest.tmp"
13869    mv "conftest.tmp" "conftest.in"
13870    cp "conftest.in" "conftest.nl"
13871    $as_echo 'FGREP' >> "conftest.nl"
13872    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13873    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13874    as_fn_arith $ac_count + 1 && ac_count=$as_val
13875    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13876      # Best one so far, save it but keep looking for a better one
13877      ac_cv_path_FGREP="$ac_path_FGREP"
13878      ac_path_FGREP_max=$ac_count
13879    fi
13880    # 10*(2^10) chars as input seems more than enough
13881    test $ac_count -gt 10 && break
13882  done
13883  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13884esac
13885
13886      $ac_path_FGREP_found && break 3
13887    done
13888  done
13889  done
13890IFS=$as_save_IFS
13891  if test -z "$ac_cv_path_FGREP"; then
13892    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13893  fi
13894else
13895  ac_cv_path_FGREP=$FGREP
13896fi
13897
13898   fi
13899fi
13900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13901$as_echo "$ac_cv_path_FGREP" >&6; }
13902 FGREP="$ac_cv_path_FGREP"
13903
13904
13905  else
13906    # The variable is set, but is it from the command line or the environment?
13907
13908    # Try to remove the string !FGREP! from our list.
13909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13911      # If it failed, the variable was not from the command line. Ignore it,
13912      # but warn the user (except for BASH, which is always set by the calling BASH).
13913      if test "xFGREP" != xBASH; then
13914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13915$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13916      fi
13917      # Try to locate tool using the code snippet
13918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13919$as_echo_n "checking for fgrep... " >&6; }
13920if ${ac_cv_path_FGREP+:} false; then :
13921  $as_echo_n "(cached) " >&6
13922else
13923  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13924   then ac_cv_path_FGREP="$GREP -F"
13925   else
13926     if test -z "$FGREP"; then
13927  ac_path_FGREP_found=false
13928  # Loop through the user's path and test for each of PROGNAME-LIST
13929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13930for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13931do
13932  IFS=$as_save_IFS
13933  test -z "$as_dir" && as_dir=.
13934    for ac_prog in fgrep; do
13935    for ac_exec_ext in '' $ac_executable_extensions; do
13936      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13937      as_fn_executable_p "$ac_path_FGREP" || continue
13938# Check for GNU ac_path_FGREP and select it if it is found.
13939  # Check for GNU $ac_path_FGREP
13940case `"$ac_path_FGREP" --version 2>&1` in
13941*GNU*)
13942  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13943*)
13944  ac_count=0
13945  $as_echo_n 0123456789 >"conftest.in"
13946  while :
13947  do
13948    cat "conftest.in" "conftest.in" >"conftest.tmp"
13949    mv "conftest.tmp" "conftest.in"
13950    cp "conftest.in" "conftest.nl"
13951    $as_echo 'FGREP' >> "conftest.nl"
13952    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13953    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13954    as_fn_arith $ac_count + 1 && ac_count=$as_val
13955    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13956      # Best one so far, save it but keep looking for a better one
13957      ac_cv_path_FGREP="$ac_path_FGREP"
13958      ac_path_FGREP_max=$ac_count
13959    fi
13960    # 10*(2^10) chars as input seems more than enough
13961    test $ac_count -gt 10 && break
13962  done
13963  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13964esac
13965
13966      $ac_path_FGREP_found && break 3
13967    done
13968  done
13969  done
13970IFS=$as_save_IFS
13971  if test -z "$ac_cv_path_FGREP"; then
13972    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13973  fi
13974else
13975  ac_cv_path_FGREP=$FGREP
13976fi
13977
13978   fi
13979fi
13980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13981$as_echo "$ac_cv_path_FGREP" >&6; }
13982 FGREP="$ac_cv_path_FGREP"
13983
13984
13985    else
13986      # If it succeeded, then it was overridden by the user. We will use it
13987      # for the tool.
13988
13989      # First remove it from the list of overridden variables, so we can test
13990      # for unknown variables in the end.
13991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13992
13993      # Check if we try to supply an empty value
13994      if test "x$FGREP" = x; then
13995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13996$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13998$as_echo_n "checking for FGREP... " >&6; }
13999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14000$as_echo "disabled" >&6; }
14001      else
14002        # Check if the provided tool contains a complete path.
14003        tool_specified="$FGREP"
14004        tool_basename="${tool_specified##*/}"
14005        if test "x$tool_basename" = "x$tool_specified"; then
14006          # A command without a complete path is provided, search $PATH.
14007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14008$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14009          # Extract the first word of "$tool_basename", so it can be a program name with args.
14010set dummy $tool_basename; ac_word=$2
14011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14012$as_echo_n "checking for $ac_word... " >&6; }
14013if ${ac_cv_path_FGREP+:} false; then :
14014  $as_echo_n "(cached) " >&6
14015else
14016  case $FGREP in
14017  [\\/]* | ?:[\\/]*)
14018  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14019  ;;
14020  *)
14021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14022for as_dir in $PATH
14023do
14024  IFS=$as_save_IFS
14025  test -z "$as_dir" && as_dir=.
14026    for ac_exec_ext in '' $ac_executable_extensions; do
14027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14028    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14030    break 2
14031  fi
14032done
14033  done
14034IFS=$as_save_IFS
14035
14036  ;;
14037esac
14038fi
14039FGREP=$ac_cv_path_FGREP
14040if test -n "$FGREP"; then
14041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14042$as_echo "$FGREP" >&6; }
14043else
14044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14045$as_echo "no" >&6; }
14046fi
14047
14048
14049          if test "x$FGREP" = x; then
14050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14051          fi
14052        else
14053          # Otherwise we believe it is a complete path. Use it as it is.
14054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14055$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14057$as_echo_n "checking for FGREP... " >&6; }
14058          if test ! -x "$tool_specified"; then
14059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14060$as_echo "not found" >&6; }
14061            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14062          fi
14063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14064$as_echo "$tool_specified" >&6; }
14065        fi
14066      fi
14067    fi
14068
14069  fi
14070
14071
14072  if test "x$FGREP" = x; then
14073    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14074  fi
14075
14076
14077
14078
14079  # Publish this variable in the help.
14080
14081
14082  if [ -z "${SED+x}" ]; then
14083    # The variable is not set by user, try to locate tool using the code snippet
14084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14085$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14086if ${ac_cv_path_SED+:} false; then :
14087  $as_echo_n "(cached) " >&6
14088else
14089            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14090     for ac_i in 1 2 3 4 5 6 7; do
14091       ac_script="$ac_script$as_nl$ac_script"
14092     done
14093     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14094     { ac_script=; unset ac_script;}
14095     if test -z "$SED"; then
14096  ac_path_SED_found=false
14097  # Loop through the user's path and test for each of PROGNAME-LIST
14098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14099for as_dir in $PATH
14100do
14101  IFS=$as_save_IFS
14102  test -z "$as_dir" && as_dir=.
14103    for ac_prog in sed gsed; do
14104    for ac_exec_ext in '' $ac_executable_extensions; do
14105      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14106      as_fn_executable_p "$ac_path_SED" || continue
14107# Check for GNU ac_path_SED and select it if it is found.
14108  # Check for GNU $ac_path_SED
14109case `"$ac_path_SED" --version 2>&1` in
14110*GNU*)
14111  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14112*)
14113  ac_count=0
14114  $as_echo_n 0123456789 >"conftest.in"
14115  while :
14116  do
14117    cat "conftest.in" "conftest.in" >"conftest.tmp"
14118    mv "conftest.tmp" "conftest.in"
14119    cp "conftest.in" "conftest.nl"
14120    $as_echo '' >> "conftest.nl"
14121    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14122    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14123    as_fn_arith $ac_count + 1 && ac_count=$as_val
14124    if test $ac_count -gt ${ac_path_SED_max-0}; then
14125      # Best one so far, save it but keep looking for a better one
14126      ac_cv_path_SED="$ac_path_SED"
14127      ac_path_SED_max=$ac_count
14128    fi
14129    # 10*(2^10) chars as input seems more than enough
14130    test $ac_count -gt 10 && break
14131  done
14132  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14133esac
14134
14135      $ac_path_SED_found && break 3
14136    done
14137  done
14138  done
14139IFS=$as_save_IFS
14140  if test -z "$ac_cv_path_SED"; then
14141    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14142  fi
14143else
14144  ac_cv_path_SED=$SED
14145fi
14146
14147fi
14148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14149$as_echo "$ac_cv_path_SED" >&6; }
14150 SED="$ac_cv_path_SED"
14151  rm -f conftest.sed
14152
14153  else
14154    # The variable is set, but is it from the command line or the environment?
14155
14156    # Try to remove the string !SED! from our list.
14157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14159      # If it failed, the variable was not from the command line. Ignore it,
14160      # but warn the user (except for BASH, which is always set by the calling BASH).
14161      if test "xSED" != xBASH; then
14162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14163$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14164      fi
14165      # Try to locate tool using the code snippet
14166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14167$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14168if ${ac_cv_path_SED+:} false; then :
14169  $as_echo_n "(cached) " >&6
14170else
14171            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14172     for ac_i in 1 2 3 4 5 6 7; do
14173       ac_script="$ac_script$as_nl$ac_script"
14174     done
14175     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14176     { ac_script=; unset ac_script;}
14177     if test -z "$SED"; then
14178  ac_path_SED_found=false
14179  # Loop through the user's path and test for each of PROGNAME-LIST
14180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14181for as_dir in $PATH
14182do
14183  IFS=$as_save_IFS
14184  test -z "$as_dir" && as_dir=.
14185    for ac_prog in sed gsed; do
14186    for ac_exec_ext in '' $ac_executable_extensions; do
14187      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14188      as_fn_executable_p "$ac_path_SED" || continue
14189# Check for GNU ac_path_SED and select it if it is found.
14190  # Check for GNU $ac_path_SED
14191case `"$ac_path_SED" --version 2>&1` in
14192*GNU*)
14193  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14194*)
14195  ac_count=0
14196  $as_echo_n 0123456789 >"conftest.in"
14197  while :
14198  do
14199    cat "conftest.in" "conftest.in" >"conftest.tmp"
14200    mv "conftest.tmp" "conftest.in"
14201    cp "conftest.in" "conftest.nl"
14202    $as_echo '' >> "conftest.nl"
14203    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14204    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14205    as_fn_arith $ac_count + 1 && ac_count=$as_val
14206    if test $ac_count -gt ${ac_path_SED_max-0}; then
14207      # Best one so far, save it but keep looking for a better one
14208      ac_cv_path_SED="$ac_path_SED"
14209      ac_path_SED_max=$ac_count
14210    fi
14211    # 10*(2^10) chars as input seems more than enough
14212    test $ac_count -gt 10 && break
14213  done
14214  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14215esac
14216
14217      $ac_path_SED_found && break 3
14218    done
14219  done
14220  done
14221IFS=$as_save_IFS
14222  if test -z "$ac_cv_path_SED"; then
14223    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14224  fi
14225else
14226  ac_cv_path_SED=$SED
14227fi
14228
14229fi
14230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14231$as_echo "$ac_cv_path_SED" >&6; }
14232 SED="$ac_cv_path_SED"
14233  rm -f conftest.sed
14234
14235    else
14236      # If it succeeded, then it was overridden by the user. We will use it
14237      # for the tool.
14238
14239      # First remove it from the list of overridden variables, so we can test
14240      # for unknown variables in the end.
14241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14242
14243      # Check if we try to supply an empty value
14244      if test "x$SED" = x; then
14245        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14246$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14248$as_echo_n "checking for SED... " >&6; }
14249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14250$as_echo "disabled" >&6; }
14251      else
14252        # Check if the provided tool contains a complete path.
14253        tool_specified="$SED"
14254        tool_basename="${tool_specified##*/}"
14255        if test "x$tool_basename" = "x$tool_specified"; then
14256          # A command without a complete path is provided, search $PATH.
14257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14258$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14259          # Extract the first word of "$tool_basename", so it can be a program name with args.
14260set dummy $tool_basename; ac_word=$2
14261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14262$as_echo_n "checking for $ac_word... " >&6; }
14263if ${ac_cv_path_SED+:} false; then :
14264  $as_echo_n "(cached) " >&6
14265else
14266  case $SED in
14267  [\\/]* | ?:[\\/]*)
14268  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14269  ;;
14270  *)
14271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14272for as_dir in $PATH
14273do
14274  IFS=$as_save_IFS
14275  test -z "$as_dir" && as_dir=.
14276    for ac_exec_ext in '' $ac_executable_extensions; do
14277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14278    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14280    break 2
14281  fi
14282done
14283  done
14284IFS=$as_save_IFS
14285
14286  ;;
14287esac
14288fi
14289SED=$ac_cv_path_SED
14290if test -n "$SED"; then
14291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14292$as_echo "$SED" >&6; }
14293else
14294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14295$as_echo "no" >&6; }
14296fi
14297
14298
14299          if test "x$SED" = x; then
14300            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14301          fi
14302        else
14303          # Otherwise we believe it is a complete path. Use it as it is.
14304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14305$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14306          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14307$as_echo_n "checking for SED... " >&6; }
14308          if test ! -x "$tool_specified"; then
14309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14310$as_echo "not found" >&6; }
14311            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14312          fi
14313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14314$as_echo "$tool_specified" >&6; }
14315        fi
14316      fi
14317    fi
14318
14319  fi
14320
14321
14322  if test "x$SED" = x; then
14323    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14324  fi
14325
14326
14327
14328  # Always force rm.
14329  RM="$RM -f"
14330
14331  # pwd behaves differently on various platforms and some don't support the -L flag.
14332  # Always use the bash builtin pwd to get uniform behavior.
14333  THEPWDCMD=pwd
14334
14335  # These are not required on all platforms
14336
14337
14338  # Publish this variable in the help.
14339
14340
14341  if [ -z "${CYGPATH+x}" ]; then
14342    # The variable is not set by user, try to locate tool using the code snippet
14343    for ac_prog in cygpath
14344do
14345  # Extract the first word of "$ac_prog", so it can be a program name with args.
14346set dummy $ac_prog; ac_word=$2
14347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14348$as_echo_n "checking for $ac_word... " >&6; }
14349if ${ac_cv_path_CYGPATH+:} false; then :
14350  $as_echo_n "(cached) " >&6
14351else
14352  case $CYGPATH in
14353  [\\/]* | ?:[\\/]*)
14354  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14355  ;;
14356  *)
14357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14358for as_dir in $PATH
14359do
14360  IFS=$as_save_IFS
14361  test -z "$as_dir" && as_dir=.
14362    for ac_exec_ext in '' $ac_executable_extensions; do
14363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14364    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14366    break 2
14367  fi
14368done
14369  done
14370IFS=$as_save_IFS
14371
14372  ;;
14373esac
14374fi
14375CYGPATH=$ac_cv_path_CYGPATH
14376if test -n "$CYGPATH"; then
14377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14378$as_echo "$CYGPATH" >&6; }
14379else
14380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14381$as_echo "no" >&6; }
14382fi
14383
14384
14385  test -n "$CYGPATH" && break
14386done
14387
14388  else
14389    # The variable is set, but is it from the command line or the environment?
14390
14391    # Try to remove the string !CYGPATH! from our list.
14392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14394      # If it failed, the variable was not from the command line. Ignore it,
14395      # but warn the user (except for BASH, which is always set by the calling BASH).
14396      if test "xCYGPATH" != xBASH; then
14397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14398$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14399      fi
14400      # Try to locate tool using the code snippet
14401      for ac_prog in cygpath
14402do
14403  # Extract the first word of "$ac_prog", so it can be a program name with args.
14404set dummy $ac_prog; ac_word=$2
14405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14406$as_echo_n "checking for $ac_word... " >&6; }
14407if ${ac_cv_path_CYGPATH+:} false; then :
14408  $as_echo_n "(cached) " >&6
14409else
14410  case $CYGPATH in
14411  [\\/]* | ?:[\\/]*)
14412  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14413  ;;
14414  *)
14415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14416for as_dir in $PATH
14417do
14418  IFS=$as_save_IFS
14419  test -z "$as_dir" && as_dir=.
14420    for ac_exec_ext in '' $ac_executable_extensions; do
14421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14422    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14424    break 2
14425  fi
14426done
14427  done
14428IFS=$as_save_IFS
14429
14430  ;;
14431esac
14432fi
14433CYGPATH=$ac_cv_path_CYGPATH
14434if test -n "$CYGPATH"; then
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14436$as_echo "$CYGPATH" >&6; }
14437else
14438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14439$as_echo "no" >&6; }
14440fi
14441
14442
14443  test -n "$CYGPATH" && break
14444done
14445
14446    else
14447      # If it succeeded, then it was overridden by the user. We will use it
14448      # for the tool.
14449
14450      # First remove it from the list of overridden variables, so we can test
14451      # for unknown variables in the end.
14452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14453
14454      # Check if we try to supply an empty value
14455      if test "x$CYGPATH" = x; then
14456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14457$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14459$as_echo_n "checking for CYGPATH... " >&6; }
14460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14461$as_echo "disabled" >&6; }
14462      else
14463        # Check if the provided tool contains a complete path.
14464        tool_specified="$CYGPATH"
14465        tool_basename="${tool_specified##*/}"
14466        if test "x$tool_basename" = "x$tool_specified"; then
14467          # A command without a complete path is provided, search $PATH.
14468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14469$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14470          # Extract the first word of "$tool_basename", so it can be a program name with args.
14471set dummy $tool_basename; ac_word=$2
14472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14473$as_echo_n "checking for $ac_word... " >&6; }
14474if ${ac_cv_path_CYGPATH+:} false; then :
14475  $as_echo_n "(cached) " >&6
14476else
14477  case $CYGPATH in
14478  [\\/]* | ?:[\\/]*)
14479  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14480  ;;
14481  *)
14482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14483for as_dir in $PATH
14484do
14485  IFS=$as_save_IFS
14486  test -z "$as_dir" && as_dir=.
14487    for ac_exec_ext in '' $ac_executable_extensions; do
14488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14489    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14491    break 2
14492  fi
14493done
14494  done
14495IFS=$as_save_IFS
14496
14497  ;;
14498esac
14499fi
14500CYGPATH=$ac_cv_path_CYGPATH
14501if test -n "$CYGPATH"; then
14502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14503$as_echo "$CYGPATH" >&6; }
14504else
14505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14506$as_echo "no" >&6; }
14507fi
14508
14509
14510          if test "x$CYGPATH" = x; then
14511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14512          fi
14513        else
14514          # Otherwise we believe it is a complete path. Use it as it is.
14515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14516$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14518$as_echo_n "checking for CYGPATH... " >&6; }
14519          if test ! -x "$tool_specified"; then
14520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14521$as_echo "not found" >&6; }
14522            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14523          fi
14524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14525$as_echo "$tool_specified" >&6; }
14526        fi
14527      fi
14528    fi
14529
14530  fi
14531
14532
14533
14534
14535  # Publish this variable in the help.
14536
14537
14538  if [ -z "${READLINK+x}" ]; then
14539    # The variable is not set by user, try to locate tool using the code snippet
14540    for ac_prog in greadlink readlink
14541do
14542  # Extract the first word of "$ac_prog", so it can be a program name with args.
14543set dummy $ac_prog; ac_word=$2
14544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14545$as_echo_n "checking for $ac_word... " >&6; }
14546if ${ac_cv_path_READLINK+:} false; then :
14547  $as_echo_n "(cached) " >&6
14548else
14549  case $READLINK in
14550  [\\/]* | ?:[\\/]*)
14551  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14552  ;;
14553  *)
14554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14555for as_dir in $PATH
14556do
14557  IFS=$as_save_IFS
14558  test -z "$as_dir" && as_dir=.
14559    for ac_exec_ext in '' $ac_executable_extensions; do
14560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14561    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14563    break 2
14564  fi
14565done
14566  done
14567IFS=$as_save_IFS
14568
14569  ;;
14570esac
14571fi
14572READLINK=$ac_cv_path_READLINK
14573if test -n "$READLINK"; then
14574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14575$as_echo "$READLINK" >&6; }
14576else
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14578$as_echo "no" >&6; }
14579fi
14580
14581
14582  test -n "$READLINK" && break
14583done
14584
14585  else
14586    # The variable is set, but is it from the command line or the environment?
14587
14588    # Try to remove the string !READLINK! from our list.
14589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14591      # If it failed, the variable was not from the command line. Ignore it,
14592      # but warn the user (except for BASH, which is always set by the calling BASH).
14593      if test "xREADLINK" != xBASH; then
14594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14595$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14596      fi
14597      # Try to locate tool using the code snippet
14598      for ac_prog in greadlink readlink
14599do
14600  # Extract the first word of "$ac_prog", so it can be a program name with args.
14601set dummy $ac_prog; ac_word=$2
14602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14603$as_echo_n "checking for $ac_word... " >&6; }
14604if ${ac_cv_path_READLINK+:} false; then :
14605  $as_echo_n "(cached) " >&6
14606else
14607  case $READLINK in
14608  [\\/]* | ?:[\\/]*)
14609  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14610  ;;
14611  *)
14612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14613for as_dir in $PATH
14614do
14615  IFS=$as_save_IFS
14616  test -z "$as_dir" && as_dir=.
14617    for ac_exec_ext in '' $ac_executable_extensions; do
14618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14619    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14621    break 2
14622  fi
14623done
14624  done
14625IFS=$as_save_IFS
14626
14627  ;;
14628esac
14629fi
14630READLINK=$ac_cv_path_READLINK
14631if test -n "$READLINK"; then
14632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14633$as_echo "$READLINK" >&6; }
14634else
14635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14636$as_echo "no" >&6; }
14637fi
14638
14639
14640  test -n "$READLINK" && break
14641done
14642
14643    else
14644      # If it succeeded, then it was overridden by the user. We will use it
14645      # for the tool.
14646
14647      # First remove it from the list of overridden variables, so we can test
14648      # for unknown variables in the end.
14649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14650
14651      # Check if we try to supply an empty value
14652      if test "x$READLINK" = x; then
14653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14654$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14656$as_echo_n "checking for READLINK... " >&6; }
14657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14658$as_echo "disabled" >&6; }
14659      else
14660        # Check if the provided tool contains a complete path.
14661        tool_specified="$READLINK"
14662        tool_basename="${tool_specified##*/}"
14663        if test "x$tool_basename" = "x$tool_specified"; then
14664          # A command without a complete path is provided, search $PATH.
14665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14666$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14667          # Extract the first word of "$tool_basename", so it can be a program name with args.
14668set dummy $tool_basename; ac_word=$2
14669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14670$as_echo_n "checking for $ac_word... " >&6; }
14671if ${ac_cv_path_READLINK+:} false; then :
14672  $as_echo_n "(cached) " >&6
14673else
14674  case $READLINK in
14675  [\\/]* | ?:[\\/]*)
14676  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14677  ;;
14678  *)
14679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14680for as_dir in $PATH
14681do
14682  IFS=$as_save_IFS
14683  test -z "$as_dir" && as_dir=.
14684    for ac_exec_ext in '' $ac_executable_extensions; do
14685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14686    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14688    break 2
14689  fi
14690done
14691  done
14692IFS=$as_save_IFS
14693
14694  ;;
14695esac
14696fi
14697READLINK=$ac_cv_path_READLINK
14698if test -n "$READLINK"; then
14699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14700$as_echo "$READLINK" >&6; }
14701else
14702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14703$as_echo "no" >&6; }
14704fi
14705
14706
14707          if test "x$READLINK" = x; then
14708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14709          fi
14710        else
14711          # Otherwise we believe it is a complete path. Use it as it is.
14712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14713$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14715$as_echo_n "checking for READLINK... " >&6; }
14716          if test ! -x "$tool_specified"; then
14717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14718$as_echo "not found" >&6; }
14719            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14720          fi
14721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14722$as_echo "$tool_specified" >&6; }
14723        fi
14724      fi
14725    fi
14726
14727  fi
14728
14729
14730
14731
14732  # Publish this variable in the help.
14733
14734
14735  if [ -z "${DF+x}" ]; then
14736    # The variable is not set by user, try to locate tool using the code snippet
14737    for ac_prog in df
14738do
14739  # Extract the first word of "$ac_prog", so it can be a program name with args.
14740set dummy $ac_prog; ac_word=$2
14741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14742$as_echo_n "checking for $ac_word... " >&6; }
14743if ${ac_cv_path_DF+:} false; then :
14744  $as_echo_n "(cached) " >&6
14745else
14746  case $DF in
14747  [\\/]* | ?:[\\/]*)
14748  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14749  ;;
14750  *)
14751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14752for as_dir in $PATH
14753do
14754  IFS=$as_save_IFS
14755  test -z "$as_dir" && as_dir=.
14756    for ac_exec_ext in '' $ac_executable_extensions; do
14757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14758    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14760    break 2
14761  fi
14762done
14763  done
14764IFS=$as_save_IFS
14765
14766  ;;
14767esac
14768fi
14769DF=$ac_cv_path_DF
14770if test -n "$DF"; then
14771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14772$as_echo "$DF" >&6; }
14773else
14774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14775$as_echo "no" >&6; }
14776fi
14777
14778
14779  test -n "$DF" && break
14780done
14781
14782  else
14783    # The variable is set, but is it from the command line or the environment?
14784
14785    # Try to remove the string !DF! from our list.
14786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14788      # If it failed, the variable was not from the command line. Ignore it,
14789      # but warn the user (except for BASH, which is always set by the calling BASH).
14790      if test "xDF" != xBASH; then
14791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14792$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14793      fi
14794      # Try to locate tool using the code snippet
14795      for ac_prog in df
14796do
14797  # Extract the first word of "$ac_prog", so it can be a program name with args.
14798set dummy $ac_prog; ac_word=$2
14799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14800$as_echo_n "checking for $ac_word... " >&6; }
14801if ${ac_cv_path_DF+:} false; then :
14802  $as_echo_n "(cached) " >&6
14803else
14804  case $DF in
14805  [\\/]* | ?:[\\/]*)
14806  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14807  ;;
14808  *)
14809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14810for as_dir in $PATH
14811do
14812  IFS=$as_save_IFS
14813  test -z "$as_dir" && as_dir=.
14814    for ac_exec_ext in '' $ac_executable_extensions; do
14815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14816    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14818    break 2
14819  fi
14820done
14821  done
14822IFS=$as_save_IFS
14823
14824  ;;
14825esac
14826fi
14827DF=$ac_cv_path_DF
14828if test -n "$DF"; then
14829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14830$as_echo "$DF" >&6; }
14831else
14832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14833$as_echo "no" >&6; }
14834fi
14835
14836
14837  test -n "$DF" && break
14838done
14839
14840    else
14841      # If it succeeded, then it was overridden by the user. We will use it
14842      # for the tool.
14843
14844      # First remove it from the list of overridden variables, so we can test
14845      # for unknown variables in the end.
14846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14847
14848      # Check if we try to supply an empty value
14849      if test "x$DF" = x; then
14850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14851$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14853$as_echo_n "checking for DF... " >&6; }
14854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14855$as_echo "disabled" >&6; }
14856      else
14857        # Check if the provided tool contains a complete path.
14858        tool_specified="$DF"
14859        tool_basename="${tool_specified##*/}"
14860        if test "x$tool_basename" = "x$tool_specified"; then
14861          # A command without a complete path is provided, search $PATH.
14862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14863$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14864          # Extract the first word of "$tool_basename", so it can be a program name with args.
14865set dummy $tool_basename; ac_word=$2
14866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14867$as_echo_n "checking for $ac_word... " >&6; }
14868if ${ac_cv_path_DF+:} false; then :
14869  $as_echo_n "(cached) " >&6
14870else
14871  case $DF in
14872  [\\/]* | ?:[\\/]*)
14873  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14874  ;;
14875  *)
14876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14877for as_dir in $PATH
14878do
14879  IFS=$as_save_IFS
14880  test -z "$as_dir" && as_dir=.
14881    for ac_exec_ext in '' $ac_executable_extensions; do
14882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14883    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14885    break 2
14886  fi
14887done
14888  done
14889IFS=$as_save_IFS
14890
14891  ;;
14892esac
14893fi
14894DF=$ac_cv_path_DF
14895if test -n "$DF"; then
14896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14897$as_echo "$DF" >&6; }
14898else
14899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14900$as_echo "no" >&6; }
14901fi
14902
14903
14904          if test "x$DF" = x; then
14905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14906          fi
14907        else
14908          # Otherwise we believe it is a complete path. Use it as it is.
14909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14910$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14912$as_echo_n "checking for DF... " >&6; }
14913          if test ! -x "$tool_specified"; then
14914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14915$as_echo "not found" >&6; }
14916            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14917          fi
14918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14919$as_echo "$tool_specified" >&6; }
14920        fi
14921      fi
14922    fi
14923
14924  fi
14925
14926
14927
14928
14929  # Publish this variable in the help.
14930
14931
14932  if [ -z "${CPIO+x}" ]; then
14933    # The variable is not set by user, try to locate tool using the code snippet
14934    for ac_prog in cpio bsdcpio
14935do
14936  # Extract the first word of "$ac_prog", so it can be a program name with args.
14937set dummy $ac_prog; ac_word=$2
14938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14939$as_echo_n "checking for $ac_word... " >&6; }
14940if ${ac_cv_path_CPIO+:} false; then :
14941  $as_echo_n "(cached) " >&6
14942else
14943  case $CPIO in
14944  [\\/]* | ?:[\\/]*)
14945  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14946  ;;
14947  *)
14948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14949for as_dir in $PATH
14950do
14951  IFS=$as_save_IFS
14952  test -z "$as_dir" && as_dir=.
14953    for ac_exec_ext in '' $ac_executable_extensions; do
14954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14955    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14957    break 2
14958  fi
14959done
14960  done
14961IFS=$as_save_IFS
14962
14963  ;;
14964esac
14965fi
14966CPIO=$ac_cv_path_CPIO
14967if test -n "$CPIO"; then
14968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14969$as_echo "$CPIO" >&6; }
14970else
14971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14972$as_echo "no" >&6; }
14973fi
14974
14975
14976  test -n "$CPIO" && break
14977done
14978
14979  else
14980    # The variable is set, but is it from the command line or the environment?
14981
14982    # Try to remove the string !CPIO! from our list.
14983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14985      # If it failed, the variable was not from the command line. Ignore it,
14986      # but warn the user (except for BASH, which is always set by the calling BASH).
14987      if test "xCPIO" != xBASH; then
14988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14989$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14990      fi
14991      # Try to locate tool using the code snippet
14992      for ac_prog in cpio bsdcpio
14993do
14994  # Extract the first word of "$ac_prog", so it can be a program name with args.
14995set dummy $ac_prog; ac_word=$2
14996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14997$as_echo_n "checking for $ac_word... " >&6; }
14998if ${ac_cv_path_CPIO+:} false; then :
14999  $as_echo_n "(cached) " >&6
15000else
15001  case $CPIO in
15002  [\\/]* | ?:[\\/]*)
15003  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15004  ;;
15005  *)
15006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15007for as_dir in $PATH
15008do
15009  IFS=$as_save_IFS
15010  test -z "$as_dir" && as_dir=.
15011    for ac_exec_ext in '' $ac_executable_extensions; do
15012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15013    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15015    break 2
15016  fi
15017done
15018  done
15019IFS=$as_save_IFS
15020
15021  ;;
15022esac
15023fi
15024CPIO=$ac_cv_path_CPIO
15025if test -n "$CPIO"; then
15026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15027$as_echo "$CPIO" >&6; }
15028else
15029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15030$as_echo "no" >&6; }
15031fi
15032
15033
15034  test -n "$CPIO" && break
15035done
15036
15037    else
15038      # If it succeeded, then it was overridden by the user. We will use it
15039      # for the tool.
15040
15041      # First remove it from the list of overridden variables, so we can test
15042      # for unknown variables in the end.
15043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15044
15045      # Check if we try to supply an empty value
15046      if test "x$CPIO" = x; then
15047        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15048$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15050$as_echo_n "checking for CPIO... " >&6; }
15051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15052$as_echo "disabled" >&6; }
15053      else
15054        # Check if the provided tool contains a complete path.
15055        tool_specified="$CPIO"
15056        tool_basename="${tool_specified##*/}"
15057        if test "x$tool_basename" = "x$tool_specified"; then
15058          # A command without a complete path is provided, search $PATH.
15059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15060$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15061          # Extract the first word of "$tool_basename", so it can be a program name with args.
15062set dummy $tool_basename; ac_word=$2
15063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15064$as_echo_n "checking for $ac_word... " >&6; }
15065if ${ac_cv_path_CPIO+:} false; then :
15066  $as_echo_n "(cached) " >&6
15067else
15068  case $CPIO in
15069  [\\/]* | ?:[\\/]*)
15070  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15071  ;;
15072  *)
15073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15074for as_dir in $PATH
15075do
15076  IFS=$as_save_IFS
15077  test -z "$as_dir" && as_dir=.
15078    for ac_exec_ext in '' $ac_executable_extensions; do
15079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15080    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15082    break 2
15083  fi
15084done
15085  done
15086IFS=$as_save_IFS
15087
15088  ;;
15089esac
15090fi
15091CPIO=$ac_cv_path_CPIO
15092if test -n "$CPIO"; then
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15094$as_echo "$CPIO" >&6; }
15095else
15096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15097$as_echo "no" >&6; }
15098fi
15099
15100
15101          if test "x$CPIO" = x; then
15102            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15103          fi
15104        else
15105          # Otherwise we believe it is a complete path. Use it as it is.
15106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15107$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15108          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15109$as_echo_n "checking for CPIO... " >&6; }
15110          if test ! -x "$tool_specified"; then
15111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15112$as_echo "not found" >&6; }
15113            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15114          fi
15115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15116$as_echo "$tool_specified" >&6; }
15117        fi
15118      fi
15119    fi
15120
15121  fi
15122
15123
15124
15125
15126  # Publish this variable in the help.
15127
15128
15129  if [ -z "${NICE+x}" ]; then
15130    # The variable is not set by user, try to locate tool using the code snippet
15131    for ac_prog in nice
15132do
15133  # Extract the first word of "$ac_prog", so it can be a program name with args.
15134set dummy $ac_prog; ac_word=$2
15135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15136$as_echo_n "checking for $ac_word... " >&6; }
15137if ${ac_cv_path_NICE+:} false; then :
15138  $as_echo_n "(cached) " >&6
15139else
15140  case $NICE in
15141  [\\/]* | ?:[\\/]*)
15142  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15143  ;;
15144  *)
15145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15146for as_dir in $PATH
15147do
15148  IFS=$as_save_IFS
15149  test -z "$as_dir" && as_dir=.
15150    for ac_exec_ext in '' $ac_executable_extensions; do
15151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15152    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15154    break 2
15155  fi
15156done
15157  done
15158IFS=$as_save_IFS
15159
15160  ;;
15161esac
15162fi
15163NICE=$ac_cv_path_NICE
15164if test -n "$NICE"; then
15165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15166$as_echo "$NICE" >&6; }
15167else
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15169$as_echo "no" >&6; }
15170fi
15171
15172
15173  test -n "$NICE" && break
15174done
15175
15176  else
15177    # The variable is set, but is it from the command line or the environment?
15178
15179    # Try to remove the string !NICE! from our list.
15180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15182      # If it failed, the variable was not from the command line. Ignore it,
15183      # but warn the user (except for BASH, which is always set by the calling BASH).
15184      if test "xNICE" != xBASH; then
15185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15186$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15187      fi
15188      # Try to locate tool using the code snippet
15189      for ac_prog in nice
15190do
15191  # Extract the first word of "$ac_prog", so it can be a program name with args.
15192set dummy $ac_prog; ac_word=$2
15193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15194$as_echo_n "checking for $ac_word... " >&6; }
15195if ${ac_cv_path_NICE+:} false; then :
15196  $as_echo_n "(cached) " >&6
15197else
15198  case $NICE in
15199  [\\/]* | ?:[\\/]*)
15200  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15201  ;;
15202  *)
15203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15204for as_dir in $PATH
15205do
15206  IFS=$as_save_IFS
15207  test -z "$as_dir" && as_dir=.
15208    for ac_exec_ext in '' $ac_executable_extensions; do
15209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15210    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15212    break 2
15213  fi
15214done
15215  done
15216IFS=$as_save_IFS
15217
15218  ;;
15219esac
15220fi
15221NICE=$ac_cv_path_NICE
15222if test -n "$NICE"; then
15223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15224$as_echo "$NICE" >&6; }
15225else
15226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15227$as_echo "no" >&6; }
15228fi
15229
15230
15231  test -n "$NICE" && break
15232done
15233
15234    else
15235      # If it succeeded, then it was overridden by the user. We will use it
15236      # for the tool.
15237
15238      # First remove it from the list of overridden variables, so we can test
15239      # for unknown variables in the end.
15240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15241
15242      # Check if we try to supply an empty value
15243      if test "x$NICE" = x; then
15244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15245$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15247$as_echo_n "checking for NICE... " >&6; }
15248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15249$as_echo "disabled" >&6; }
15250      else
15251        # Check if the provided tool contains a complete path.
15252        tool_specified="$NICE"
15253        tool_basename="${tool_specified##*/}"
15254        if test "x$tool_basename" = "x$tool_specified"; then
15255          # A command without a complete path is provided, search $PATH.
15256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15257$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15258          # Extract the first word of "$tool_basename", so it can be a program name with args.
15259set dummy $tool_basename; ac_word=$2
15260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15261$as_echo_n "checking for $ac_word... " >&6; }
15262if ${ac_cv_path_NICE+:} false; then :
15263  $as_echo_n "(cached) " >&6
15264else
15265  case $NICE in
15266  [\\/]* | ?:[\\/]*)
15267  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15268  ;;
15269  *)
15270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15271for as_dir in $PATH
15272do
15273  IFS=$as_save_IFS
15274  test -z "$as_dir" && as_dir=.
15275    for ac_exec_ext in '' $ac_executable_extensions; do
15276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15277    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15279    break 2
15280  fi
15281done
15282  done
15283IFS=$as_save_IFS
15284
15285  ;;
15286esac
15287fi
15288NICE=$ac_cv_path_NICE
15289if test -n "$NICE"; then
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15291$as_echo "$NICE" >&6; }
15292else
15293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15294$as_echo "no" >&6; }
15295fi
15296
15297
15298          if test "x$NICE" = x; then
15299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15300          fi
15301        else
15302          # Otherwise we believe it is a complete path. Use it as it is.
15303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15304$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15306$as_echo_n "checking for NICE... " >&6; }
15307          if test ! -x "$tool_specified"; then
15308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15309$as_echo "not found" >&6; }
15310            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15311          fi
15312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15313$as_echo "$tool_specified" >&6; }
15314        fi
15315      fi
15316    fi
15317
15318  fi
15319
15320
15321
15322
15323# Now we can determine OpenJDK build and target platforms. This is required to
15324# have early on.
15325# Make sure we can run config.sub.
15326$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15327  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15328
15329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15330$as_echo_n "checking build system type... " >&6; }
15331if ${ac_cv_build+:} false; then :
15332  $as_echo_n "(cached) " >&6
15333else
15334  ac_build_alias=$build_alias
15335test "x$ac_build_alias" = x &&
15336  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15337test "x$ac_build_alias" = x &&
15338  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15339ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15340  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15341
15342fi
15343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15344$as_echo "$ac_cv_build" >&6; }
15345case $ac_cv_build in
15346*-*-*) ;;
15347*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15348esac
15349build=$ac_cv_build
15350ac_save_IFS=$IFS; IFS='-'
15351set x $ac_cv_build
15352shift
15353build_cpu=$1
15354build_vendor=$2
15355shift; shift
15356# Remember, the first character of IFS is used to create $*,
15357# except with old shells:
15358build_os=$*
15359IFS=$ac_save_IFS
15360case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15361
15362
15363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15364$as_echo_n "checking host system type... " >&6; }
15365if ${ac_cv_host+:} false; then :
15366  $as_echo_n "(cached) " >&6
15367else
15368  if test "x$host_alias" = x; then
15369  ac_cv_host=$ac_cv_build
15370else
15371  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15372    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15373fi
15374
15375fi
15376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15377$as_echo "$ac_cv_host" >&6; }
15378case $ac_cv_host in
15379*-*-*) ;;
15380*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15381esac
15382host=$ac_cv_host
15383ac_save_IFS=$IFS; IFS='-'
15384set x $ac_cv_host
15385shift
15386host_cpu=$1
15387host_vendor=$2
15388shift; shift
15389# Remember, the first character of IFS is used to create $*,
15390# except with old shells:
15391host_os=$*
15392IFS=$ac_save_IFS
15393case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15394
15395
15396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15397$as_echo_n "checking target system type... " >&6; }
15398if ${ac_cv_target+:} false; then :
15399  $as_echo_n "(cached) " >&6
15400else
15401  if test "x$target_alias" = x; then
15402  ac_cv_target=$ac_cv_host
15403else
15404  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15405    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15406fi
15407
15408fi
15409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15410$as_echo "$ac_cv_target" >&6; }
15411case $ac_cv_target in
15412*-*-*) ;;
15413*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15414esac
15415target=$ac_cv_target
15416ac_save_IFS=$IFS; IFS='-'
15417set x $ac_cv_target
15418shift
15419target_cpu=$1
15420target_vendor=$2
15421shift; shift
15422# Remember, the first character of IFS is used to create $*,
15423# except with old shells:
15424target_os=$*
15425IFS=$ac_save_IFS
15426case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15427
15428
15429# The aliases save the names the user supplied, while $host etc.
15430# will get canonicalized.
15431test -n "$target_alias" &&
15432  test "$program_prefix$program_suffix$program_transform_name" = \
15433    NONENONEs,x,x, &&
15434  program_prefix=${target_alias}-
15435
15436  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15437  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15438  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15439  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15440  # to use the configure naming style.
15441
15442
15443
15444
15445
15446  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15447  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15448  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15449  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15450  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15451  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15452
15453
15454
15455  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15456
15457  case "$build_os" in
15458    *linux*)
15459      VAR_OS=linux
15460      VAR_OS_TYPE=unix
15461      ;;
15462    *solaris*)
15463      VAR_OS=solaris
15464      VAR_OS_TYPE=unix
15465      ;;
15466    *darwin*)
15467      VAR_OS=macosx
15468      VAR_OS_TYPE=unix
15469      ;;
15470    *bsd*)
15471      VAR_OS=bsd
15472      VAR_OS_TYPE=unix
15473      ;;
15474    *cygwin*)
15475      VAR_OS=windows
15476      VAR_OS_ENV=windows.cygwin
15477      ;;
15478    *mingw*)
15479      VAR_OS=windows
15480      VAR_OS_ENV=windows.msys
15481      ;;
15482    *aix*)
15483      VAR_OS=aix
15484      VAR_OS_TYPE=unix
15485      ;;
15486    *)
15487      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15488      ;;
15489  esac
15490
15491
15492  # First argument is the cpu name from the trip/quad
15493  case "$build_cpu" in
15494    x86_64)
15495      VAR_CPU=x86_64
15496      VAR_CPU_ARCH=x86
15497      VAR_CPU_BITS=64
15498      VAR_CPU_ENDIAN=little
15499      ;;
15500    i?86)
15501      VAR_CPU=x86
15502      VAR_CPU_ARCH=x86
15503      VAR_CPU_BITS=32
15504      VAR_CPU_ENDIAN=little
15505      ;;
15506    arm*)
15507      VAR_CPU=arm
15508      VAR_CPU_ARCH=arm
15509      VAR_CPU_BITS=32
15510      VAR_CPU_ENDIAN=little
15511      ;;
15512    aarch64)
15513      VAR_CPU=aarch64
15514      VAR_CPU_ARCH=aarch64
15515      VAR_CPU_BITS=64
15516      VAR_CPU_ENDIAN=little
15517      ;;
15518    powerpc)
15519      VAR_CPU=ppc
15520      VAR_CPU_ARCH=ppc
15521      VAR_CPU_BITS=32
15522      VAR_CPU_ENDIAN=big
15523      ;;
15524    powerpc64)
15525      VAR_CPU=ppc64
15526      VAR_CPU_ARCH=ppc
15527      VAR_CPU_BITS=64
15528      VAR_CPU_ENDIAN=big
15529      ;;
15530    powerpc64le)
15531      VAR_CPU=ppc64le
15532      VAR_CPU_ARCH=ppc
15533      VAR_CPU_BITS=64
15534      VAR_CPU_ENDIAN=little
15535      ;;
15536    s390)
15537      VAR_CPU=s390
15538      VAR_CPU_ARCH=s390
15539      VAR_CPU_BITS=32
15540      VAR_CPU_ENDIAN=big
15541      ;;
15542    s390x)
15543      VAR_CPU=s390x
15544      VAR_CPU_ARCH=s390
15545      VAR_CPU_BITS=64
15546      VAR_CPU_ENDIAN=big
15547      ;;
15548    sparc)
15549      VAR_CPU=sparc
15550      VAR_CPU_ARCH=sparc
15551      VAR_CPU_BITS=32
15552      VAR_CPU_ENDIAN=big
15553      ;;
15554    sparcv9|sparc64)
15555      VAR_CPU=sparcv9
15556      VAR_CPU_ARCH=sparc
15557      VAR_CPU_BITS=64
15558      VAR_CPU_ENDIAN=big
15559      ;;
15560    *)
15561      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15562      ;;
15563  esac
15564
15565  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15566  OPENJDK_BUILD_OS="$VAR_OS"
15567  if test "x$VAR_OS_TYPE" != x; then
15568    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15569  else
15570    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15571  fi
15572  if test "x$VAR_OS_ENV" != x; then
15573    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15574  else
15575    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15576  fi
15577  OPENJDK_BUILD_CPU="$VAR_CPU"
15578  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15579  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15580  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15581
15582
15583
15584
15585
15586
15587
15588
15589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15590$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15592$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15593
15594  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15595
15596  case "$host_os" in
15597    *linux*)
15598      VAR_OS=linux
15599      VAR_OS_TYPE=unix
15600      ;;
15601    *solaris*)
15602      VAR_OS=solaris
15603      VAR_OS_TYPE=unix
15604      ;;
15605    *darwin*)
15606      VAR_OS=macosx
15607      VAR_OS_TYPE=unix
15608      ;;
15609    *bsd*)
15610      VAR_OS=bsd
15611      VAR_OS_TYPE=unix
15612      ;;
15613    *cygwin*)
15614      VAR_OS=windows
15615      VAR_OS_ENV=windows.cygwin
15616      ;;
15617    *mingw*)
15618      VAR_OS=windows
15619      VAR_OS_ENV=windows.msys
15620      ;;
15621    *aix*)
15622      VAR_OS=aix
15623      VAR_OS_TYPE=unix
15624      ;;
15625    *)
15626      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15627      ;;
15628  esac
15629
15630
15631  # First argument is the cpu name from the trip/quad
15632  case "$host_cpu" in
15633    x86_64)
15634      VAR_CPU=x86_64
15635      VAR_CPU_ARCH=x86
15636      VAR_CPU_BITS=64
15637      VAR_CPU_ENDIAN=little
15638      ;;
15639    i?86)
15640      VAR_CPU=x86
15641      VAR_CPU_ARCH=x86
15642      VAR_CPU_BITS=32
15643      VAR_CPU_ENDIAN=little
15644      ;;
15645    arm*)
15646      VAR_CPU=arm
15647      VAR_CPU_ARCH=arm
15648      VAR_CPU_BITS=32
15649      VAR_CPU_ENDIAN=little
15650      ;;
15651    aarch64)
15652      VAR_CPU=aarch64
15653      VAR_CPU_ARCH=aarch64
15654      VAR_CPU_BITS=64
15655      VAR_CPU_ENDIAN=little
15656      ;;
15657    powerpc)
15658      VAR_CPU=ppc
15659      VAR_CPU_ARCH=ppc
15660      VAR_CPU_BITS=32
15661      VAR_CPU_ENDIAN=big
15662      ;;
15663    powerpc64)
15664      VAR_CPU=ppc64
15665      VAR_CPU_ARCH=ppc
15666      VAR_CPU_BITS=64
15667      VAR_CPU_ENDIAN=big
15668      ;;
15669    powerpc64le)
15670      VAR_CPU=ppc64le
15671      VAR_CPU_ARCH=ppc
15672      VAR_CPU_BITS=64
15673      VAR_CPU_ENDIAN=little
15674      ;;
15675    s390)
15676      VAR_CPU=s390
15677      VAR_CPU_ARCH=s390
15678      VAR_CPU_BITS=32
15679      VAR_CPU_ENDIAN=big
15680      ;;
15681    s390x)
15682      VAR_CPU=s390x
15683      VAR_CPU_ARCH=s390
15684      VAR_CPU_BITS=64
15685      VAR_CPU_ENDIAN=big
15686      ;;
15687    sparc)
15688      VAR_CPU=sparc
15689      VAR_CPU_ARCH=sparc
15690      VAR_CPU_BITS=32
15691      VAR_CPU_ENDIAN=big
15692      ;;
15693    sparcv9|sparc64)
15694      VAR_CPU=sparcv9
15695      VAR_CPU_ARCH=sparc
15696      VAR_CPU_BITS=64
15697      VAR_CPU_ENDIAN=big
15698      ;;
15699    *)
15700      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15701      ;;
15702  esac
15703
15704  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15705  OPENJDK_TARGET_OS="$VAR_OS"
15706  if test "x$VAR_OS_TYPE" != x; then
15707    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15708  else
15709    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15710  fi
15711  if test "x$VAR_OS_ENV" != x; then
15712    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15713  else
15714    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15715  fi
15716  OPENJDK_TARGET_CPU="$VAR_CPU"
15717  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15718  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15719  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15720
15721
15722
15723
15724
15725
15726
15727
15728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15729$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15731$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15732
15733
15734
15735# Check whether --with-target-bits was given.
15736if test "${with_target_bits+set}" = set; then :
15737  withval=$with_target_bits;
15738fi
15739
15740
15741  # We have three types of compiles:
15742  # native  == normal compilation, target system == build system
15743  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15744  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15745  #
15746  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15747    # We're doing a proper cross-compilation
15748    COMPILE_TYPE="cross"
15749  else
15750    COMPILE_TYPE="native"
15751  fi
15752
15753  if test "x$with_target_bits" != x; then
15754    if test "x$COMPILE_TYPE" = "xcross"; then
15755      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15756    fi
15757
15758    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15759      # A reduced build is requested
15760      COMPILE_TYPE="reduced"
15761      OPENJDK_TARGET_CPU_BITS=32
15762      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15763        OPENJDK_TARGET_CPU=x86
15764      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15765        OPENJDK_TARGET_CPU=sparc
15766      else
15767        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15768      fi
15769    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15770      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
15771    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15772      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15773$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15774    else
15775      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15776    fi
15777  fi
15778
15779
15780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15781$as_echo_n "checking compilation type... " >&6; }
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15783$as_echo "$COMPILE_TYPE" >&6; }
15784
15785
15786  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15787    REQUIRED_OS_NAME=SunOS
15788    REQUIRED_OS_VERSION=5.10
15789  fi
15790  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15791    REQUIRED_OS_NAME=Linux
15792    REQUIRED_OS_VERSION=2.6
15793  fi
15794  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15795    REQUIRED_OS_NAME=Windows
15796    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15797      REQUIRED_OS_VERSION=5.2
15798    else
15799      REQUIRED_OS_VERSION=5.1
15800    fi
15801  fi
15802  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15803    REQUIRED_OS_NAME=Darwin
15804    REQUIRED_OS_VERSION=11.2
15805  fi
15806  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15807    REQUIRED_OS_NAME=AIX
15808    REQUIRED_OS_VERSION=7.1
15809  fi
15810
15811
15812
15813
15814
15815
15816  # Also store the legacy naming of the cpu.
15817  # Ie i586 and amd64 instead of x86 and x86_64
15818  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15819  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15820    OPENJDK_TARGET_CPU_LEGACY="i586"
15821  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15822    # On all platforms except MacOSX replace x86_64 with amd64.
15823    OPENJDK_TARGET_CPU_LEGACY="amd64"
15824  fi
15825
15826
15827  # And the second legacy naming of the cpu.
15828  # Ie i386 and amd64 instead of x86 and x86_64.
15829  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15830  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15831    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15832  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15833    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15834  fi
15835
15836
15837  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15838  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15839  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15840  OPENJDK_TARGET_CPU_ISADIR=""
15841  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15842    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15843      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15844    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15845      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15846    fi
15847  fi
15848
15849
15850  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15851  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15852  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15853    # On linux only, we replace x86 with i386.
15854    OPENJDK_TARGET_CPU_OSARCH="i386"
15855  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15856    # On all platforms except macosx, we replace x86_64 with amd64.
15857    OPENJDK_TARGET_CPU_OSARCH="amd64"
15858  fi
15859
15860
15861  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15862  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15863    OPENJDK_TARGET_CPU_JLI="i386"
15864  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15865    # On all platforms except macosx, we replace x86_64 with amd64.
15866    OPENJDK_TARGET_CPU_JLI="amd64"
15867  fi
15868
15869  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15870      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15871  else
15872      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15873  fi
15874
15875
15876  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15877  # Macosx is osx and x86_64 is x64
15878  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15879    OPENJDK_TARGET_OS_BUNDLE="osx"
15880  else
15881    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15882  fi
15883  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15884    OPENJDK_TARGET_CPU_BUNDLE="x64"
15885  else
15886    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15887  fi
15888  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15889
15890
15891  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15892    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15893    # unpack200.exe. This variable is used in
15894    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
15895    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15896      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15897    fi
15898  fi
15899
15900  if test "x$COMPILE_TYPE" = "xcross"; then
15901    # FIXME: ... or should this include reduced builds..?
15902    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15903  else
15904    DEFINE_CROSS_COMPILE_ARCH=""
15905  fi
15906
15907
15908  # Convert openjdk platform names to hotspot names
15909
15910  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15911  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15912    HOTSPOT_TARGET_OS=bsd
15913  fi
15914
15915
15916  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15917  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15918    HOTSPOT_TARGET_OS_TYPE=posix
15919  fi
15920
15921
15922  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15924    HOTSPOT_TARGET_CPU=x86_32
15925  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15926    HOTSPOT_TARGET_CPU=sparc
15927  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15928    HOTSPOT_TARGET_CPU=ppc_64
15929  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15930    HOTSPOT_TARGET_CPU=ppc_64
15931  fi
15932
15933
15934  # This is identical with OPENJDK_*, but define anyway for consistency.
15935  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15936
15937
15938  # Setup HOTSPOT_TARGET_CPU_DEFINE
15939  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15940    HOTSPOT_TARGET_CPU_DEFINE=IA32
15941  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15942    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15943  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15944    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15945  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15946    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15947  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15948    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15949  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15950    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15951
15952  # The cpu defines below are for zero, we don't support them directly.
15953  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15954    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15955  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15956    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15957  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15958    HOTSPOT_TARGET_CPU_DEFINE=S390
15959  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15960    HOTSPOT_TARGET_CPU_DEFINE=S390
15961  elif test "x$OPENJDK_TARGET_CPU" != x; then
15962    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15963  fi
15964
15965
15966
15967
15968  # Also store the legacy naming of the cpu.
15969  # Ie i586 and amd64 instead of x86 and x86_64
15970  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15971  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15972    OPENJDK_BUILD_CPU_LEGACY="i586"
15973  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15974    # On all platforms except MacOSX replace x86_64 with amd64.
15975    OPENJDK_BUILD_CPU_LEGACY="amd64"
15976  fi
15977
15978
15979  # And the second legacy naming of the cpu.
15980  # Ie i386 and amd64 instead of x86 and x86_64.
15981  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15982  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15983    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15984  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15985    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15986  fi
15987
15988
15989  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15990  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15991  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15992  OPENJDK_BUILD_CPU_ISADIR=""
15993  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15994    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15995      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15996    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15997      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15998    fi
15999  fi
16000
16001
16002  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16003  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16004  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16005    # On linux only, we replace x86 with i386.
16006    OPENJDK_BUILD_CPU_OSARCH="i386"
16007  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16008    # On all platforms except macosx, we replace x86_64 with amd64.
16009    OPENJDK_BUILD_CPU_OSARCH="amd64"
16010  fi
16011
16012
16013  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16014  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16015    OPENJDK_BUILD_CPU_JLI="i386"
16016  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16017    # On all platforms except macosx, we replace x86_64 with amd64.
16018    OPENJDK_BUILD_CPU_JLI="amd64"
16019  fi
16020
16021  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16022      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16023  else
16024      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16025  fi
16026
16027
16028  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16029  # Macosx is osx and x86_64 is x64
16030  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16031    OPENJDK_BUILD_OS_BUNDLE="osx"
16032  else
16033    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16034  fi
16035  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16036    OPENJDK_BUILD_CPU_BUNDLE="x64"
16037  else
16038    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16039  fi
16040  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16041
16042
16043  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16044    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16045    # unpack200.exe. This variable is used in
16046    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16047    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16048      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16049    fi
16050  fi
16051
16052  if test "x$COMPILE_TYPE" = "xcross"; then
16053    # FIXME: ... or should this include reduced builds..?
16054    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16055  else
16056    DEFINE_CROSS_COMPILE_ARCH=""
16057  fi
16058
16059
16060  # Convert openjdk platform names to hotspot names
16061
16062  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16063  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16064    HOTSPOT_BUILD_OS=bsd
16065  fi
16066
16067
16068  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16069  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16070    HOTSPOT_BUILD_OS_TYPE=posix
16071  fi
16072
16073
16074  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16075  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16076    HOTSPOT_BUILD_CPU=x86_32
16077  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16078    HOTSPOT_BUILD_CPU=sparc
16079  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16080    HOTSPOT_BUILD_CPU=ppc_64
16081  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16082    HOTSPOT_BUILD_CPU=ppc_64
16083  fi
16084
16085
16086  # This is identical with OPENJDK_*, but define anyway for consistency.
16087  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16088
16089
16090  # Setup HOTSPOT_BUILD_CPU_DEFINE
16091  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16092    HOTSPOT_BUILD_CPU_DEFINE=IA32
16093  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16094    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16095  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16096    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16097  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16098    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16099  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16101  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16102    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16103
16104  # The cpu defines below are for zero, we don't support them directly.
16105  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16106    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16109  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16110    HOTSPOT_BUILD_CPU_DEFINE=S390
16111  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16112    HOTSPOT_BUILD_CPU_DEFINE=S390
16113  elif test "x$OPENJDK_BUILD_CPU" != x; then
16114    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16115  fi
16116
16117
16118
16119
16120
16121
16122# Continue setting up basic stuff. Most remaining code require fundamental tools.
16123
16124  # Save the current directory this script was started from
16125  CURDIR="$PWD"
16126
16127  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16128  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16129  # was not available at that time.
16130  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16131  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16132    ORIGINAL_PATH="$REWRITTEN_PATH"
16133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16134$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16135  fi
16136
16137  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16138    PATH_SEP=";"
16139
16140  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16141  if test $SRC_ROOT_LENGTH -gt 100; then
16142    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16143  fi
16144
16145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16147$as_echo_n "checking cygwin release... " >&6; }
16148    CYGWIN_VERSION=`$UNAME -r`
16149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16150$as_echo "$CYGWIN_VERSION" >&6; }
16151    WINDOWS_ENV_VENDOR='cygwin'
16152    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16153
16154    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16155    if test "x$CYGWIN_VERSION_OLD" != x; then
16156      { $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
16157$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;}
16158      as_fn_error $? "Cannot continue" "$LINENO" 5
16159    fi
16160    if test "x$CYGPATH" = x; then
16161      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16162    fi
16163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16164$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16165    # The cmd output ends with Windows line endings (CR/LF)
16166    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16167    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16168    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16170$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16171    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16172    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16173    if test "x$test_cygdrive_prefix" = x; then
16174      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16175    fi
16176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16178$as_echo_n "checking msys release... " >&6; }
16179    MSYS_VERSION=`$UNAME -r`
16180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16181$as_echo "$MSYS_VERSION" >&6; }
16182
16183    WINDOWS_ENV_VENDOR='msys'
16184    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16185
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16187$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16188    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16189    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16190
16191  windows_path="$MSYS_ROOT_PATH"
16192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16193    unix_path=`$CYGPATH -u "$windows_path"`
16194    MSYS_ROOT_PATH="$unix_path"
16195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16197    MSYS_ROOT_PATH="$unix_path"
16198  fi
16199
16200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16201$as_echo "$MSYS_ROOT_PATH" >&6; }
16202    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16203  else
16204    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16205  fi
16206
16207  # Test if windows or unix (cygwin/msys) find is first in path.
16208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16209$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16210  FIND_BINARY_OUTPUT=`find --version 2>&1`
16211  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16213$as_echo "unix style" >&6; }
16214  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16216$as_echo "Windows" >&6; }
16217    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16218$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16219    { $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
16220$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16221    as_fn_error $? "Cannot continue" "$LINENO" 5
16222  else
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16224$as_echo "unknown" >&6; }
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16226$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16227  fi
16228
16229  else
16230    PATH_SEP=":"
16231  fi
16232
16233
16234  # We get the top-level directory from the supporting wrappers.
16235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16236$as_echo_n "checking for top-level directory... " >&6; }
16237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16238$as_echo "$TOPDIR" >&6; }
16239
16240
16241  # Save the original version of TOPDIR for string comparisons
16242  ORIGINAL_TOPDIR="$TOPDIR"
16243
16244
16245  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16246
16247  # Only process if variable expands to non-empty
16248
16249  if test "x$CURDIR" != x; then
16250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16251
16252  # Input might be given as Windows format, start by converting to
16253  # unix format.
16254  path="$CURDIR"
16255  new_path=`$CYGPATH -u "$path"`
16256
16257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16260  # "foo.exe" is OK but "foo" is an error.
16261  #
16262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16263  # It is also a way to make sure we got the proper file name for the real test later on.
16264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16265  if test "x$test_shortpath" = x; then
16266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16267$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16268    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16269  fi
16270
16271  # Call helper function which possibly converts this using DOS-style short mode.
16272  # If so, the updated path is stored in $new_path.
16273
16274  input_path="$new_path"
16275  # Check if we need to convert this using DOS-style short mode. If the path
16276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16277  # take no chances and rewrite it.
16278  # Note: m4 eats our [], so we need to use [ and ] instead.
16279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16280  if test "x$has_forbidden_chars" != x; then
16281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16285      # Going to short mode and back again did indeed matter. Since short mode is
16286      # case insensitive, let's make it lowercase to improve readability.
16287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16288      # Now convert it back to Unix-style (cygpath)
16289      input_path=`$CYGPATH -u "$shortmode_path"`
16290      new_path="$input_path"
16291    fi
16292  fi
16293
16294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16295  if test "x$test_cygdrive_prefix" = x; then
16296    # As a simple fix, exclude /usr/bin since it's not a real path.
16297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16299      # a path prefixed by /cygdrive for fixpath to work.
16300      new_path="$CYGWIN_ROOT_PATH$input_path"
16301    fi
16302  fi
16303
16304
16305  if test "x$path" != "x$new_path"; then
16306    CURDIR="$new_path"
16307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16308$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16309  fi
16310
16311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16312
16313  path="$CURDIR"
16314  has_colon=`$ECHO $path | $GREP ^.:`
16315  new_path="$path"
16316  if test "x$has_colon" = x; then
16317    # Not in mixed or Windows style, start by that.
16318    new_path=`cmd //c echo $path`
16319  fi
16320
16321
16322  input_path="$new_path"
16323  # Check if we need to convert this using DOS-style short mode. If the path
16324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16325  # take no chances and rewrite it.
16326  # Note: m4 eats our [], so we need to use [ and ] instead.
16327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16328  if test "x$has_forbidden_chars" != x; then
16329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16331  fi
16332
16333
16334  windows_path="$new_path"
16335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16336    unix_path=`$CYGPATH -u "$windows_path"`
16337    new_path="$unix_path"
16338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16340    new_path="$unix_path"
16341  fi
16342
16343  if test "x$path" != "x$new_path"; then
16344    CURDIR="$new_path"
16345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16346$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16347  fi
16348
16349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16351
16352    else
16353      # We're on a unix platform. Hooray! :)
16354      path="$CURDIR"
16355      has_space=`$ECHO "$path" | $GREP " "`
16356      if test "x$has_space" != x; then
16357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16358$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16360      fi
16361
16362      # Use eval to expand a potential ~
16363      eval path="$path"
16364      if test ! -f "$path" && test ! -d "$path"; then
16365        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16366      fi
16367
16368      if test -d "$path"; then
16369        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16370      else
16371        dir="`$DIRNAME "$path"`"
16372        base="`$BASENAME "$path"`"
16373        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16374      fi
16375    fi
16376  fi
16377
16378
16379  # Only process if variable expands to non-empty
16380
16381  if test "x$TOPDIR" != x; then
16382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16383
16384  # Input might be given as Windows format, start by converting to
16385  # unix format.
16386  path="$TOPDIR"
16387  new_path=`$CYGPATH -u "$path"`
16388
16389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16392  # "foo.exe" is OK but "foo" is an error.
16393  #
16394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16395  # It is also a way to make sure we got the proper file name for the real test later on.
16396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16397  if test "x$test_shortpath" = x; then
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16399$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16400    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16401  fi
16402
16403  # Call helper function which possibly converts this using DOS-style short mode.
16404  # If so, the updated path is stored in $new_path.
16405
16406  input_path="$new_path"
16407  # Check if we need to convert this using DOS-style short mode. If the path
16408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16409  # take no chances and rewrite it.
16410  # Note: m4 eats our [], so we need to use [ and ] instead.
16411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16412  if test "x$has_forbidden_chars" != x; then
16413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16417      # Going to short mode and back again did indeed matter. Since short mode is
16418      # case insensitive, let's make it lowercase to improve readability.
16419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16420      # Now convert it back to Unix-style (cygpath)
16421      input_path=`$CYGPATH -u "$shortmode_path"`
16422      new_path="$input_path"
16423    fi
16424  fi
16425
16426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16427  if test "x$test_cygdrive_prefix" = x; then
16428    # As a simple fix, exclude /usr/bin since it's not a real path.
16429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16431      # a path prefixed by /cygdrive for fixpath to work.
16432      new_path="$CYGWIN_ROOT_PATH$input_path"
16433    fi
16434  fi
16435
16436
16437  if test "x$path" != "x$new_path"; then
16438    TOPDIR="$new_path"
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16440$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16441  fi
16442
16443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16444
16445  path="$TOPDIR"
16446  has_colon=`$ECHO $path | $GREP ^.:`
16447  new_path="$path"
16448  if test "x$has_colon" = x; then
16449    # Not in mixed or Windows style, start by that.
16450    new_path=`cmd //c echo $path`
16451  fi
16452
16453
16454  input_path="$new_path"
16455  # Check if we need to convert this using DOS-style short mode. If the path
16456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16457  # take no chances and rewrite it.
16458  # Note: m4 eats our [], so we need to use [ and ] instead.
16459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16460  if test "x$has_forbidden_chars" != x; then
16461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16463  fi
16464
16465
16466  windows_path="$new_path"
16467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468    unix_path=`$CYGPATH -u "$windows_path"`
16469    new_path="$unix_path"
16470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16472    new_path="$unix_path"
16473  fi
16474
16475  if test "x$path" != "x$new_path"; then
16476    TOPDIR="$new_path"
16477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16478$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16479  fi
16480
16481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16483
16484    else
16485      # We're on a unix platform. Hooray! :)
16486      path="$TOPDIR"
16487      has_space=`$ECHO "$path" | $GREP " "`
16488      if test "x$has_space" != x; then
16489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16490$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16492      fi
16493
16494      # Use eval to expand a potential ~
16495      eval path="$path"
16496      if test ! -f "$path" && test ! -d "$path"; then
16497        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16498      fi
16499
16500      if test -d "$path"; then
16501        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16502      else
16503        dir="`$DIRNAME "$path"`"
16504        base="`$BASENAME "$path"`"
16505        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16506      fi
16507    fi
16508  fi
16509
16510  # SRC_ROOT is a traditional alias for TOPDIR.
16511  SRC_ROOT=$TOPDIR
16512
16513  # Calculate a canonical version of TOPDIR for string comparisons
16514  CANONICAL_TOPDIR=$TOPDIR
16515
16516  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16517    # Follow a chain of symbolic links. Use readlink
16518    # where it exists, else fall back to horribly
16519    # complicated shell code.
16520    if test "x$READLINK_TESTED" != yes; then
16521      # On MacOSX there is a readlink tool with a different
16522      # purpose than the GNU readlink tool. Check the found readlink.
16523      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16524      if test "x$ISGNU" = x; then
16525        # A readlink that we do not know how to use.
16526        # Are there other non-GNU readlinks out there?
16527        READLINK_TESTED=yes
16528        READLINK=
16529      fi
16530    fi
16531
16532    if test "x$READLINK" != x; then
16533      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16534    else
16535      # Save the current directory for restoring afterwards
16536      STARTDIR=$PWD
16537      COUNTER=0
16538      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16539      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16540      cd $sym_link_dir
16541      # Use -P flag to resolve symlinks in directories.
16542      cd `$THEPWDCMD -P`
16543      sym_link_dir=`$THEPWDCMD -P`
16544      # Resolve file symlinks
16545      while test $COUNTER -lt 20; do
16546        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16547        if test "x$ISLINK" == x; then
16548          # This is not a symbolic link! We are done!
16549          break
16550        fi
16551        # Again resolve directory symlinks since the target of the just found
16552        # link could be in a different directory
16553        cd `$DIRNAME $ISLINK`
16554        sym_link_dir=`$THEPWDCMD -P`
16555        sym_link_file=`$BASENAME $ISLINK`
16556        let COUNTER=COUNTER+1
16557      done
16558      cd $STARTDIR
16559      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16560    fi
16561  fi
16562
16563
16564
16565  # Locate the directory of this script.
16566  AUTOCONF_DIR=$TOPDIR/common/autoconf
16567
16568  # Setup username (for use in adhoc version strings etc)
16569  # Outer [ ] to quote m4.
16570   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16571
16572
16573
16574# Check if it's a pure open build or if custom sources are to be used.
16575
16576  # Check whether --enable-openjdk-only was given.
16577if test "${enable_openjdk_only+set}" = set; then :
16578  enableval=$enable_openjdk_only;
16579else
16580  enable_openjdk_only="no"
16581fi
16582
16583
16584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16585$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16587$as_echo "$enable_openjdk_only" >&6; }
16588  if test "x$enable_openjdk_only" = "xyes"; then
16589    SUPPRESS_CUSTOM_EXTENSIONS="true"
16590  elif test "x$enable_openjdk_only" = "xno"; then
16591    SUPPRESS_CUSTOM_EXTENSIONS="false"
16592  else
16593    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16594  fi
16595
16596  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16597  # the IncludeCustomExtension macro.
16598
16599
16600# Check whether --with-custom-make-dir was given.
16601if test "${with_custom_make_dir+set}" = set; then :
16602  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
16603$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16604fi
16605
16606
16607
16608
16609# These are needed to be able to create a configuration name (and thus the output directory)
16610
16611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16612$as_echo_n "checking which variant of the JDK to build... " >&6; }
16613
16614# Check whether --with-jdk-variant was given.
16615if test "${with_jdk_variant+set}" = set; then :
16616  withval=$with_jdk_variant;
16617fi
16618
16619
16620  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16621    JDK_VARIANT="normal"
16622  else
16623    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16624  fi
16625
16626
16627
16628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16629$as_echo "$JDK_VARIANT" >&6; }
16630
16631
16632  DEBUG_LEVEL="release"
16633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16634$as_echo_n "checking which debug level to use... " >&6; }
16635  # Check whether --enable-debug was given.
16636if test "${enable_debug+set}" = set; then :
16637  enableval=$enable_debug;
16638        ENABLE_DEBUG="${enableval}"
16639        DEBUG_LEVEL="fastdebug"
16640
16641else
16642  ENABLE_DEBUG="no"
16643fi
16644
16645
16646
16647# Check whether --with-debug-level was given.
16648if test "${with_debug_level+set}" = set; then :
16649  withval=$with_debug_level;
16650        DEBUG_LEVEL="${withval}"
16651        if test "x$ENABLE_DEBUG" = xyes; then
16652          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16653        fi
16654
16655fi
16656
16657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16658$as_echo "$DEBUG_LEVEL" >&6; }
16659
16660  if test "x$DEBUG_LEVEL" != xrelease && \
16661      test "x$DEBUG_LEVEL" != xoptimized && \
16662      test "x$DEBUG_LEVEL" != xfastdebug && \
16663      test "x$DEBUG_LEVEL" != xslowdebug; then
16664    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16665  fi
16666
16667  # Translate DEBUG_LEVEL to debug level used by Hotspot
16668  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16669  if test "x$DEBUG_LEVEL" = xrelease; then
16670    HOTSPOT_DEBUG_LEVEL="product"
16671  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16672    HOTSPOT_DEBUG_LEVEL="debug"
16673  fi
16674
16675  if test "x$DEBUG_LEVEL" = xoptimized; then
16676    # The debug level 'optimized' is a little special because it is currently only
16677    # applicable to the HotSpot build where it means to build a completely
16678    # optimized version of the VM without any debugging code (like for the
16679    # 'release' debug level which is called 'product' in the HotSpot build) but
16680    # with the exception that it can contain additional code which is otherwise
16681    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16682    # test new and/or experimental features which are not intended for customer
16683    # shipment. Because these new features need to be tested and benchmarked in
16684    # real world scenarios, we want to build the containing JDK at the 'release'
16685    # debug level.
16686    DEBUG_LEVEL="release"
16687  fi
16688
16689
16690
16691
16692
16693
16694# Check whether --with-jvm-variants was given.
16695if test "${with_jvm_variants+set}" = set; then :
16696  withval=$with_jvm_variants;
16697fi
16698
16699
16700
16701
16702# Check whether --with-cpu-port was given.
16703if test "${with_cpu_port+set}" = set; then :
16704  withval=$with_cpu_port;
16705fi
16706
16707
16708  if test "x$with_cpu_port" != x; then
16709    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16710      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16711    fi
16712    if test "x$with_cpu_port" != xarm64 && \
16713        test "x$with_cpu_port" != xaarch64; then
16714      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16715    fi
16716    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16717  fi
16718
16719
16720  if test "x$with_jvm_variants" = x; then
16721    with_jvm_variants="server"
16722  fi
16723  JVM_VARIANTS_OPT="$with_jvm_variants"
16724
16725  # Has the user listed more than one variant?
16726  # Additional [] needed to keep m4 from mangling shell constructs.
16727  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16728    BUILDING_MULTIPLE_JVM_VARIANTS=true
16729  else
16730    BUILDING_MULTIPLE_JVM_VARIANTS=false
16731  fi
16732  # Replace the commas with AND for use in the build directory name.
16733  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16734
16735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16736$as_echo_n "checking which variants of the JVM to build... " >&6; }
16737  # JVM_VARIANTS is a space-separated list.
16738  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16739  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16741$as_echo "$JVM_VARIANTS" >&6; }
16742
16743  # Check that the selected variants are valid
16744
16745  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16746  # Notice that the original variant failes on SLES 10 and 11
16747  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16748  STACK=${JVM_VARIANTS// /$'\n'}
16749  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16750  if test "x$INVALID_VARIANTS" != x; then
16751    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16752$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16753    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16754  fi
16755
16756  # All "special" variants share the same output directory ("server")
16757  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16758  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16759  STACK=${JVM_VARIANTS// /$'\n'}
16760  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16761  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16762    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16763  fi
16764
16765  # The "main" variant is the one used by other libs to link against during the
16766  # build.
16767  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16768    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16769    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16770      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16771        JVM_VARIANT_MAIN="$variant"
16772        break
16773      fi
16774    done
16775  else
16776    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16777  fi
16778
16779
16780
16781
16782
16783  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16784    # zero behaves as a platform and rewrites these values. This is really weird. :(
16785    # We are guaranteed that we do not build any other variants when building zero.
16786    HOTSPOT_TARGET_CPU=zero
16787    HOTSPOT_TARGET_CPU_ARCH=zero
16788  fi
16789
16790
16791# With basic setup done, call the custom early hook.
16792
16793
16794# Check if we have devkits, extra paths or sysroot set.
16795
16796
16797# Check whether --with-devkit was given.
16798if test "${with_devkit+set}" = set; then :
16799  withval=$with_devkit;
16800
16801  # Only process if variable expands to non-empty
16802
16803  if test "x$with_devkit" != x; then
16804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16805
16806  # Input might be given as Windows format, start by converting to
16807  # unix format.
16808  path="$with_devkit"
16809  new_path=`$CYGPATH -u "$path"`
16810
16811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16814  # "foo.exe" is OK but "foo" is an error.
16815  #
16816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16817  # It is also a way to make sure we got the proper file name for the real test later on.
16818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16819  if test "x$test_shortpath" = x; then
16820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16821$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16822    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16823  fi
16824
16825  # Call helper function which possibly converts this using DOS-style short mode.
16826  # If so, the updated path is stored in $new_path.
16827
16828  input_path="$new_path"
16829  # Check if we need to convert this using DOS-style short mode. If the path
16830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16831  # take no chances and rewrite it.
16832  # Note: m4 eats our [], so we need to use [ and ] instead.
16833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16834  if test "x$has_forbidden_chars" != x; then
16835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16839      # Going to short mode and back again did indeed matter. Since short mode is
16840      # case insensitive, let's make it lowercase to improve readability.
16841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16842      # Now convert it back to Unix-style (cygpath)
16843      input_path=`$CYGPATH -u "$shortmode_path"`
16844      new_path="$input_path"
16845    fi
16846  fi
16847
16848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16849  if test "x$test_cygdrive_prefix" = x; then
16850    # As a simple fix, exclude /usr/bin since it's not a real path.
16851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16853      # a path prefixed by /cygdrive for fixpath to work.
16854      new_path="$CYGWIN_ROOT_PATH$input_path"
16855    fi
16856  fi
16857
16858
16859  if test "x$path" != "x$new_path"; then
16860    with_devkit="$new_path"
16861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16862$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16863  fi
16864
16865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16866
16867  path="$with_devkit"
16868  has_colon=`$ECHO $path | $GREP ^.:`
16869  new_path="$path"
16870  if test "x$has_colon" = x; then
16871    # Not in mixed or Windows style, start by that.
16872    new_path=`cmd //c echo $path`
16873  fi
16874
16875
16876  input_path="$new_path"
16877  # Check if we need to convert this using DOS-style short mode. If the path
16878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16879  # take no chances and rewrite it.
16880  # Note: m4 eats our [], so we need to use [ and ] instead.
16881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16882  if test "x$has_forbidden_chars" != x; then
16883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16885  fi
16886
16887
16888  windows_path="$new_path"
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890    unix_path=`$CYGPATH -u "$windows_path"`
16891    new_path="$unix_path"
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16894    new_path="$unix_path"
16895  fi
16896
16897  if test "x$path" != "x$new_path"; then
16898    with_devkit="$new_path"
16899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16900$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16901  fi
16902
16903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16905
16906    else
16907      # We're on a unix platform. Hooray! :)
16908      path="$with_devkit"
16909      has_space=`$ECHO "$path" | $GREP " "`
16910      if test "x$has_space" != x; then
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16912$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16914      fi
16915
16916      # Use eval to expand a potential ~
16917      eval path="$path"
16918      if test ! -f "$path" && test ! -d "$path"; then
16919        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16920      fi
16921
16922      if test -d "$path"; then
16923        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16924      else
16925        dir="`$DIRNAME "$path"`"
16926        base="`$BASENAME "$path"`"
16927        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16928      fi
16929    fi
16930  fi
16931
16932        DEVKIT_ROOT="$with_devkit"
16933        # Check for a meta data info file in the root of the devkit
16934        if test -f "$DEVKIT_ROOT/devkit.info"; then
16935          . $DEVKIT_ROOT/devkit.info
16936          # This potentially sets the following:
16937          # A descriptive name of the devkit
16938
16939  if test "x$DEVKIT_NAME" = x; then
16940    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16941  fi
16942
16943          # Corresponds to --with-extra-path
16944
16945  if test "x$DEVKIT_EXTRA_PATH" = x; then
16946    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16947  fi
16948
16949          # Corresponds to --with-toolchain-path
16950
16951  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16952    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16953  fi
16954
16955          # Corresponds to --with-sysroot
16956
16957  if test "x$DEVKIT_SYSROOT" = x; then
16958    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16959  fi
16960
16961
16962          # Identifies the Visual Studio version in the devkit
16963
16964  if test "x$DEVKIT_VS_VERSION" = x; then
16965    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16966  fi
16967
16968          # The Visual Studio include environment variable
16969
16970  if test "x$DEVKIT_VS_INCLUDE" = x; then
16971    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16972  fi
16973
16974          # The Visual Studio lib environment variable
16975
16976  if test "x$DEVKIT_VS_LIB" = x; then
16977    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16978  fi
16979
16980          # Corresponds to --with-msvcr-dll
16981
16982  if test "x$DEVKIT_MSVCR_DLL" = x; then
16983    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16984  fi
16985
16986          # Corresponds to --with-msvcp-dll
16987
16988  if test "x$DEVKIT_MSVCP_DLL" = x; then
16989    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16990  fi
16991
16992        fi
16993
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16995$as_echo_n "checking for devkit... " >&6; }
16996        if test "x$DEVKIT_NAME" != x; then
16997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16998$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16999        else
17000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17001$as_echo "$DEVKIT_ROOT" >&6; }
17002        fi
17003
17004
17005  if test "x$DEVKIT_EXTRA_PATH" != x; then
17006    if test "x$EXTRA_PATH" = x; then
17007      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17008    else
17009      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17010    fi
17011  fi
17012
17013
17014        # Fallback default of just /bin if DEVKIT_PATH is not defined
17015        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17016          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17017        fi
17018
17019  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17020    if test "x$TOOLCHAIN_PATH" = x; then
17021      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17022    else
17023      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17024    fi
17025  fi
17026
17027
17028        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17029        # places for backwards compatiblity.
17030        if test "x$DEVKIT_SYSROOT" != x; then
17031          SYSROOT="$DEVKIT_SYSROOT"
17032        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17033          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17034        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17035          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17036        fi
17037
17038
17039fi
17040
17041
17042  # You can force the sysroot if the sysroot encoded into the compiler tools
17043  # is not correct.
17044
17045# Check whether --with-sys-root was given.
17046if test "${with_sys_root+set}" = set; then :
17047  withval=$with_sys_root; SYSROOT=$with_sys_root
17048
17049fi
17050
17051
17052
17053# Check whether --with-sysroot was given.
17054if test "${with_sysroot+set}" = set; then :
17055  withval=$with_sysroot; SYSROOT=$with_sysroot
17056
17057fi
17058
17059
17060
17061# Check whether --with-tools-dir was given.
17062if test "${with_tools_dir+set}" = set; then :
17063  withval=$with_tools_dir;
17064  if test "x$with_tools_dir" != x; then
17065    if test "x$TOOLCHAIN_PATH" = x; then
17066      TOOLCHAIN_PATH="$with_tools_dir"
17067    else
17068      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17069    fi
17070  fi
17071
17072
17073fi
17074
17075
17076
17077# Check whether --with-toolchain-path was given.
17078if test "${with_toolchain_path+set}" = set; then :
17079  withval=$with_toolchain_path;
17080  if test "x$with_toolchain_path" != x; then
17081    if test "x$TOOLCHAIN_PATH" = x; then
17082      TOOLCHAIN_PATH="$with_toolchain_path"
17083    else
17084      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17085    fi
17086  fi
17087
17088
17089fi
17090
17091
17092
17093# Check whether --with-extra-path was given.
17094if test "${with_extra_path+set}" = set; then :
17095  withval=$with_extra_path;
17096  if test "x$with_extra_path" != x; then
17097    if test "x$EXTRA_PATH" = x; then
17098      EXTRA_PATH="$with_extra_path"
17099    else
17100      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17101    fi
17102  fi
17103
17104
17105fi
17106
17107
17108  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17109    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17110    # If not, detect if Xcode is installed by running xcodebuild -version
17111    # if no Xcode installed, xcodebuild exits with 1
17112    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17113    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17114      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17115      # fall back on the stub binary in /usr/bin/xcodebuild
17116      # Extract the first word of "xcodebuild", so it can be a program name with args.
17117set dummy xcodebuild; ac_word=$2
17118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17119$as_echo_n "checking for $ac_word... " >&6; }
17120if ${ac_cv_path_XCODEBUILD+:} false; then :
17121  $as_echo_n "(cached) " >&6
17122else
17123  case $XCODEBUILD in
17124  [\\/]* | ?:[\\/]*)
17125  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17126  ;;
17127  *)
17128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17129for as_dir in $TOOLCHAIN_PATH
17130do
17131  IFS=$as_save_IFS
17132  test -z "$as_dir" && as_dir=.
17133    for ac_exec_ext in '' $ac_executable_extensions; do
17134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17135    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17137    break 2
17138  fi
17139done
17140  done
17141IFS=$as_save_IFS
17142
17143  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17144  ;;
17145esac
17146fi
17147XCODEBUILD=$ac_cv_path_XCODEBUILD
17148if test -n "$XCODEBUILD"; then
17149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17150$as_echo "$XCODEBUILD" >&6; }
17151else
17152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17153$as_echo "no" >&6; }
17154fi
17155
17156
17157    else
17158      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17159      # when only the command line tools are installed there are no SDKs, so headers
17160      # are copied into the system frameworks
17161      XCODEBUILD=
17162
17163    fi
17164
17165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17166$as_echo_n "checking for sdk name... " >&6; }
17167
17168# Check whether --with-sdk-name was given.
17169if test "${with_sdk_name+set}" = set; then :
17170  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17171
17172fi
17173
17174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17175$as_echo "$SDKNAME" >&6; }
17176
17177    # if toolchain path is specified then don't rely on system headers, they may not compile
17178    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17179    test -z "$TOOLCHAIN_PATH" && \
17180      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17181
17182    if test -z "$SYSROOT"; then
17183      if test -n "$XCODEBUILD"; then
17184        # if we don't have system headers, use default SDK name (last resort)
17185        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17186          SDKNAME=${SDKNAME:-macosx}
17187        fi
17188
17189        if test -n "$SDKNAME"; then
17190          # Call xcodebuild to determine SYSROOT
17191          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17192        fi
17193      else
17194        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17195          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
17196        fi
17197      fi
17198    else
17199      # warn user if --with-sdk-name was also set
17200      if test -n "$with_sdk_name"; then
17201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17202$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17203      fi
17204    fi
17205
17206    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17207      # If no system framework headers, then SYSROOT must be set, or we won't build
17208      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
17209    fi
17210
17211    # Perform a basic sanity test
17212    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17213      if test -z "$SYSROOT"; then
17214        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
17215      else
17216        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17217      fi
17218    fi
17219
17220    # set SDKROOT too, Xcode tools will pick it up
17221    SDKROOT="$SYSROOT"
17222
17223  fi
17224
17225  # Prepend the extra path to the global path
17226
17227  if test "x$EXTRA_PATH" != x; then
17228    if test "x$PATH" = x; then
17229      PATH="$EXTRA_PATH"
17230    else
17231      PATH="$EXTRA_PATH:$PATH"
17232    fi
17233  fi
17234
17235
17236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17237$as_echo_n "checking for sysroot... " >&6; }
17238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17239$as_echo "$SYSROOT" >&6; }
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17241$as_echo_n "checking for toolchain path... " >&6; }
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17243$as_echo "$TOOLCHAIN_PATH" >&6; }
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17245$as_echo_n "checking for extra path... " >&6; }
17246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17247$as_echo "$EXTRA_PATH" >&6; }
17248
17249
17250# To properly create a configuration name, we need to have the OpenJDK target
17251# and options (variants and debug level) parsed.
17252
17253
17254
17255# Check whether --with-conf-name was given.
17256if test "${with_conf_name+set}" = set; then :
17257  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17258fi
17259
17260
17261  # Test from where we are running configure, in or outside of src root.
17262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17263$as_echo_n "checking where to store configuration... " >&6; }
17264  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17265      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17266      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17267    # We are running configure from the src root.
17268    # Create a default ./build/target-variant-debuglevel output root.
17269    if test "x${CONF_NAME}" = x; then
17270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17271$as_echo "in default location" >&6; }
17272      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17273    else
17274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17275$as_echo "in build directory with custom name" >&6; }
17276    fi
17277    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17278    $MKDIR -p "$OUTPUT_ROOT"
17279    if test ! -d "$OUTPUT_ROOT"; then
17280      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17281    fi
17282  else
17283    # We are running configure from outside of the src dir.
17284    # Then use the current directory as output dir!
17285    # If configuration is situated in normal build directory, just use the build
17286    # directory name as configuration name, otherwise use the complete path.
17287    if test "x${CONF_NAME}" = x; then
17288      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17289    fi
17290    OUTPUT_ROOT="$CURDIR"
17291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17292$as_echo "in current directory" >&6; }
17293
17294    # WARNING: This might be a bad thing to do. You need to be sure you want to
17295    # have a configuration in this directory. Do some sanity checks!
17296
17297    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17298      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17299      # other files
17300      files_present=`$LS $OUTPUT_ROOT`
17301      # Configure has already touched config.log and confdefs.h in the current dir when this check
17302      # is performed.
17303      filtered_files=`$ECHO "$files_present" \
17304          | $SED -e 's/config.log//g' \
17305              -e 's/configure.log//g' \
17306              -e 's/confdefs.h//g' \
17307              -e 's/ //g' \
17308          | $TR -d '\n'`
17309      if test "x$filtered_files" != x; then
17310        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17311$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17312        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17313$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17314        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17315$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17316        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17317$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17318        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17319$as_echo "$as_me: seriously mess up just about everything." >&6;}
17320        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17321$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17323$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17324        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17325      fi
17326    fi
17327  fi
17328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17329$as_echo_n "checking what configuration name to use... " >&6; }
17330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17331$as_echo "$CONF_NAME" >&6; }
17332
17333
17334  # Only process if variable expands to non-empty
17335
17336  if test "x$OUTPUT_ROOT" != x; then
17337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17338
17339  # Input might be given as Windows format, start by converting to
17340  # unix format.
17341  path="$OUTPUT_ROOT"
17342  new_path=`$CYGPATH -u "$path"`
17343
17344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17347  # "foo.exe" is OK but "foo" is an error.
17348  #
17349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17350  # It is also a way to make sure we got the proper file name for the real test later on.
17351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17352  if test "x$test_shortpath" = x; then
17353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17354$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17355    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17356  fi
17357
17358  # Call helper function which possibly converts this using DOS-style short mode.
17359  # If so, the updated path is stored in $new_path.
17360
17361  input_path="$new_path"
17362  # Check if we need to convert this using DOS-style short mode. If the path
17363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17364  # take no chances and rewrite it.
17365  # Note: m4 eats our [], so we need to use [ and ] instead.
17366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17367  if test "x$has_forbidden_chars" != x; then
17368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17372      # Going to short mode and back again did indeed matter. Since short mode is
17373      # case insensitive, let's make it lowercase to improve readability.
17374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17375      # Now convert it back to Unix-style (cygpath)
17376      input_path=`$CYGPATH -u "$shortmode_path"`
17377      new_path="$input_path"
17378    fi
17379  fi
17380
17381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17382  if test "x$test_cygdrive_prefix" = x; then
17383    # As a simple fix, exclude /usr/bin since it's not a real path.
17384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17386      # a path prefixed by /cygdrive for fixpath to work.
17387      new_path="$CYGWIN_ROOT_PATH$input_path"
17388    fi
17389  fi
17390
17391
17392  if test "x$path" != "x$new_path"; then
17393    OUTPUT_ROOT="$new_path"
17394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17395$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17396  fi
17397
17398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17399
17400  path="$OUTPUT_ROOT"
17401  has_colon=`$ECHO $path | $GREP ^.:`
17402  new_path="$path"
17403  if test "x$has_colon" = x; then
17404    # Not in mixed or Windows style, start by that.
17405    new_path=`cmd //c echo $path`
17406  fi
17407
17408
17409  input_path="$new_path"
17410  # Check if we need to convert this using DOS-style short mode. If the path
17411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17412  # take no chances and rewrite it.
17413  # Note: m4 eats our [], so we need to use [ and ] instead.
17414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17415  if test "x$has_forbidden_chars" != x; then
17416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17418  fi
17419
17420
17421  windows_path="$new_path"
17422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17423    unix_path=`$CYGPATH -u "$windows_path"`
17424    new_path="$unix_path"
17425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17427    new_path="$unix_path"
17428  fi
17429
17430  if test "x$path" != "x$new_path"; then
17431    OUTPUT_ROOT="$new_path"
17432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17433$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17434  fi
17435
17436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17438
17439    else
17440      # We're on a unix platform. Hooray! :)
17441      path="$OUTPUT_ROOT"
17442      has_space=`$ECHO "$path" | $GREP " "`
17443      if test "x$has_space" != x; then
17444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17445$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17447      fi
17448
17449      # Use eval to expand a potential ~
17450      eval path="$path"
17451      if test ! -f "$path" && test ! -d "$path"; then
17452        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17453      fi
17454
17455      if test -d "$path"; then
17456        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17457      else
17458        dir="`$DIRNAME "$path"`"
17459        base="`$BASENAME "$path"`"
17460        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17461      fi
17462    fi
17463  fi
17464
17465
17466  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17467  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17468
17469  SPEC="$OUTPUT_ROOT/spec.gmk"
17470
17471
17472
17473
17474
17475  # The spec.gmk file contains all variables for the make system.
17476  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17477
17478  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17479  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17480
17481  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17482  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17483
17484  # The compare.sh is used to compare the build output to other builds.
17485  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17486
17487  # The generated Makefile knows where the spec.gmk is and where the source is.
17488  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17489  # which will look for generated configurations
17490  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17491
17492
17493
17494# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17495
17496  for ac_prog in apt-get yum brew port pkgutil pkgadd
17497do
17498  # Extract the first word of "$ac_prog", so it can be a program name with args.
17499set dummy $ac_prog; ac_word=$2
17500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17501$as_echo_n "checking for $ac_word... " >&6; }
17502if ${ac_cv_prog_PKGHANDLER+:} false; then :
17503  $as_echo_n "(cached) " >&6
17504else
17505  if test -n "$PKGHANDLER"; then
17506  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17507else
17508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17509for as_dir in $PATH
17510do
17511  IFS=$as_save_IFS
17512  test -z "$as_dir" && as_dir=.
17513    for ac_exec_ext in '' $ac_executable_extensions; do
17514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17515    ac_cv_prog_PKGHANDLER="$ac_prog"
17516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17517    break 2
17518  fi
17519done
17520  done
17521IFS=$as_save_IFS
17522
17523fi
17524fi
17525PKGHANDLER=$ac_cv_prog_PKGHANDLER
17526if test -n "$PKGHANDLER"; then
17527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17528$as_echo "$PKGHANDLER" >&6; }
17529else
17530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17531$as_echo "no" >&6; }
17532fi
17533
17534
17535  test -n "$PKGHANDLER" && break
17536done
17537
17538
17539
17540# Setup tools that requires more complex handling, or that is not needed by the configure script.
17541
17542
17543
17544  # Publish this variable in the help.
17545
17546
17547  if [ -z "${MAKE+x}" ]; then
17548    # The variable is not set by user, try to locate tool using the code snippet
17549
17550    # Try our hardest to locate a correct version of GNU make
17551    for ac_prog in gmake
17552do
17553  # Extract the first word of "$ac_prog", so it can be a program name with args.
17554set dummy $ac_prog; ac_word=$2
17555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17556$as_echo_n "checking for $ac_word... " >&6; }
17557if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17558  $as_echo_n "(cached) " >&6
17559else
17560  case $CHECK_GMAKE in
17561  [\\/]* | ?:[\\/]*)
17562  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17563  ;;
17564  *)
17565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17566for as_dir in $PATH
17567do
17568  IFS=$as_save_IFS
17569  test -z "$as_dir" && as_dir=.
17570    for ac_exec_ext in '' $ac_executable_extensions; do
17571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17572    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17574    break 2
17575  fi
17576done
17577  done
17578IFS=$as_save_IFS
17579
17580  ;;
17581esac
17582fi
17583CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17584if test -n "$CHECK_GMAKE"; then
17585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17586$as_echo "$CHECK_GMAKE" >&6; }
17587else
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589$as_echo "no" >&6; }
17590fi
17591
17592
17593  test -n "$CHECK_GMAKE" && break
17594done
17595
17596
17597  MAKE_CANDIDATE=""$CHECK_GMAKE""
17598  DESCRIPTION="gmake in PATH"
17599
17600  # On Cygwin, we require a newer version of make than on other platforms
17601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17602    MAKE_VERSION_EXPR="-e 4\."
17603    MAKE_REQUIRED_VERSION="4.0"
17604   else
17605    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17606    MAKE_REQUIRED_VERSION="3.81"
17607  fi
17608
17609  if test "x$MAKE_CANDIDATE" != x; then
17610    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17611$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17612    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17613    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17614    if test "x$IS_GNU_MAKE" = x; then
17615      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17616$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17617    else
17618      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17619      if test "x$IS_MODERN_MAKE" = x; then
17620        { $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
17621$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;}
17622      else
17623        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17624          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625            MAKE_EXPECTED_ENV='cygwin'
17626          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17627            MAKE_EXPECTED_ENV='msys'
17628          else
17629            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17630          fi
17631          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17632          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17633        else
17634          # Not relevant for non-Windows
17635          IS_MAKE_CORRECT_ENV=true
17636        fi
17637        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17638          { $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
17639$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;}
17640        else
17641          FOUND_MAKE=$MAKE_CANDIDATE
17642
17643  # Only process if variable expands to non-empty
17644
17645  if test "x$FOUND_MAKE" != x; then
17646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17647
17648  # First separate the path from the arguments. This will split at the first
17649  # space.
17650  complete="$FOUND_MAKE"
17651  path="${complete%% *}"
17652  tmp="$complete EOL"
17653  arguments="${tmp#* }"
17654
17655  # Input might be given as Windows format, start by converting to
17656  # unix format.
17657  new_path=`$CYGPATH -u "$path"`
17658
17659  # Now try to locate executable using which
17660  new_path=`$WHICH "$new_path" 2> /dev/null`
17661  # bat and cmd files are not always considered executable in cygwin causing which
17662  # to not find them
17663  if test "x$new_path" = x \
17664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17666    new_path=`$CYGPATH -u "$path"`
17667  fi
17668  if test "x$new_path" = x; then
17669    # Oops. Which didn't find the executable.
17670    # The splitting of arguments from the executable at a space might have been incorrect,
17671    # since paths with space are more likely in Windows. Give it another try with the whole
17672    # argument.
17673    path="$complete"
17674    arguments="EOL"
17675    new_path=`$CYGPATH -u "$path"`
17676    new_path=`$WHICH "$new_path" 2> /dev/null`
17677    # bat and cmd files are not always considered executable in cygwin causing which
17678    # to not find them
17679    if test "x$new_path" = x \
17680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17682      new_path=`$CYGPATH -u "$path"`
17683    fi
17684    if test "x$new_path" = x; then
17685      # It's still not found. Now this is an unrecoverable error.
17686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17688      has_space=`$ECHO "$complete" | $GREP " "`
17689      if test "x$has_space" != x; then
17690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17692      fi
17693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17694    fi
17695  fi
17696
17697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17700  # "foo.exe" is OK but "foo" is an error.
17701  #
17702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17703  # It is also a way to make sure we got the proper file name for the real test later on.
17704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17705  if test "x$test_shortpath" = x; then
17706    # Short path failed, file does not exist as specified.
17707    # Try adding .exe or .cmd
17708    if test -f "${new_path}.exe"; then
17709      input_to_shortpath="${new_path}.exe"
17710    elif test -f "${new_path}.cmd"; then
17711      input_to_shortpath="${new_path}.cmd"
17712    else
17713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17714$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17717      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17718    fi
17719  else
17720    input_to_shortpath="$new_path"
17721  fi
17722
17723  # Call helper function which possibly converts this using DOS-style short mode.
17724  # If so, the updated path is stored in $new_path.
17725  new_path="$input_to_shortpath"
17726
17727  input_path="$input_to_shortpath"
17728  # Check if we need to convert this using DOS-style short mode. If the path
17729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17730  # take no chances and rewrite it.
17731  # Note: m4 eats our [], so we need to use [ and ] instead.
17732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17733  if test "x$has_forbidden_chars" != x; then
17734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17738      # Going to short mode and back again did indeed matter. Since short mode is
17739      # case insensitive, let's make it lowercase to improve readability.
17740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17741      # Now convert it back to Unix-style (cygpath)
17742      input_path=`$CYGPATH -u "$shortmode_path"`
17743      new_path="$input_path"
17744    fi
17745  fi
17746
17747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17748  if test "x$test_cygdrive_prefix" = x; then
17749    # As a simple fix, exclude /usr/bin since it's not a real path.
17750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17752      # a path prefixed by /cygdrive for fixpath to work.
17753      new_path="$CYGWIN_ROOT_PATH$input_path"
17754    fi
17755  fi
17756
17757  # remove trailing .exe if any
17758  new_path="${new_path/%.exe/}"
17759
17760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17761
17762  # First separate the path from the arguments. This will split at the first
17763  # space.
17764  complete="$FOUND_MAKE"
17765  path="${complete%% *}"
17766  tmp="$complete EOL"
17767  arguments="${tmp#* }"
17768
17769  # Input might be given as Windows format, start by converting to
17770  # unix format.
17771  new_path="$path"
17772
17773  windows_path="$new_path"
17774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17775    unix_path=`$CYGPATH -u "$windows_path"`
17776    new_path="$unix_path"
17777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17779    new_path="$unix_path"
17780  fi
17781
17782
17783  # Now try to locate executable using which
17784  new_path=`$WHICH "$new_path" 2> /dev/null`
17785
17786  if test "x$new_path" = x; then
17787    # Oops. Which didn't find the executable.
17788    # The splitting of arguments from the executable at a space might have been incorrect,
17789    # since paths with space are more likely in Windows. Give it another try with the whole
17790    # argument.
17791    path="$complete"
17792    arguments="EOL"
17793    new_path="$path"
17794
17795  windows_path="$new_path"
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797    unix_path=`$CYGPATH -u "$windows_path"`
17798    new_path="$unix_path"
17799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801    new_path="$unix_path"
17802  fi
17803
17804
17805    new_path=`$WHICH "$new_path" 2> /dev/null`
17806    # bat and cmd files are not always considered executable in MSYS causing which
17807    # to not find them
17808    if test "x$new_path" = x \
17809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17811      new_path="$path"
17812
17813  windows_path="$new_path"
17814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17815    unix_path=`$CYGPATH -u "$windows_path"`
17816    new_path="$unix_path"
17817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17819    new_path="$unix_path"
17820  fi
17821
17822    fi
17823
17824    if test "x$new_path" = x; then
17825      # It's still not found. Now this is an unrecoverable error.
17826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17828      has_space=`$ECHO "$complete" | $GREP " "`
17829      if test "x$has_space" != x; then
17830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17832      fi
17833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17834    fi
17835  fi
17836
17837  # Now new_path has a complete unix path to the binary
17838  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17839    # Keep paths in /bin as-is, but remove trailing .exe if any
17840    new_path="${new_path/%.exe/}"
17841    # Do not save /bin paths to all_fixpath_prefixes!
17842  else
17843    # Not in mixed or Windows style, start by that.
17844    new_path=`cmd //c echo $new_path`
17845
17846  input_path="$new_path"
17847  # Check if we need to convert this using DOS-style short mode. If the path
17848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17849  # take no chances and rewrite it.
17850  # Note: m4 eats our [], so we need to use [ and ] instead.
17851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17852  if test "x$has_forbidden_chars" != x; then
17853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17855  fi
17856
17857    # Output is in $new_path
17858
17859  windows_path="$new_path"
17860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861    unix_path=`$CYGPATH -u "$windows_path"`
17862    new_path="$unix_path"
17863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17865    new_path="$unix_path"
17866  fi
17867
17868    # remove trailing .exe if any
17869    new_path="${new_path/%.exe/}"
17870
17871    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17872    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17873  fi
17874
17875    else
17876      # We're on a unix platform. Hooray! :)
17877      # First separate the path from the arguments. This will split at the first
17878      # space.
17879      complete="$FOUND_MAKE"
17880      path="${complete%% *}"
17881      tmp="$complete EOL"
17882      arguments="${tmp#* }"
17883
17884      # Cannot rely on the command "which" here since it doesn't always work.
17885      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17886      if test -z "$is_absolute_path"; then
17887        # Path to executable is not absolute. Find it.
17888        IFS_save="$IFS"
17889        IFS=:
17890        for p in $PATH; do
17891          if test -f "$p/$path" && test -x "$p/$path"; then
17892            new_path="$p/$path"
17893            break
17894          fi
17895        done
17896        IFS="$IFS_save"
17897      else
17898        # This is an absolute path, we can use it without further modifications.
17899        new_path="$path"
17900      fi
17901
17902      if test "x$new_path" = x; then
17903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17904$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17905        has_space=`$ECHO "$complete" | $GREP " "`
17906        if test "x$has_space" != x; then
17907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17909        fi
17910        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17911      fi
17912    fi
17913
17914    # Now join together the path and the arguments once again
17915    if test "x$arguments" != xEOL; then
17916      new_complete="$new_path ${arguments% *}"
17917    else
17918      new_complete="$new_path"
17919    fi
17920
17921    if test "x$complete" != "x$new_complete"; then
17922      FOUND_MAKE="$new_complete"
17923      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17924$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17925    fi
17926  fi
17927
17928        fi
17929      fi
17930    fi
17931  fi
17932
17933
17934    if test "x$FOUND_MAKE" = x; then
17935      for ac_prog in make
17936do
17937  # Extract the first word of "$ac_prog", so it can be a program name with args.
17938set dummy $ac_prog; ac_word=$2
17939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17940$as_echo_n "checking for $ac_word... " >&6; }
17941if ${ac_cv_path_CHECK_MAKE+:} false; then :
17942  $as_echo_n "(cached) " >&6
17943else
17944  case $CHECK_MAKE in
17945  [\\/]* | ?:[\\/]*)
17946  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17947  ;;
17948  *)
17949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17950for as_dir in $PATH
17951do
17952  IFS=$as_save_IFS
17953  test -z "$as_dir" && as_dir=.
17954    for ac_exec_ext in '' $ac_executable_extensions; do
17955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17956    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17958    break 2
17959  fi
17960done
17961  done
17962IFS=$as_save_IFS
17963
17964  ;;
17965esac
17966fi
17967CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17968if test -n "$CHECK_MAKE"; then
17969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17970$as_echo "$CHECK_MAKE" >&6; }
17971else
17972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17973$as_echo "no" >&6; }
17974fi
17975
17976
17977  test -n "$CHECK_MAKE" && break
17978done
17979
17980
17981  MAKE_CANDIDATE=""$CHECK_MAKE""
17982  DESCRIPTION="make in PATH"
17983
17984  # On Cygwin, we require a newer version of make than on other platforms
17985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17986    MAKE_VERSION_EXPR="-e 4\."
17987    MAKE_REQUIRED_VERSION="4.0"
17988   else
17989    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17990    MAKE_REQUIRED_VERSION="3.81"
17991  fi
17992
17993  if test "x$MAKE_CANDIDATE" != x; then
17994    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17995$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17996    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17997    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17998    if test "x$IS_GNU_MAKE" = x; then
17999      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18000$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18001    else
18002      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18003      if test "x$IS_MODERN_MAKE" = x; then
18004        { $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
18005$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;}
18006      else
18007        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18008          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18009            MAKE_EXPECTED_ENV='cygwin'
18010          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18011            MAKE_EXPECTED_ENV='msys'
18012          else
18013            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18014          fi
18015          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18016          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18017        else
18018          # Not relevant for non-Windows
18019          IS_MAKE_CORRECT_ENV=true
18020        fi
18021        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18022          { $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
18023$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;}
18024        else
18025          FOUND_MAKE=$MAKE_CANDIDATE
18026
18027  # Only process if variable expands to non-empty
18028
18029  if test "x$FOUND_MAKE" != x; then
18030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18031
18032  # First separate the path from the arguments. This will split at the first
18033  # space.
18034  complete="$FOUND_MAKE"
18035  path="${complete%% *}"
18036  tmp="$complete EOL"
18037  arguments="${tmp#* }"
18038
18039  # Input might be given as Windows format, start by converting to
18040  # unix format.
18041  new_path=`$CYGPATH -u "$path"`
18042
18043  # Now try to locate executable using which
18044  new_path=`$WHICH "$new_path" 2> /dev/null`
18045  # bat and cmd files are not always considered executable in cygwin causing which
18046  # to not find them
18047  if test "x$new_path" = x \
18048      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18049      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18050    new_path=`$CYGPATH -u "$path"`
18051  fi
18052  if test "x$new_path" = x; then
18053    # Oops. Which didn't find the executable.
18054    # The splitting of arguments from the executable at a space might have been incorrect,
18055    # since paths with space are more likely in Windows. Give it another try with the whole
18056    # argument.
18057    path="$complete"
18058    arguments="EOL"
18059    new_path=`$CYGPATH -u "$path"`
18060    new_path=`$WHICH "$new_path" 2> /dev/null`
18061    # bat and cmd files are not always considered executable in cygwin causing which
18062    # to not find them
18063    if test "x$new_path" = x \
18064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18066      new_path=`$CYGPATH -u "$path"`
18067    fi
18068    if test "x$new_path" = x; then
18069      # It's still not found. Now this is an unrecoverable error.
18070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18072      has_space=`$ECHO "$complete" | $GREP " "`
18073      if test "x$has_space" != x; then
18074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18076      fi
18077      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18078    fi
18079  fi
18080
18081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18084  # "foo.exe" is OK but "foo" is an error.
18085  #
18086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18087  # It is also a way to make sure we got the proper file name for the real test later on.
18088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18089  if test "x$test_shortpath" = x; then
18090    # Short path failed, file does not exist as specified.
18091    # Try adding .exe or .cmd
18092    if test -f "${new_path}.exe"; then
18093      input_to_shortpath="${new_path}.exe"
18094    elif test -f "${new_path}.cmd"; then
18095      input_to_shortpath="${new_path}.cmd"
18096    else
18097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18102    fi
18103  else
18104    input_to_shortpath="$new_path"
18105  fi
18106
18107  # Call helper function which possibly converts this using DOS-style short mode.
18108  # If so, the updated path is stored in $new_path.
18109  new_path="$input_to_shortpath"
18110
18111  input_path="$input_to_shortpath"
18112  # Check if we need to convert this using DOS-style short mode. If the path
18113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18114  # take no chances and rewrite it.
18115  # Note: m4 eats our [], so we need to use [ and ] instead.
18116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18117  if test "x$has_forbidden_chars" != x; then
18118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18122      # Going to short mode and back again did indeed matter. Since short mode is
18123      # case insensitive, let's make it lowercase to improve readability.
18124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18125      # Now convert it back to Unix-style (cygpath)
18126      input_path=`$CYGPATH -u "$shortmode_path"`
18127      new_path="$input_path"
18128    fi
18129  fi
18130
18131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18132  if test "x$test_cygdrive_prefix" = x; then
18133    # As a simple fix, exclude /usr/bin since it's not a real path.
18134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18136      # a path prefixed by /cygdrive for fixpath to work.
18137      new_path="$CYGWIN_ROOT_PATH$input_path"
18138    fi
18139  fi
18140
18141  # remove trailing .exe if any
18142  new_path="${new_path/%.exe/}"
18143
18144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18145
18146  # First separate the path from the arguments. This will split at the first
18147  # space.
18148  complete="$FOUND_MAKE"
18149  path="${complete%% *}"
18150  tmp="$complete EOL"
18151  arguments="${tmp#* }"
18152
18153  # Input might be given as Windows format, start by converting to
18154  # unix format.
18155  new_path="$path"
18156
18157  windows_path="$new_path"
18158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18159    unix_path=`$CYGPATH -u "$windows_path"`
18160    new_path="$unix_path"
18161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18163    new_path="$unix_path"
18164  fi
18165
18166
18167  # Now try to locate executable using which
18168  new_path=`$WHICH "$new_path" 2> /dev/null`
18169
18170  if test "x$new_path" = x; then
18171    # Oops. Which didn't find the executable.
18172    # The splitting of arguments from the executable at a space might have been incorrect,
18173    # since paths with space are more likely in Windows. Give it another try with the whole
18174    # argument.
18175    path="$complete"
18176    arguments="EOL"
18177    new_path="$path"
18178
18179  windows_path="$new_path"
18180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18181    unix_path=`$CYGPATH -u "$windows_path"`
18182    new_path="$unix_path"
18183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18185    new_path="$unix_path"
18186  fi
18187
18188
18189    new_path=`$WHICH "$new_path" 2> /dev/null`
18190    # bat and cmd files are not always considered executable in MSYS causing which
18191    # to not find them
18192    if test "x$new_path" = x \
18193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18195      new_path="$path"
18196
18197  windows_path="$new_path"
18198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18199    unix_path=`$CYGPATH -u "$windows_path"`
18200    new_path="$unix_path"
18201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18203    new_path="$unix_path"
18204  fi
18205
18206    fi
18207
18208    if test "x$new_path" = x; then
18209      # It's still not found. Now this is an unrecoverable error.
18210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18211$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18212      has_space=`$ECHO "$complete" | $GREP " "`
18213      if test "x$has_space" != x; then
18214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18216      fi
18217      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18218    fi
18219  fi
18220
18221  # Now new_path has a complete unix path to the binary
18222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18223    # Keep paths in /bin as-is, but remove trailing .exe if any
18224    new_path="${new_path/%.exe/}"
18225    # Do not save /bin paths to all_fixpath_prefixes!
18226  else
18227    # Not in mixed or Windows style, start by that.
18228    new_path=`cmd //c echo $new_path`
18229
18230  input_path="$new_path"
18231  # Check if we need to convert this using DOS-style short mode. If the path
18232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18233  # take no chances and rewrite it.
18234  # Note: m4 eats our [], so we need to use [ and ] instead.
18235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18236  if test "x$has_forbidden_chars" != x; then
18237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18239  fi
18240
18241    # Output is in $new_path
18242
18243  windows_path="$new_path"
18244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18245    unix_path=`$CYGPATH -u "$windows_path"`
18246    new_path="$unix_path"
18247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18249    new_path="$unix_path"
18250  fi
18251
18252    # remove trailing .exe if any
18253    new_path="${new_path/%.exe/}"
18254
18255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18257  fi
18258
18259    else
18260      # We're on a unix platform. Hooray! :)
18261      # First separate the path from the arguments. This will split at the first
18262      # space.
18263      complete="$FOUND_MAKE"
18264      path="${complete%% *}"
18265      tmp="$complete EOL"
18266      arguments="${tmp#* }"
18267
18268      # Cannot rely on the command "which" here since it doesn't always work.
18269      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18270      if test -z "$is_absolute_path"; then
18271        # Path to executable is not absolute. Find it.
18272        IFS_save="$IFS"
18273        IFS=:
18274        for p in $PATH; do
18275          if test -f "$p/$path" && test -x "$p/$path"; then
18276            new_path="$p/$path"
18277            break
18278          fi
18279        done
18280        IFS="$IFS_save"
18281      else
18282        # This is an absolute path, we can use it without further modifications.
18283        new_path="$path"
18284      fi
18285
18286      if test "x$new_path" = x; then
18287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18289        has_space=`$ECHO "$complete" | $GREP " "`
18290        if test "x$has_space" != x; then
18291          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18293        fi
18294        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18295      fi
18296    fi
18297
18298    # Now join together the path and the arguments once again
18299    if test "x$arguments" != xEOL; then
18300      new_complete="$new_path ${arguments% *}"
18301    else
18302      new_complete="$new_path"
18303    fi
18304
18305    if test "x$complete" != "x$new_complete"; then
18306      FOUND_MAKE="$new_complete"
18307      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18308$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18309    fi
18310  fi
18311
18312        fi
18313      fi
18314    fi
18315  fi
18316
18317    fi
18318
18319    if test "x$FOUND_MAKE" = x; then
18320      if test "x$TOOLCHAIN_PATH" != x; then
18321        # We have a toolchain path, check that as well before giving up.
18322        OLD_PATH=$PATH
18323        PATH=$TOOLCHAIN_PATH:$PATH
18324        for ac_prog in gmake
18325do
18326  # Extract the first word of "$ac_prog", so it can be a program name with args.
18327set dummy $ac_prog; ac_word=$2
18328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18329$as_echo_n "checking for $ac_word... " >&6; }
18330if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18331  $as_echo_n "(cached) " >&6
18332else
18333  case $CHECK_TOOLSDIR_GMAKE in
18334  [\\/]* | ?:[\\/]*)
18335  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18336  ;;
18337  *)
18338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18339for as_dir in $PATH
18340do
18341  IFS=$as_save_IFS
18342  test -z "$as_dir" && as_dir=.
18343    for ac_exec_ext in '' $ac_executable_extensions; do
18344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18345    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18347    break 2
18348  fi
18349done
18350  done
18351IFS=$as_save_IFS
18352
18353  ;;
18354esac
18355fi
18356CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18357if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18359$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18360else
18361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18362$as_echo "no" >&6; }
18363fi
18364
18365
18366  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18367done
18368
18369
18370  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18371  DESCRIPTION="gmake in tools-dir"
18372
18373  # On Cygwin, we require a newer version of make than on other platforms
18374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18375    MAKE_VERSION_EXPR="-e 4\."
18376    MAKE_REQUIRED_VERSION="4.0"
18377   else
18378    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18379    MAKE_REQUIRED_VERSION="3.81"
18380  fi
18381
18382  if test "x$MAKE_CANDIDATE" != x; then
18383    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18384$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18385    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18386    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18387    if test "x$IS_GNU_MAKE" = x; then
18388      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18389$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18390    else
18391      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18392      if test "x$IS_MODERN_MAKE" = x; then
18393        { $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
18394$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;}
18395      else
18396        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18397          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18398            MAKE_EXPECTED_ENV='cygwin'
18399          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18400            MAKE_EXPECTED_ENV='msys'
18401          else
18402            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18403          fi
18404          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18405          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18406        else
18407          # Not relevant for non-Windows
18408          IS_MAKE_CORRECT_ENV=true
18409        fi
18410        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18411          { $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
18412$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;}
18413        else
18414          FOUND_MAKE=$MAKE_CANDIDATE
18415
18416  # Only process if variable expands to non-empty
18417
18418  if test "x$FOUND_MAKE" != x; then
18419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18420
18421  # First separate the path from the arguments. This will split at the first
18422  # space.
18423  complete="$FOUND_MAKE"
18424  path="${complete%% *}"
18425  tmp="$complete EOL"
18426  arguments="${tmp#* }"
18427
18428  # Input might be given as Windows format, start by converting to
18429  # unix format.
18430  new_path=`$CYGPATH -u "$path"`
18431
18432  # Now try to locate executable using which
18433  new_path=`$WHICH "$new_path" 2> /dev/null`
18434  # bat and cmd files are not always considered executable in cygwin causing which
18435  # to not find them
18436  if test "x$new_path" = x \
18437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18439    new_path=`$CYGPATH -u "$path"`
18440  fi
18441  if test "x$new_path" = x; then
18442    # Oops. Which didn't find the executable.
18443    # The splitting of arguments from the executable at a space might have been incorrect,
18444    # since paths with space are more likely in Windows. Give it another try with the whole
18445    # argument.
18446    path="$complete"
18447    arguments="EOL"
18448    new_path=`$CYGPATH -u "$path"`
18449    new_path=`$WHICH "$new_path" 2> /dev/null`
18450    # bat and cmd files are not always considered executable in cygwin causing which
18451    # to not find them
18452    if test "x$new_path" = x \
18453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18455      new_path=`$CYGPATH -u "$path"`
18456    fi
18457    if test "x$new_path" = x; then
18458      # It's still not found. Now this is an unrecoverable error.
18459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18461      has_space=`$ECHO "$complete" | $GREP " "`
18462      if test "x$has_space" != x; then
18463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18465      fi
18466      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18467    fi
18468  fi
18469
18470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18473  # "foo.exe" is OK but "foo" is an error.
18474  #
18475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18476  # It is also a way to make sure we got the proper file name for the real test later on.
18477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18478  if test "x$test_shortpath" = x; then
18479    # Short path failed, file does not exist as specified.
18480    # Try adding .exe or .cmd
18481    if test -f "${new_path}.exe"; then
18482      input_to_shortpath="${new_path}.exe"
18483    elif test -f "${new_path}.cmd"; then
18484      input_to_shortpath="${new_path}.cmd"
18485    else
18486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18490      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18491    fi
18492  else
18493    input_to_shortpath="$new_path"
18494  fi
18495
18496  # Call helper function which possibly converts this using DOS-style short mode.
18497  # If so, the updated path is stored in $new_path.
18498  new_path="$input_to_shortpath"
18499
18500  input_path="$input_to_shortpath"
18501  # Check if we need to convert this using DOS-style short mode. If the path
18502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18503  # take no chances and rewrite it.
18504  # Note: m4 eats our [], so we need to use [ and ] instead.
18505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18506  if test "x$has_forbidden_chars" != x; then
18507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18511      # Going to short mode and back again did indeed matter. Since short mode is
18512      # case insensitive, let's make it lowercase to improve readability.
18513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18514      # Now convert it back to Unix-style (cygpath)
18515      input_path=`$CYGPATH -u "$shortmode_path"`
18516      new_path="$input_path"
18517    fi
18518  fi
18519
18520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18521  if test "x$test_cygdrive_prefix" = x; then
18522    # As a simple fix, exclude /usr/bin since it's not a real path.
18523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18525      # a path prefixed by /cygdrive for fixpath to work.
18526      new_path="$CYGWIN_ROOT_PATH$input_path"
18527    fi
18528  fi
18529
18530  # remove trailing .exe if any
18531  new_path="${new_path/%.exe/}"
18532
18533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18534
18535  # First separate the path from the arguments. This will split at the first
18536  # space.
18537  complete="$FOUND_MAKE"
18538  path="${complete%% *}"
18539  tmp="$complete EOL"
18540  arguments="${tmp#* }"
18541
18542  # Input might be given as Windows format, start by converting to
18543  # unix format.
18544  new_path="$path"
18545
18546  windows_path="$new_path"
18547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18548    unix_path=`$CYGPATH -u "$windows_path"`
18549    new_path="$unix_path"
18550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18552    new_path="$unix_path"
18553  fi
18554
18555
18556  # Now try to locate executable using which
18557  new_path=`$WHICH "$new_path" 2> /dev/null`
18558
18559  if test "x$new_path" = x; then
18560    # Oops. Which didn't find the executable.
18561    # The splitting of arguments from the executable at a space might have been incorrect,
18562    # since paths with space are more likely in Windows. Give it another try with the whole
18563    # argument.
18564    path="$complete"
18565    arguments="EOL"
18566    new_path="$path"
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577
18578    new_path=`$WHICH "$new_path" 2> /dev/null`
18579    # bat and cmd files are not always considered executable in MSYS causing which
18580    # to not find them
18581    if test "x$new_path" = x \
18582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18584      new_path="$path"
18585
18586  windows_path="$new_path"
18587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18588    unix_path=`$CYGPATH -u "$windows_path"`
18589    new_path="$unix_path"
18590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18592    new_path="$unix_path"
18593  fi
18594
18595    fi
18596
18597    if test "x$new_path" = x; then
18598      # It's still not found. Now this is an unrecoverable error.
18599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18600$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18601      has_space=`$ECHO "$complete" | $GREP " "`
18602      if test "x$has_space" != x; then
18603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18605      fi
18606      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18607    fi
18608  fi
18609
18610  # Now new_path has a complete unix path to the binary
18611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18612    # Keep paths in /bin as-is, but remove trailing .exe if any
18613    new_path="${new_path/%.exe/}"
18614    # Do not save /bin paths to all_fixpath_prefixes!
18615  else
18616    # Not in mixed or Windows style, start by that.
18617    new_path=`cmd //c echo $new_path`
18618
18619  input_path="$new_path"
18620  # Check if we need to convert this using DOS-style short mode. If the path
18621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18622  # take no chances and rewrite it.
18623  # Note: m4 eats our [], so we need to use [ and ] instead.
18624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18625  if test "x$has_forbidden_chars" != x; then
18626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18628  fi
18629
18630    # Output is in $new_path
18631
18632  windows_path="$new_path"
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    unix_path=`$CYGPATH -u "$windows_path"`
18635    new_path="$unix_path"
18636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18638    new_path="$unix_path"
18639  fi
18640
18641    # remove trailing .exe if any
18642    new_path="${new_path/%.exe/}"
18643
18644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18646  fi
18647
18648    else
18649      # We're on a unix platform. Hooray! :)
18650      # First separate the path from the arguments. This will split at the first
18651      # space.
18652      complete="$FOUND_MAKE"
18653      path="${complete%% *}"
18654      tmp="$complete EOL"
18655      arguments="${tmp#* }"
18656
18657      # Cannot rely on the command "which" here since it doesn't always work.
18658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18659      if test -z "$is_absolute_path"; then
18660        # Path to executable is not absolute. Find it.
18661        IFS_save="$IFS"
18662        IFS=:
18663        for p in $PATH; do
18664          if test -f "$p/$path" && test -x "$p/$path"; then
18665            new_path="$p/$path"
18666            break
18667          fi
18668        done
18669        IFS="$IFS_save"
18670      else
18671        # This is an absolute path, we can use it without further modifications.
18672        new_path="$path"
18673      fi
18674
18675      if test "x$new_path" = x; then
18676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18678        has_space=`$ECHO "$complete" | $GREP " "`
18679        if test "x$has_space" != x; then
18680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18682        fi
18683        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18684      fi
18685    fi
18686
18687    # Now join together the path and the arguments once again
18688    if test "x$arguments" != xEOL; then
18689      new_complete="$new_path ${arguments% *}"
18690    else
18691      new_complete="$new_path"
18692    fi
18693
18694    if test "x$complete" != "x$new_complete"; then
18695      FOUND_MAKE="$new_complete"
18696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18697$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18698    fi
18699  fi
18700
18701        fi
18702      fi
18703    fi
18704  fi
18705
18706        if test "x$FOUND_MAKE" = x; then
18707          for ac_prog in make
18708do
18709  # Extract the first word of "$ac_prog", so it can be a program name with args.
18710set dummy $ac_prog; ac_word=$2
18711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18712$as_echo_n "checking for $ac_word... " >&6; }
18713if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18714  $as_echo_n "(cached) " >&6
18715else
18716  case $CHECK_TOOLSDIR_MAKE in
18717  [\\/]* | ?:[\\/]*)
18718  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18719  ;;
18720  *)
18721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18722for as_dir in $PATH
18723do
18724  IFS=$as_save_IFS
18725  test -z "$as_dir" && as_dir=.
18726    for ac_exec_ext in '' $ac_executable_extensions; do
18727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18728    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18730    break 2
18731  fi
18732done
18733  done
18734IFS=$as_save_IFS
18735
18736  ;;
18737esac
18738fi
18739CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18740if test -n "$CHECK_TOOLSDIR_MAKE"; then
18741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18742$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18743else
18744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18745$as_echo "no" >&6; }
18746fi
18747
18748
18749  test -n "$CHECK_TOOLSDIR_MAKE" && break
18750done
18751
18752
18753  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18754  DESCRIPTION="make in tools-dir"
18755
18756  # On Cygwin, we require a newer version of make than on other platforms
18757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18758    MAKE_VERSION_EXPR="-e 4\."
18759    MAKE_REQUIRED_VERSION="4.0"
18760   else
18761    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18762    MAKE_REQUIRED_VERSION="3.81"
18763  fi
18764
18765  if test "x$MAKE_CANDIDATE" != x; then
18766    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18767$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18768    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18769    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18770    if test "x$IS_GNU_MAKE" = x; then
18771      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18772$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18773    else
18774      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18775      if test "x$IS_MODERN_MAKE" = x; then
18776        { $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
18777$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;}
18778      else
18779        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18780          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18781            MAKE_EXPECTED_ENV='cygwin'
18782          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18783            MAKE_EXPECTED_ENV='msys'
18784          else
18785            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18786          fi
18787          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18788          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18789        else
18790          # Not relevant for non-Windows
18791          IS_MAKE_CORRECT_ENV=true
18792        fi
18793        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18794          { $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
18795$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;}
18796        else
18797          FOUND_MAKE=$MAKE_CANDIDATE
18798
18799  # Only process if variable expands to non-empty
18800
18801  if test "x$FOUND_MAKE" != x; then
18802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18803
18804  # First separate the path from the arguments. This will split at the first
18805  # space.
18806  complete="$FOUND_MAKE"
18807  path="${complete%% *}"
18808  tmp="$complete EOL"
18809  arguments="${tmp#* }"
18810
18811  # Input might be given as Windows format, start by converting to
18812  # unix format.
18813  new_path=`$CYGPATH -u "$path"`
18814
18815  # Now try to locate executable using which
18816  new_path=`$WHICH "$new_path" 2> /dev/null`
18817  # bat and cmd files are not always considered executable in cygwin causing which
18818  # to not find them
18819  if test "x$new_path" = x \
18820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18822    new_path=`$CYGPATH -u "$path"`
18823  fi
18824  if test "x$new_path" = x; then
18825    # Oops. Which didn't find the executable.
18826    # The splitting of arguments from the executable at a space might have been incorrect,
18827    # since paths with space are more likely in Windows. Give it another try with the whole
18828    # argument.
18829    path="$complete"
18830    arguments="EOL"
18831    new_path=`$CYGPATH -u "$path"`
18832    new_path=`$WHICH "$new_path" 2> /dev/null`
18833    # bat and cmd files are not always considered executable in cygwin causing which
18834    # to not find them
18835    if test "x$new_path" = x \
18836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18838      new_path=`$CYGPATH -u "$path"`
18839    fi
18840    if test "x$new_path" = x; then
18841      # It's still not found. Now this is an unrecoverable error.
18842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18844      has_space=`$ECHO "$complete" | $GREP " "`
18845      if test "x$has_space" != x; then
18846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18848      fi
18849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18850    fi
18851  fi
18852
18853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18856  # "foo.exe" is OK but "foo" is an error.
18857  #
18858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18859  # It is also a way to make sure we got the proper file name for the real test later on.
18860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18861  if test "x$test_shortpath" = x; then
18862    # Short path failed, file does not exist as specified.
18863    # Try adding .exe or .cmd
18864    if test -f "${new_path}.exe"; then
18865      input_to_shortpath="${new_path}.exe"
18866    elif test -f "${new_path}.cmd"; then
18867      input_to_shortpath="${new_path}.cmd"
18868    else
18869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18870$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18873      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18874    fi
18875  else
18876    input_to_shortpath="$new_path"
18877  fi
18878
18879  # Call helper function which possibly converts this using DOS-style short mode.
18880  # If so, the updated path is stored in $new_path.
18881  new_path="$input_to_shortpath"
18882
18883  input_path="$input_to_shortpath"
18884  # Check if we need to convert this using DOS-style short mode. If the path
18885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18886  # take no chances and rewrite it.
18887  # Note: m4 eats our [], so we need to use [ and ] instead.
18888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18889  if test "x$has_forbidden_chars" != x; then
18890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18894      # Going to short mode and back again did indeed matter. Since short mode is
18895      # case insensitive, let's make it lowercase to improve readability.
18896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18897      # Now convert it back to Unix-style (cygpath)
18898      input_path=`$CYGPATH -u "$shortmode_path"`
18899      new_path="$input_path"
18900    fi
18901  fi
18902
18903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18904  if test "x$test_cygdrive_prefix" = x; then
18905    # As a simple fix, exclude /usr/bin since it's not a real path.
18906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18908      # a path prefixed by /cygdrive for fixpath to work.
18909      new_path="$CYGWIN_ROOT_PATH$input_path"
18910    fi
18911  fi
18912
18913  # remove trailing .exe if any
18914  new_path="${new_path/%.exe/}"
18915
18916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18917
18918  # First separate the path from the arguments. This will split at the first
18919  # space.
18920  complete="$FOUND_MAKE"
18921  path="${complete%% *}"
18922  tmp="$complete EOL"
18923  arguments="${tmp#* }"
18924
18925  # Input might be given as Windows format, start by converting to
18926  # unix format.
18927  new_path="$path"
18928
18929  windows_path="$new_path"
18930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18931    unix_path=`$CYGPATH -u "$windows_path"`
18932    new_path="$unix_path"
18933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18935    new_path="$unix_path"
18936  fi
18937
18938
18939  # Now try to locate executable using which
18940  new_path=`$WHICH "$new_path" 2> /dev/null`
18941
18942  if test "x$new_path" = x; then
18943    # Oops. Which didn't find the executable.
18944    # The splitting of arguments from the executable at a space might have been incorrect,
18945    # since paths with space are more likely in Windows. Give it another try with the whole
18946    # argument.
18947    path="$complete"
18948    arguments="EOL"
18949    new_path="$path"
18950
18951  windows_path="$new_path"
18952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18953    unix_path=`$CYGPATH -u "$windows_path"`
18954    new_path="$unix_path"
18955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18957    new_path="$unix_path"
18958  fi
18959
18960
18961    new_path=`$WHICH "$new_path" 2> /dev/null`
18962    # bat and cmd files are not always considered executable in MSYS causing which
18963    # to not find them
18964    if test "x$new_path" = x \
18965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18967      new_path="$path"
18968
18969  windows_path="$new_path"
18970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18971    unix_path=`$CYGPATH -u "$windows_path"`
18972    new_path="$unix_path"
18973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18975    new_path="$unix_path"
18976  fi
18977
18978    fi
18979
18980    if test "x$new_path" = x; then
18981      # It's still not found. Now this is an unrecoverable error.
18982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18983$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18984      has_space=`$ECHO "$complete" | $GREP " "`
18985      if test "x$has_space" != x; then
18986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18988      fi
18989      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18990    fi
18991  fi
18992
18993  # Now new_path has a complete unix path to the binary
18994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18995    # Keep paths in /bin as-is, but remove trailing .exe if any
18996    new_path="${new_path/%.exe/}"
18997    # Do not save /bin paths to all_fixpath_prefixes!
18998  else
18999    # Not in mixed or Windows style, start by that.
19000    new_path=`cmd //c echo $new_path`
19001
19002  input_path="$new_path"
19003  # Check if we need to convert this using DOS-style short mode. If the path
19004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19005  # take no chances and rewrite it.
19006  # Note: m4 eats our [], so we need to use [ and ] instead.
19007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19008  if test "x$has_forbidden_chars" != x; then
19009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19011  fi
19012
19013    # Output is in $new_path
19014
19015  windows_path="$new_path"
19016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017    unix_path=`$CYGPATH -u "$windows_path"`
19018    new_path="$unix_path"
19019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19021    new_path="$unix_path"
19022  fi
19023
19024    # remove trailing .exe if any
19025    new_path="${new_path/%.exe/}"
19026
19027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19029  fi
19030
19031    else
19032      # We're on a unix platform. Hooray! :)
19033      # First separate the path from the arguments. This will split at the first
19034      # space.
19035      complete="$FOUND_MAKE"
19036      path="${complete%% *}"
19037      tmp="$complete EOL"
19038      arguments="${tmp#* }"
19039
19040      # Cannot rely on the command "which" here since it doesn't always work.
19041      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19042      if test -z "$is_absolute_path"; then
19043        # Path to executable is not absolute. Find it.
19044        IFS_save="$IFS"
19045        IFS=:
19046        for p in $PATH; do
19047          if test -f "$p/$path" && test -x "$p/$path"; then
19048            new_path="$p/$path"
19049            break
19050          fi
19051        done
19052        IFS="$IFS_save"
19053      else
19054        # This is an absolute path, we can use it without further modifications.
19055        new_path="$path"
19056      fi
19057
19058      if test "x$new_path" = x; then
19059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19061        has_space=`$ECHO "$complete" | $GREP " "`
19062        if test "x$has_space" != x; then
19063          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19065        fi
19066        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19067      fi
19068    fi
19069
19070    # Now join together the path and the arguments once again
19071    if test "x$arguments" != xEOL; then
19072      new_complete="$new_path ${arguments% *}"
19073    else
19074      new_complete="$new_path"
19075    fi
19076
19077    if test "x$complete" != "x$new_complete"; then
19078      FOUND_MAKE="$new_complete"
19079      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19080$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19081    fi
19082  fi
19083
19084        fi
19085      fi
19086    fi
19087  fi
19088
19089        fi
19090        PATH=$OLD_PATH
19091      fi
19092    fi
19093
19094    if test "x$FOUND_MAKE" = x; then
19095      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
19096    fi
19097
19098  else
19099    # The variable is set, but is it from the command line or the environment?
19100
19101    # Try to remove the string !MAKE! from our list.
19102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19104      # If it failed, the variable was not from the command line. Ignore it,
19105      # but warn the user (except for BASH, which is always set by the calling BASH).
19106      if test "xMAKE" != xBASH; then
19107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19108$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19109      fi
19110      # Try to locate tool using the code snippet
19111
19112    # Try our hardest to locate a correct version of GNU make
19113    for ac_prog in gmake
19114do
19115  # Extract the first word of "$ac_prog", so it can be a program name with args.
19116set dummy $ac_prog; ac_word=$2
19117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19118$as_echo_n "checking for $ac_word... " >&6; }
19119if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19120  $as_echo_n "(cached) " >&6
19121else
19122  case $CHECK_GMAKE in
19123  [\\/]* | ?:[\\/]*)
19124  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19125  ;;
19126  *)
19127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19128for as_dir in $PATH
19129do
19130  IFS=$as_save_IFS
19131  test -z "$as_dir" && as_dir=.
19132    for ac_exec_ext in '' $ac_executable_extensions; do
19133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19134    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19136    break 2
19137  fi
19138done
19139  done
19140IFS=$as_save_IFS
19141
19142  ;;
19143esac
19144fi
19145CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19146if test -n "$CHECK_GMAKE"; then
19147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19148$as_echo "$CHECK_GMAKE" >&6; }
19149else
19150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19151$as_echo "no" >&6; }
19152fi
19153
19154
19155  test -n "$CHECK_GMAKE" && break
19156done
19157
19158
19159  MAKE_CANDIDATE=""$CHECK_GMAKE""
19160  DESCRIPTION="gmake in PATH"
19161
19162  # On Cygwin, we require a newer version of make than on other platforms
19163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19164    MAKE_VERSION_EXPR="-e 4\."
19165    MAKE_REQUIRED_VERSION="4.0"
19166   else
19167    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19168    MAKE_REQUIRED_VERSION="3.81"
19169  fi
19170
19171  if test "x$MAKE_CANDIDATE" != x; then
19172    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19173$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19174    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19175    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19176    if test "x$IS_GNU_MAKE" = x; then
19177      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19178$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19179    else
19180      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19181      if test "x$IS_MODERN_MAKE" = x; then
19182        { $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
19183$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;}
19184      else
19185        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19186          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19187            MAKE_EXPECTED_ENV='cygwin'
19188          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19189            MAKE_EXPECTED_ENV='msys'
19190          else
19191            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19192          fi
19193          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19194          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19195        else
19196          # Not relevant for non-Windows
19197          IS_MAKE_CORRECT_ENV=true
19198        fi
19199        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19200          { $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
19201$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;}
19202        else
19203          FOUND_MAKE=$MAKE_CANDIDATE
19204
19205  # Only process if variable expands to non-empty
19206
19207  if test "x$FOUND_MAKE" != x; then
19208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19209
19210  # First separate the path from the arguments. This will split at the first
19211  # space.
19212  complete="$FOUND_MAKE"
19213  path="${complete%% *}"
19214  tmp="$complete EOL"
19215  arguments="${tmp#* }"
19216
19217  # Input might be given as Windows format, start by converting to
19218  # unix format.
19219  new_path=`$CYGPATH -u "$path"`
19220
19221  # Now try to locate executable using which
19222  new_path=`$WHICH "$new_path" 2> /dev/null`
19223  # bat and cmd files are not always considered executable in cygwin causing which
19224  # to not find them
19225  if test "x$new_path" = x \
19226      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19227      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19228    new_path=`$CYGPATH -u "$path"`
19229  fi
19230  if test "x$new_path" = x; then
19231    # Oops. Which didn't find the executable.
19232    # The splitting of arguments from the executable at a space might have been incorrect,
19233    # since paths with space are more likely in Windows. Give it another try with the whole
19234    # argument.
19235    path="$complete"
19236    arguments="EOL"
19237    new_path=`$CYGPATH -u "$path"`
19238    new_path=`$WHICH "$new_path" 2> /dev/null`
19239    # bat and cmd files are not always considered executable in cygwin causing which
19240    # to not find them
19241    if test "x$new_path" = x \
19242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19244      new_path=`$CYGPATH -u "$path"`
19245    fi
19246    if test "x$new_path" = x; then
19247      # It's still not found. Now this is an unrecoverable error.
19248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19250      has_space=`$ECHO "$complete" | $GREP " "`
19251      if test "x$has_space" != x; then
19252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19254      fi
19255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19256    fi
19257  fi
19258
19259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19262  # "foo.exe" is OK but "foo" is an error.
19263  #
19264  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19265  # It is also a way to make sure we got the proper file name for the real test later on.
19266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19267  if test "x$test_shortpath" = x; then
19268    # Short path failed, file does not exist as specified.
19269    # Try adding .exe or .cmd
19270    if test -f "${new_path}.exe"; then
19271      input_to_shortpath="${new_path}.exe"
19272    elif test -f "${new_path}.cmd"; then
19273      input_to_shortpath="${new_path}.cmd"
19274    else
19275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19276$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19279      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19280    fi
19281  else
19282    input_to_shortpath="$new_path"
19283  fi
19284
19285  # Call helper function which possibly converts this using DOS-style short mode.
19286  # If so, the updated path is stored in $new_path.
19287  new_path="$input_to_shortpath"
19288
19289  input_path="$input_to_shortpath"
19290  # Check if we need to convert this using DOS-style short mode. If the path
19291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19292  # take no chances and rewrite it.
19293  # Note: m4 eats our [], so we need to use [ and ] instead.
19294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19295  if test "x$has_forbidden_chars" != x; then
19296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19300      # Going to short mode and back again did indeed matter. Since short mode is
19301      # case insensitive, let's make it lowercase to improve readability.
19302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19303      # Now convert it back to Unix-style (cygpath)
19304      input_path=`$CYGPATH -u "$shortmode_path"`
19305      new_path="$input_path"
19306    fi
19307  fi
19308
19309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19310  if test "x$test_cygdrive_prefix" = x; then
19311    # As a simple fix, exclude /usr/bin since it's not a real path.
19312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19314      # a path prefixed by /cygdrive for fixpath to work.
19315      new_path="$CYGWIN_ROOT_PATH$input_path"
19316    fi
19317  fi
19318
19319  # remove trailing .exe if any
19320  new_path="${new_path/%.exe/}"
19321
19322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19323
19324  # First separate the path from the arguments. This will split at the first
19325  # space.
19326  complete="$FOUND_MAKE"
19327  path="${complete%% *}"
19328  tmp="$complete EOL"
19329  arguments="${tmp#* }"
19330
19331  # Input might be given as Windows format, start by converting to
19332  # unix format.
19333  new_path="$path"
19334
19335  windows_path="$new_path"
19336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19337    unix_path=`$CYGPATH -u "$windows_path"`
19338    new_path="$unix_path"
19339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19341    new_path="$unix_path"
19342  fi
19343
19344
19345  # Now try to locate executable using which
19346  new_path=`$WHICH "$new_path" 2> /dev/null`
19347
19348  if test "x$new_path" = x; then
19349    # Oops. Which didn't find the executable.
19350    # The splitting of arguments from the executable at a space might have been incorrect,
19351    # since paths with space are more likely in Windows. Give it another try with the whole
19352    # argument.
19353    path="$complete"
19354    arguments="EOL"
19355    new_path="$path"
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366
19367    new_path=`$WHICH "$new_path" 2> /dev/null`
19368    # bat and cmd files are not always considered executable in MSYS causing which
19369    # to not find them
19370    if test "x$new_path" = x \
19371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19373      new_path="$path"
19374
19375  windows_path="$new_path"
19376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19377    unix_path=`$CYGPATH -u "$windows_path"`
19378    new_path="$unix_path"
19379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19381    new_path="$unix_path"
19382  fi
19383
19384    fi
19385
19386    if test "x$new_path" = x; then
19387      # It's still not found. Now this is an unrecoverable error.
19388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19389$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19390      has_space=`$ECHO "$complete" | $GREP " "`
19391      if test "x$has_space" != x; then
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19394      fi
19395      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19396    fi
19397  fi
19398
19399  # Now new_path has a complete unix path to the binary
19400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19401    # Keep paths in /bin as-is, but remove trailing .exe if any
19402    new_path="${new_path/%.exe/}"
19403    # Do not save /bin paths to all_fixpath_prefixes!
19404  else
19405    # Not in mixed or Windows style, start by that.
19406    new_path=`cmd //c echo $new_path`
19407
19408  input_path="$new_path"
19409  # Check if we need to convert this using DOS-style short mode. If the path
19410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19411  # take no chances and rewrite it.
19412  # Note: m4 eats our [], so we need to use [ and ] instead.
19413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19414  if test "x$has_forbidden_chars" != x; then
19415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19417  fi
19418
19419    # Output is in $new_path
19420
19421  windows_path="$new_path"
19422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19423    unix_path=`$CYGPATH -u "$windows_path"`
19424    new_path="$unix_path"
19425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19427    new_path="$unix_path"
19428  fi
19429
19430    # remove trailing .exe if any
19431    new_path="${new_path/%.exe/}"
19432
19433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19435  fi
19436
19437    else
19438      # We're on a unix platform. Hooray! :)
19439      # First separate the path from the arguments. This will split at the first
19440      # space.
19441      complete="$FOUND_MAKE"
19442      path="${complete%% *}"
19443      tmp="$complete EOL"
19444      arguments="${tmp#* }"
19445
19446      # Cannot rely on the command "which" here since it doesn't always work.
19447      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19448      if test -z "$is_absolute_path"; then
19449        # Path to executable is not absolute. Find it.
19450        IFS_save="$IFS"
19451        IFS=:
19452        for p in $PATH; do
19453          if test -f "$p/$path" && test -x "$p/$path"; then
19454            new_path="$p/$path"
19455            break
19456          fi
19457        done
19458        IFS="$IFS_save"
19459      else
19460        # This is an absolute path, we can use it without further modifications.
19461        new_path="$path"
19462      fi
19463
19464      if test "x$new_path" = x; then
19465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19466$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19467        has_space=`$ECHO "$complete" | $GREP " "`
19468        if test "x$has_space" != x; then
19469          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19470$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19471        fi
19472        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19473      fi
19474    fi
19475
19476    # Now join together the path and the arguments once again
19477    if test "x$arguments" != xEOL; then
19478      new_complete="$new_path ${arguments% *}"
19479    else
19480      new_complete="$new_path"
19481    fi
19482
19483    if test "x$complete" != "x$new_complete"; then
19484      FOUND_MAKE="$new_complete"
19485      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19486$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19487    fi
19488  fi
19489
19490        fi
19491      fi
19492    fi
19493  fi
19494
19495
19496    if test "x$FOUND_MAKE" = x; then
19497      for ac_prog in make
19498do
19499  # Extract the first word of "$ac_prog", so it can be a program name with args.
19500set dummy $ac_prog; ac_word=$2
19501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19502$as_echo_n "checking for $ac_word... " >&6; }
19503if ${ac_cv_path_CHECK_MAKE+:} false; then :
19504  $as_echo_n "(cached) " >&6
19505else
19506  case $CHECK_MAKE in
19507  [\\/]* | ?:[\\/]*)
19508  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19509  ;;
19510  *)
19511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19512for as_dir in $PATH
19513do
19514  IFS=$as_save_IFS
19515  test -z "$as_dir" && as_dir=.
19516    for ac_exec_ext in '' $ac_executable_extensions; do
19517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19518    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19520    break 2
19521  fi
19522done
19523  done
19524IFS=$as_save_IFS
19525
19526  ;;
19527esac
19528fi
19529CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19530if test -n "$CHECK_MAKE"; then
19531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19532$as_echo "$CHECK_MAKE" >&6; }
19533else
19534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19535$as_echo "no" >&6; }
19536fi
19537
19538
19539  test -n "$CHECK_MAKE" && break
19540done
19541
19542
19543  MAKE_CANDIDATE=""$CHECK_MAKE""
19544  DESCRIPTION="make in PATH"
19545
19546  # On Cygwin, we require a newer version of make than on other platforms
19547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19548    MAKE_VERSION_EXPR="-e 4\."
19549    MAKE_REQUIRED_VERSION="4.0"
19550   else
19551    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19552    MAKE_REQUIRED_VERSION="3.81"
19553  fi
19554
19555  if test "x$MAKE_CANDIDATE" != x; then
19556    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19557$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19558    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19559    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19560    if test "x$IS_GNU_MAKE" = x; then
19561      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19562$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19563    else
19564      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19565      if test "x$IS_MODERN_MAKE" = x; then
19566        { $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
19567$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;}
19568      else
19569        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19570          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19571            MAKE_EXPECTED_ENV='cygwin'
19572          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19573            MAKE_EXPECTED_ENV='msys'
19574          else
19575            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19576          fi
19577          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19578          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19579        else
19580          # Not relevant for non-Windows
19581          IS_MAKE_CORRECT_ENV=true
19582        fi
19583        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19584          { $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
19585$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;}
19586        else
19587          FOUND_MAKE=$MAKE_CANDIDATE
19588
19589  # Only process if variable expands to non-empty
19590
19591  if test "x$FOUND_MAKE" != x; then
19592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19593
19594  # First separate the path from the arguments. This will split at the first
19595  # space.
19596  complete="$FOUND_MAKE"
19597  path="${complete%% *}"
19598  tmp="$complete EOL"
19599  arguments="${tmp#* }"
19600
19601  # Input might be given as Windows format, start by converting to
19602  # unix format.
19603  new_path=`$CYGPATH -u "$path"`
19604
19605  # Now try to locate executable using which
19606  new_path=`$WHICH "$new_path" 2> /dev/null`
19607  # bat and cmd files are not always considered executable in cygwin causing which
19608  # to not find them
19609  if test "x$new_path" = x \
19610      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19611      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19612    new_path=`$CYGPATH -u "$path"`
19613  fi
19614  if test "x$new_path" = x; then
19615    # Oops. Which didn't find the executable.
19616    # The splitting of arguments from the executable at a space might have been incorrect,
19617    # since paths with space are more likely in Windows. Give it another try with the whole
19618    # argument.
19619    path="$complete"
19620    arguments="EOL"
19621    new_path=`$CYGPATH -u "$path"`
19622    new_path=`$WHICH "$new_path" 2> /dev/null`
19623    # bat and cmd files are not always considered executable in cygwin causing which
19624    # to not find them
19625    if test "x$new_path" = x \
19626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19628      new_path=`$CYGPATH -u "$path"`
19629    fi
19630    if test "x$new_path" = x; then
19631      # It's still not found. Now this is an unrecoverable error.
19632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19634      has_space=`$ECHO "$complete" | $GREP " "`
19635      if test "x$has_space" != x; then
19636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19638      fi
19639      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19640    fi
19641  fi
19642
19643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19646  # "foo.exe" is OK but "foo" is an error.
19647  #
19648  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19649  # It is also a way to make sure we got the proper file name for the real test later on.
19650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19651  if test "x$test_shortpath" = x; then
19652    # Short path failed, file does not exist as specified.
19653    # Try adding .exe or .cmd
19654    if test -f "${new_path}.exe"; then
19655      input_to_shortpath="${new_path}.exe"
19656    elif test -f "${new_path}.cmd"; then
19657      input_to_shortpath="${new_path}.cmd"
19658    else
19659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19661      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19662$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19664    fi
19665  else
19666    input_to_shortpath="$new_path"
19667  fi
19668
19669  # Call helper function which possibly converts this using DOS-style short mode.
19670  # If so, the updated path is stored in $new_path.
19671  new_path="$input_to_shortpath"
19672
19673  input_path="$input_to_shortpath"
19674  # Check if we need to convert this using DOS-style short mode. If the path
19675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19676  # take no chances and rewrite it.
19677  # Note: m4 eats our [], so we need to use [ and ] instead.
19678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19679  if test "x$has_forbidden_chars" != x; then
19680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19684      # Going to short mode and back again did indeed matter. Since short mode is
19685      # case insensitive, let's make it lowercase to improve readability.
19686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19687      # Now convert it back to Unix-style (cygpath)
19688      input_path=`$CYGPATH -u "$shortmode_path"`
19689      new_path="$input_path"
19690    fi
19691  fi
19692
19693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19694  if test "x$test_cygdrive_prefix" = x; then
19695    # As a simple fix, exclude /usr/bin since it's not a real path.
19696    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19698      # a path prefixed by /cygdrive for fixpath to work.
19699      new_path="$CYGWIN_ROOT_PATH$input_path"
19700    fi
19701  fi
19702
19703  # remove trailing .exe if any
19704  new_path="${new_path/%.exe/}"
19705
19706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19707
19708  # First separate the path from the arguments. This will split at the first
19709  # space.
19710  complete="$FOUND_MAKE"
19711  path="${complete%% *}"
19712  tmp="$complete EOL"
19713  arguments="${tmp#* }"
19714
19715  # Input might be given as Windows format, start by converting to
19716  # unix format.
19717  new_path="$path"
19718
19719  windows_path="$new_path"
19720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19721    unix_path=`$CYGPATH -u "$windows_path"`
19722    new_path="$unix_path"
19723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19725    new_path="$unix_path"
19726  fi
19727
19728
19729  # Now try to locate executable using which
19730  new_path=`$WHICH "$new_path" 2> /dev/null`
19731
19732  if test "x$new_path" = x; then
19733    # Oops. Which didn't find the executable.
19734    # The splitting of arguments from the executable at a space might have been incorrect,
19735    # since paths with space are more likely in Windows. Give it another try with the whole
19736    # argument.
19737    path="$complete"
19738    arguments="EOL"
19739    new_path="$path"
19740
19741  windows_path="$new_path"
19742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19743    unix_path=`$CYGPATH -u "$windows_path"`
19744    new_path="$unix_path"
19745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19747    new_path="$unix_path"
19748  fi
19749
19750
19751    new_path=`$WHICH "$new_path" 2> /dev/null`
19752    # bat and cmd files are not always considered executable in MSYS causing which
19753    # to not find them
19754    if test "x$new_path" = x \
19755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19757      new_path="$path"
19758
19759  windows_path="$new_path"
19760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19761    unix_path=`$CYGPATH -u "$windows_path"`
19762    new_path="$unix_path"
19763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19765    new_path="$unix_path"
19766  fi
19767
19768    fi
19769
19770    if test "x$new_path" = x; then
19771      # It's still not found. Now this is an unrecoverable error.
19772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19773$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19774      has_space=`$ECHO "$complete" | $GREP " "`
19775      if test "x$has_space" != x; then
19776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19778      fi
19779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19780    fi
19781  fi
19782
19783  # Now new_path has a complete unix path to the binary
19784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19785    # Keep paths in /bin as-is, but remove trailing .exe if any
19786    new_path="${new_path/%.exe/}"
19787    # Do not save /bin paths to all_fixpath_prefixes!
19788  else
19789    # Not in mixed or Windows style, start by that.
19790    new_path=`cmd //c echo $new_path`
19791
19792  input_path="$new_path"
19793  # Check if we need to convert this using DOS-style short mode. If the path
19794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19795  # take no chances and rewrite it.
19796  # Note: m4 eats our [], so we need to use [ and ] instead.
19797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19798  if test "x$has_forbidden_chars" != x; then
19799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19801  fi
19802
19803    # Output is in $new_path
19804
19805  windows_path="$new_path"
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    unix_path=`$CYGPATH -u "$windows_path"`
19808    new_path="$unix_path"
19809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19811    new_path="$unix_path"
19812  fi
19813
19814    # remove trailing .exe if any
19815    new_path="${new_path/%.exe/}"
19816
19817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19819  fi
19820
19821    else
19822      # We're on a unix platform. Hooray! :)
19823      # First separate the path from the arguments. This will split at the first
19824      # space.
19825      complete="$FOUND_MAKE"
19826      path="${complete%% *}"
19827      tmp="$complete EOL"
19828      arguments="${tmp#* }"
19829
19830      # Cannot rely on the command "which" here since it doesn't always work.
19831      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19832      if test -z "$is_absolute_path"; then
19833        # Path to executable is not absolute. Find it.
19834        IFS_save="$IFS"
19835        IFS=:
19836        for p in $PATH; do
19837          if test -f "$p/$path" && test -x "$p/$path"; then
19838            new_path="$p/$path"
19839            break
19840          fi
19841        done
19842        IFS="$IFS_save"
19843      else
19844        # This is an absolute path, we can use it without further modifications.
19845        new_path="$path"
19846      fi
19847
19848      if test "x$new_path" = x; then
19849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19851        has_space=`$ECHO "$complete" | $GREP " "`
19852        if test "x$has_space" != x; then
19853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19855        fi
19856        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19857      fi
19858    fi
19859
19860    # Now join together the path and the arguments once again
19861    if test "x$arguments" != xEOL; then
19862      new_complete="$new_path ${arguments% *}"
19863    else
19864      new_complete="$new_path"
19865    fi
19866
19867    if test "x$complete" != "x$new_complete"; then
19868      FOUND_MAKE="$new_complete"
19869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19870$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19871    fi
19872  fi
19873
19874        fi
19875      fi
19876    fi
19877  fi
19878
19879    fi
19880
19881    if test "x$FOUND_MAKE" = x; then
19882      if test "x$TOOLCHAIN_PATH" != x; then
19883        # We have a toolchain path, check that as well before giving up.
19884        OLD_PATH=$PATH
19885        PATH=$TOOLCHAIN_PATH:$PATH
19886        for ac_prog in gmake
19887do
19888  # Extract the first word of "$ac_prog", so it can be a program name with args.
19889set dummy $ac_prog; ac_word=$2
19890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19891$as_echo_n "checking for $ac_word... " >&6; }
19892if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19893  $as_echo_n "(cached) " >&6
19894else
19895  case $CHECK_TOOLSDIR_GMAKE in
19896  [\\/]* | ?:[\\/]*)
19897  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19898  ;;
19899  *)
19900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19901for as_dir in $PATH
19902do
19903  IFS=$as_save_IFS
19904  test -z "$as_dir" && as_dir=.
19905    for ac_exec_ext in '' $ac_executable_extensions; do
19906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19907    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19909    break 2
19910  fi
19911done
19912  done
19913IFS=$as_save_IFS
19914
19915  ;;
19916esac
19917fi
19918CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19919if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19921$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19922else
19923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19924$as_echo "no" >&6; }
19925fi
19926
19927
19928  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19929done
19930
19931
19932  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19933  DESCRIPTION="gmake in tools-dir"
19934
19935  # On Cygwin, we require a newer version of make than on other platforms
19936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19937    MAKE_VERSION_EXPR="-e 4\."
19938    MAKE_REQUIRED_VERSION="4.0"
19939   else
19940    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19941    MAKE_REQUIRED_VERSION="3.81"
19942  fi
19943
19944  if test "x$MAKE_CANDIDATE" != x; then
19945    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19946$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19947    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19948    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19949    if test "x$IS_GNU_MAKE" = x; then
19950      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19951$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19952    else
19953      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19954      if test "x$IS_MODERN_MAKE" = x; then
19955        { $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
19956$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;}
19957      else
19958        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19959          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19960            MAKE_EXPECTED_ENV='cygwin'
19961          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19962            MAKE_EXPECTED_ENV='msys'
19963          else
19964            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19965          fi
19966          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19967          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19968        else
19969          # Not relevant for non-Windows
19970          IS_MAKE_CORRECT_ENV=true
19971        fi
19972        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19973          { $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
19974$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;}
19975        else
19976          FOUND_MAKE=$MAKE_CANDIDATE
19977
19978  # Only process if variable expands to non-empty
19979
19980  if test "x$FOUND_MAKE" != x; then
19981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982
19983  # First separate the path from the arguments. This will split at the first
19984  # space.
19985  complete="$FOUND_MAKE"
19986  path="${complete%% *}"
19987  tmp="$complete EOL"
19988  arguments="${tmp#* }"
19989
19990  # Input might be given as Windows format, start by converting to
19991  # unix format.
19992  new_path=`$CYGPATH -u "$path"`
19993
19994  # Now try to locate executable using which
19995  new_path=`$WHICH "$new_path" 2> /dev/null`
19996  # bat and cmd files are not always considered executable in cygwin causing which
19997  # to not find them
19998  if test "x$new_path" = x \
19999      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20000      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20001    new_path=`$CYGPATH -u "$path"`
20002  fi
20003  if test "x$new_path" = x; then
20004    # Oops. Which didn't find the executable.
20005    # The splitting of arguments from the executable at a space might have been incorrect,
20006    # since paths with space are more likely in Windows. Give it another try with the whole
20007    # argument.
20008    path="$complete"
20009    arguments="EOL"
20010    new_path=`$CYGPATH -u "$path"`
20011    new_path=`$WHICH "$new_path" 2> /dev/null`
20012    # bat and cmd files are not always considered executable in cygwin causing which
20013    # to not find them
20014    if test "x$new_path" = x \
20015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20017      new_path=`$CYGPATH -u "$path"`
20018    fi
20019    if test "x$new_path" = x; then
20020      # It's still not found. Now this is an unrecoverable error.
20021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20023      has_space=`$ECHO "$complete" | $GREP " "`
20024      if test "x$has_space" != x; then
20025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20027      fi
20028      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20029    fi
20030  fi
20031
20032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20035  # "foo.exe" is OK but "foo" is an error.
20036  #
20037  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20038  # It is also a way to make sure we got the proper file name for the real test later on.
20039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20040  if test "x$test_shortpath" = x; then
20041    # Short path failed, file does not exist as specified.
20042    # Try adding .exe or .cmd
20043    if test -f "${new_path}.exe"; then
20044      input_to_shortpath="${new_path}.exe"
20045    elif test -f "${new_path}.cmd"; then
20046      input_to_shortpath="${new_path}.cmd"
20047    else
20048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20049$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20052      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20053    fi
20054  else
20055    input_to_shortpath="$new_path"
20056  fi
20057
20058  # Call helper function which possibly converts this using DOS-style short mode.
20059  # If so, the updated path is stored in $new_path.
20060  new_path="$input_to_shortpath"
20061
20062  input_path="$input_to_shortpath"
20063  # Check if we need to convert this using DOS-style short mode. If the path
20064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20065  # take no chances and rewrite it.
20066  # Note: m4 eats our [], so we need to use [ and ] instead.
20067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20068  if test "x$has_forbidden_chars" != x; then
20069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20073      # Going to short mode and back again did indeed matter. Since short mode is
20074      # case insensitive, let's make it lowercase to improve readability.
20075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20076      # Now convert it back to Unix-style (cygpath)
20077      input_path=`$CYGPATH -u "$shortmode_path"`
20078      new_path="$input_path"
20079    fi
20080  fi
20081
20082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20083  if test "x$test_cygdrive_prefix" = x; then
20084    # As a simple fix, exclude /usr/bin since it's not a real path.
20085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20087      # a path prefixed by /cygdrive for fixpath to work.
20088      new_path="$CYGWIN_ROOT_PATH$input_path"
20089    fi
20090  fi
20091
20092  # remove trailing .exe if any
20093  new_path="${new_path/%.exe/}"
20094
20095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20096
20097  # First separate the path from the arguments. This will split at the first
20098  # space.
20099  complete="$FOUND_MAKE"
20100  path="${complete%% *}"
20101  tmp="$complete EOL"
20102  arguments="${tmp#* }"
20103
20104  # Input might be given as Windows format, start by converting to
20105  # unix format.
20106  new_path="$path"
20107
20108  windows_path="$new_path"
20109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20110    unix_path=`$CYGPATH -u "$windows_path"`
20111    new_path="$unix_path"
20112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20114    new_path="$unix_path"
20115  fi
20116
20117
20118  # Now try to locate executable using which
20119  new_path=`$WHICH "$new_path" 2> /dev/null`
20120
20121  if test "x$new_path" = x; then
20122    # Oops. Which didn't find the executable.
20123    # The splitting of arguments from the executable at a space might have been incorrect,
20124    # since paths with space are more likely in Windows. Give it another try with the whole
20125    # argument.
20126    path="$complete"
20127    arguments="EOL"
20128    new_path="$path"
20129
20130  windows_path="$new_path"
20131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20132    unix_path=`$CYGPATH -u "$windows_path"`
20133    new_path="$unix_path"
20134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20136    new_path="$unix_path"
20137  fi
20138
20139
20140    new_path=`$WHICH "$new_path" 2> /dev/null`
20141    # bat and cmd files are not always considered executable in MSYS causing which
20142    # to not find them
20143    if test "x$new_path" = x \
20144        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20145        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20146      new_path="$path"
20147
20148  windows_path="$new_path"
20149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20150    unix_path=`$CYGPATH -u "$windows_path"`
20151    new_path="$unix_path"
20152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20154    new_path="$unix_path"
20155  fi
20156
20157    fi
20158
20159    if test "x$new_path" = x; then
20160      # It's still not found. Now this is an unrecoverable error.
20161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20163      has_space=`$ECHO "$complete" | $GREP " "`
20164      if test "x$has_space" != x; then
20165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20167      fi
20168      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20169    fi
20170  fi
20171
20172  # Now new_path has a complete unix path to the binary
20173  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20174    # Keep paths in /bin as-is, but remove trailing .exe if any
20175    new_path="${new_path/%.exe/}"
20176    # Do not save /bin paths to all_fixpath_prefixes!
20177  else
20178    # Not in mixed or Windows style, start by that.
20179    new_path=`cmd //c echo $new_path`
20180
20181  input_path="$new_path"
20182  # Check if we need to convert this using DOS-style short mode. If the path
20183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20184  # take no chances and rewrite it.
20185  # Note: m4 eats our [], so we need to use [ and ] instead.
20186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20187  if test "x$has_forbidden_chars" != x; then
20188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20190  fi
20191
20192    # Output is in $new_path
20193
20194  windows_path="$new_path"
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    unix_path=`$CYGPATH -u "$windows_path"`
20197    new_path="$unix_path"
20198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20200    new_path="$unix_path"
20201  fi
20202
20203    # remove trailing .exe if any
20204    new_path="${new_path/%.exe/}"
20205
20206    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20207    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20208  fi
20209
20210    else
20211      # We're on a unix platform. Hooray! :)
20212      # First separate the path from the arguments. This will split at the first
20213      # space.
20214      complete="$FOUND_MAKE"
20215      path="${complete%% *}"
20216      tmp="$complete EOL"
20217      arguments="${tmp#* }"
20218
20219      # Cannot rely on the command "which" here since it doesn't always work.
20220      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20221      if test -z "$is_absolute_path"; then
20222        # Path to executable is not absolute. Find it.
20223        IFS_save="$IFS"
20224        IFS=:
20225        for p in $PATH; do
20226          if test -f "$p/$path" && test -x "$p/$path"; then
20227            new_path="$p/$path"
20228            break
20229          fi
20230        done
20231        IFS="$IFS_save"
20232      else
20233        # This is an absolute path, we can use it without further modifications.
20234        new_path="$path"
20235      fi
20236
20237      if test "x$new_path" = x; then
20238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20240        has_space=`$ECHO "$complete" | $GREP " "`
20241        if test "x$has_space" != x; then
20242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20244        fi
20245        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20246      fi
20247    fi
20248
20249    # Now join together the path and the arguments once again
20250    if test "x$arguments" != xEOL; then
20251      new_complete="$new_path ${arguments% *}"
20252    else
20253      new_complete="$new_path"
20254    fi
20255
20256    if test "x$complete" != "x$new_complete"; then
20257      FOUND_MAKE="$new_complete"
20258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20259$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20260    fi
20261  fi
20262
20263        fi
20264      fi
20265    fi
20266  fi
20267
20268        if test "x$FOUND_MAKE" = x; then
20269          for ac_prog in make
20270do
20271  # Extract the first word of "$ac_prog", so it can be a program name with args.
20272set dummy $ac_prog; ac_word=$2
20273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20274$as_echo_n "checking for $ac_word... " >&6; }
20275if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20276  $as_echo_n "(cached) " >&6
20277else
20278  case $CHECK_TOOLSDIR_MAKE in
20279  [\\/]* | ?:[\\/]*)
20280  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20281  ;;
20282  *)
20283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20284for as_dir in $PATH
20285do
20286  IFS=$as_save_IFS
20287  test -z "$as_dir" && as_dir=.
20288    for ac_exec_ext in '' $ac_executable_extensions; do
20289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20290    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20292    break 2
20293  fi
20294done
20295  done
20296IFS=$as_save_IFS
20297
20298  ;;
20299esac
20300fi
20301CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20302if test -n "$CHECK_TOOLSDIR_MAKE"; then
20303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20304$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20305else
20306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20307$as_echo "no" >&6; }
20308fi
20309
20310
20311  test -n "$CHECK_TOOLSDIR_MAKE" && break
20312done
20313
20314
20315  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20316  DESCRIPTION="make in tools-dir"
20317
20318  # On Cygwin, we require a newer version of make than on other platforms
20319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20320    MAKE_VERSION_EXPR="-e 4\."
20321    MAKE_REQUIRED_VERSION="4.0"
20322   else
20323    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20324    MAKE_REQUIRED_VERSION="3.81"
20325  fi
20326
20327  if test "x$MAKE_CANDIDATE" != x; then
20328    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20329$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20330    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20331    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20332    if test "x$IS_GNU_MAKE" = x; then
20333      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20334$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20335    else
20336      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20337      if test "x$IS_MODERN_MAKE" = x; then
20338        { $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
20339$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;}
20340      else
20341        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20342          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20343            MAKE_EXPECTED_ENV='cygwin'
20344          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20345            MAKE_EXPECTED_ENV='msys'
20346          else
20347            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20348          fi
20349          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20350          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20351        else
20352          # Not relevant for non-Windows
20353          IS_MAKE_CORRECT_ENV=true
20354        fi
20355        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20356          { $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
20357$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;}
20358        else
20359          FOUND_MAKE=$MAKE_CANDIDATE
20360
20361  # Only process if variable expands to non-empty
20362
20363  if test "x$FOUND_MAKE" != x; then
20364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20365
20366  # First separate the path from the arguments. This will split at the first
20367  # space.
20368  complete="$FOUND_MAKE"
20369  path="${complete%% *}"
20370  tmp="$complete EOL"
20371  arguments="${tmp#* }"
20372
20373  # Input might be given as Windows format, start by converting to
20374  # unix format.
20375  new_path=`$CYGPATH -u "$path"`
20376
20377  # Now try to locate executable using which
20378  new_path=`$WHICH "$new_path" 2> /dev/null`
20379  # bat and cmd files are not always considered executable in cygwin causing which
20380  # to not find them
20381  if test "x$new_path" = x \
20382      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20383      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20384    new_path=`$CYGPATH -u "$path"`
20385  fi
20386  if test "x$new_path" = x; then
20387    # Oops. Which didn't find the executable.
20388    # The splitting of arguments from the executable at a space might have been incorrect,
20389    # since paths with space are more likely in Windows. Give it another try with the whole
20390    # argument.
20391    path="$complete"
20392    arguments="EOL"
20393    new_path=`$CYGPATH -u "$path"`
20394    new_path=`$WHICH "$new_path" 2> /dev/null`
20395    # bat and cmd files are not always considered executable in cygwin causing which
20396    # to not find them
20397    if test "x$new_path" = x \
20398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20400      new_path=`$CYGPATH -u "$path"`
20401    fi
20402    if test "x$new_path" = x; then
20403      # It's still not found. Now this is an unrecoverable error.
20404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20405$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20406      has_space=`$ECHO "$complete" | $GREP " "`
20407      if test "x$has_space" != x; then
20408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20410      fi
20411      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20412    fi
20413  fi
20414
20415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20418  # "foo.exe" is OK but "foo" is an error.
20419  #
20420  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20421  # It is also a way to make sure we got the proper file name for the real test later on.
20422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20423  if test "x$test_shortpath" = x; then
20424    # Short path failed, file does not exist as specified.
20425    # Try adding .exe or .cmd
20426    if test -f "${new_path}.exe"; then
20427      input_to_shortpath="${new_path}.exe"
20428    elif test -f "${new_path}.cmd"; then
20429      input_to_shortpath="${new_path}.cmd"
20430    else
20431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20432$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20433      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20434$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20436    fi
20437  else
20438    input_to_shortpath="$new_path"
20439  fi
20440
20441  # Call helper function which possibly converts this using DOS-style short mode.
20442  # If so, the updated path is stored in $new_path.
20443  new_path="$input_to_shortpath"
20444
20445  input_path="$input_to_shortpath"
20446  # Check if we need to convert this using DOS-style short mode. If the path
20447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20448  # take no chances and rewrite it.
20449  # Note: m4 eats our [], so we need to use [ and ] instead.
20450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20451  if test "x$has_forbidden_chars" != x; then
20452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20456      # Going to short mode and back again did indeed matter. Since short mode is
20457      # case insensitive, let's make it lowercase to improve readability.
20458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20459      # Now convert it back to Unix-style (cygpath)
20460      input_path=`$CYGPATH -u "$shortmode_path"`
20461      new_path="$input_path"
20462    fi
20463  fi
20464
20465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20466  if test "x$test_cygdrive_prefix" = x; then
20467    # As a simple fix, exclude /usr/bin since it's not a real path.
20468    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20470      # a path prefixed by /cygdrive for fixpath to work.
20471      new_path="$CYGWIN_ROOT_PATH$input_path"
20472    fi
20473  fi
20474
20475  # remove trailing .exe if any
20476  new_path="${new_path/%.exe/}"
20477
20478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20479
20480  # First separate the path from the arguments. This will split at the first
20481  # space.
20482  complete="$FOUND_MAKE"
20483  path="${complete%% *}"
20484  tmp="$complete EOL"
20485  arguments="${tmp#* }"
20486
20487  # Input might be given as Windows format, start by converting to
20488  # unix format.
20489  new_path="$path"
20490
20491  windows_path="$new_path"
20492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20493    unix_path=`$CYGPATH -u "$windows_path"`
20494    new_path="$unix_path"
20495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20497    new_path="$unix_path"
20498  fi
20499
20500
20501  # Now try to locate executable using which
20502  new_path=`$WHICH "$new_path" 2> /dev/null`
20503
20504  if test "x$new_path" = x; then
20505    # Oops. Which didn't find the executable.
20506    # The splitting of arguments from the executable at a space might have been incorrect,
20507    # since paths with space are more likely in Windows. Give it another try with the whole
20508    # argument.
20509    path="$complete"
20510    arguments="EOL"
20511    new_path="$path"
20512
20513  windows_path="$new_path"
20514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20515    unix_path=`$CYGPATH -u "$windows_path"`
20516    new_path="$unix_path"
20517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20519    new_path="$unix_path"
20520  fi
20521
20522
20523    new_path=`$WHICH "$new_path" 2> /dev/null`
20524    # bat and cmd files are not always considered executable in MSYS causing which
20525    # to not find them
20526    if test "x$new_path" = x \
20527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20529      new_path="$path"
20530
20531  windows_path="$new_path"
20532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20533    unix_path=`$CYGPATH -u "$windows_path"`
20534    new_path="$unix_path"
20535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20537    new_path="$unix_path"
20538  fi
20539
20540    fi
20541
20542    if test "x$new_path" = x; then
20543      # It's still not found. Now this is an unrecoverable error.
20544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20545$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20546      has_space=`$ECHO "$complete" | $GREP " "`
20547      if test "x$has_space" != x; then
20548        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20549$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20550      fi
20551      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20552    fi
20553  fi
20554
20555  # Now new_path has a complete unix path to the binary
20556  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20557    # Keep paths in /bin as-is, but remove trailing .exe if any
20558    new_path="${new_path/%.exe/}"
20559    # Do not save /bin paths to all_fixpath_prefixes!
20560  else
20561    # Not in mixed or Windows style, start by that.
20562    new_path=`cmd //c echo $new_path`
20563
20564  input_path="$new_path"
20565  # Check if we need to convert this using DOS-style short mode. If the path
20566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20567  # take no chances and rewrite it.
20568  # Note: m4 eats our [], so we need to use [ and ] instead.
20569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20570  if test "x$has_forbidden_chars" != x; then
20571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20573  fi
20574
20575    # Output is in $new_path
20576
20577  windows_path="$new_path"
20578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20579    unix_path=`$CYGPATH -u "$windows_path"`
20580    new_path="$unix_path"
20581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20583    new_path="$unix_path"
20584  fi
20585
20586    # remove trailing .exe if any
20587    new_path="${new_path/%.exe/}"
20588
20589    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20590    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20591  fi
20592
20593    else
20594      # We're on a unix platform. Hooray! :)
20595      # First separate the path from the arguments. This will split at the first
20596      # space.
20597      complete="$FOUND_MAKE"
20598      path="${complete%% *}"
20599      tmp="$complete EOL"
20600      arguments="${tmp#* }"
20601
20602      # Cannot rely on the command "which" here since it doesn't always work.
20603      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20604      if test -z "$is_absolute_path"; then
20605        # Path to executable is not absolute. Find it.
20606        IFS_save="$IFS"
20607        IFS=:
20608        for p in $PATH; do
20609          if test -f "$p/$path" && test -x "$p/$path"; then
20610            new_path="$p/$path"
20611            break
20612          fi
20613        done
20614        IFS="$IFS_save"
20615      else
20616        # This is an absolute path, we can use it without further modifications.
20617        new_path="$path"
20618      fi
20619
20620      if test "x$new_path" = x; then
20621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20622$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20623        has_space=`$ECHO "$complete" | $GREP " "`
20624        if test "x$has_space" != x; then
20625          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20626$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20627        fi
20628        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20629      fi
20630    fi
20631
20632    # Now join together the path and the arguments once again
20633    if test "x$arguments" != xEOL; then
20634      new_complete="$new_path ${arguments% *}"
20635    else
20636      new_complete="$new_path"
20637    fi
20638
20639    if test "x$complete" != "x$new_complete"; then
20640      FOUND_MAKE="$new_complete"
20641      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20642$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20643    fi
20644  fi
20645
20646        fi
20647      fi
20648    fi
20649  fi
20650
20651        fi
20652        PATH=$OLD_PATH
20653      fi
20654    fi
20655
20656    if test "x$FOUND_MAKE" = x; then
20657      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
20658    fi
20659
20660    else
20661      # If it succeeded, then it was overridden by the user. We will use it
20662      # for the tool.
20663
20664      # First remove it from the list of overridden variables, so we can test
20665      # for unknown variables in the end.
20666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20667
20668      # Check if we try to supply an empty value
20669      if test "x$MAKE" = x; then
20670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20671$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20673$as_echo_n "checking for MAKE... " >&6; }
20674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20675$as_echo "disabled" >&6; }
20676      else
20677        # Check if the provided tool contains a complete path.
20678        tool_specified="$MAKE"
20679        tool_basename="${tool_specified##*/}"
20680        if test "x$tool_basename" = "x$tool_specified"; then
20681          # A command without a complete path is provided, search $PATH.
20682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20683$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20684          # Extract the first word of "$tool_basename", so it can be a program name with args.
20685set dummy $tool_basename; ac_word=$2
20686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20687$as_echo_n "checking for $ac_word... " >&6; }
20688if ${ac_cv_path_MAKE+:} false; then :
20689  $as_echo_n "(cached) " >&6
20690else
20691  case $MAKE in
20692  [\\/]* | ?:[\\/]*)
20693  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20694  ;;
20695  *)
20696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20697for as_dir in $PATH
20698do
20699  IFS=$as_save_IFS
20700  test -z "$as_dir" && as_dir=.
20701    for ac_exec_ext in '' $ac_executable_extensions; do
20702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20703    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20705    break 2
20706  fi
20707done
20708  done
20709IFS=$as_save_IFS
20710
20711  ;;
20712esac
20713fi
20714MAKE=$ac_cv_path_MAKE
20715if test -n "$MAKE"; then
20716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20717$as_echo "$MAKE" >&6; }
20718else
20719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20720$as_echo "no" >&6; }
20721fi
20722
20723
20724          if test "x$MAKE" = x; then
20725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20726          fi
20727        else
20728          # Otherwise we believe it is a complete path. Use it as it is.
20729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20730$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20732$as_echo_n "checking for MAKE... " >&6; }
20733          if test ! -x "$tool_specified"; then
20734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20735$as_echo "not found" >&6; }
20736            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20737          fi
20738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20739$as_echo "$tool_specified" >&6; }
20740        fi
20741      fi
20742    fi
20743
20744    # If MAKE was set by user, verify the version
20745
20746  MAKE_CANDIDATE=""$MAKE""
20747  DESCRIPTION="user supplied MAKE=$MAKE"
20748
20749  # On Cygwin, we require a newer version of make than on other platforms
20750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20751    MAKE_VERSION_EXPR="-e 4\."
20752    MAKE_REQUIRED_VERSION="4.0"
20753   else
20754    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20755    MAKE_REQUIRED_VERSION="3.81"
20756  fi
20757
20758  if test "x$MAKE_CANDIDATE" != x; then
20759    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20760$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20761    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20762    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20763    if test "x$IS_GNU_MAKE" = x; then
20764      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20765$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20766    else
20767      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20768      if test "x$IS_MODERN_MAKE" = x; then
20769        { $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
20770$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;}
20771      else
20772        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20773          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774            MAKE_EXPECTED_ENV='cygwin'
20775          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20776            MAKE_EXPECTED_ENV='msys'
20777          else
20778            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20779          fi
20780          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20781          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20782        else
20783          # Not relevant for non-Windows
20784          IS_MAKE_CORRECT_ENV=true
20785        fi
20786        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20787          { $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
20788$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;}
20789        else
20790          FOUND_MAKE=$MAKE_CANDIDATE
20791
20792  # Only process if variable expands to non-empty
20793
20794  if test "x$FOUND_MAKE" != x; then
20795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20796
20797  # First separate the path from the arguments. This will split at the first
20798  # space.
20799  complete="$FOUND_MAKE"
20800  path="${complete%% *}"
20801  tmp="$complete EOL"
20802  arguments="${tmp#* }"
20803
20804  # Input might be given as Windows format, start by converting to
20805  # unix format.
20806  new_path=`$CYGPATH -u "$path"`
20807
20808  # Now try to locate executable using which
20809  new_path=`$WHICH "$new_path" 2> /dev/null`
20810  # bat and cmd files are not always considered executable in cygwin causing which
20811  # to not find them
20812  if test "x$new_path" = x \
20813      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20814      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20815    new_path=`$CYGPATH -u "$path"`
20816  fi
20817  if test "x$new_path" = x; then
20818    # Oops. Which didn't find the executable.
20819    # The splitting of arguments from the executable at a space might have been incorrect,
20820    # since paths with space are more likely in Windows. Give it another try with the whole
20821    # argument.
20822    path="$complete"
20823    arguments="EOL"
20824    new_path=`$CYGPATH -u "$path"`
20825    new_path=`$WHICH "$new_path" 2> /dev/null`
20826    # bat and cmd files are not always considered executable in cygwin causing which
20827    # to not find them
20828    if test "x$new_path" = x \
20829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20831      new_path=`$CYGPATH -u "$path"`
20832    fi
20833    if test "x$new_path" = x; then
20834      # It's still not found. Now this is an unrecoverable error.
20835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20836$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20837      has_space=`$ECHO "$complete" | $GREP " "`
20838      if test "x$has_space" != x; then
20839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20841      fi
20842      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20843    fi
20844  fi
20845
20846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20849  # "foo.exe" is OK but "foo" is an error.
20850  #
20851  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20852  # It is also a way to make sure we got the proper file name for the real test later on.
20853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20854  if test "x$test_shortpath" = x; then
20855    # Short path failed, file does not exist as specified.
20856    # Try adding .exe or .cmd
20857    if test -f "${new_path}.exe"; then
20858      input_to_shortpath="${new_path}.exe"
20859    elif test -f "${new_path}.cmd"; then
20860      input_to_shortpath="${new_path}.cmd"
20861    else
20862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20863$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20864      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20865$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20867    fi
20868  else
20869    input_to_shortpath="$new_path"
20870  fi
20871
20872  # Call helper function which possibly converts this using DOS-style short mode.
20873  # If so, the updated path is stored in $new_path.
20874  new_path="$input_to_shortpath"
20875
20876  input_path="$input_to_shortpath"
20877  # Check if we need to convert this using DOS-style short mode. If the path
20878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20879  # take no chances and rewrite it.
20880  # Note: m4 eats our [], so we need to use [ and ] instead.
20881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20882  if test "x$has_forbidden_chars" != x; then
20883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20887      # Going to short mode and back again did indeed matter. Since short mode is
20888      # case insensitive, let's make it lowercase to improve readability.
20889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20890      # Now convert it back to Unix-style (cygpath)
20891      input_path=`$CYGPATH -u "$shortmode_path"`
20892      new_path="$input_path"
20893    fi
20894  fi
20895
20896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20897  if test "x$test_cygdrive_prefix" = x; then
20898    # As a simple fix, exclude /usr/bin since it's not a real path.
20899    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20901      # a path prefixed by /cygdrive for fixpath to work.
20902      new_path="$CYGWIN_ROOT_PATH$input_path"
20903    fi
20904  fi
20905
20906  # remove trailing .exe if any
20907  new_path="${new_path/%.exe/}"
20908
20909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20910
20911  # First separate the path from the arguments. This will split at the first
20912  # space.
20913  complete="$FOUND_MAKE"
20914  path="${complete%% *}"
20915  tmp="$complete EOL"
20916  arguments="${tmp#* }"
20917
20918  # Input might be given as Windows format, start by converting to
20919  # unix format.
20920  new_path="$path"
20921
20922  windows_path="$new_path"
20923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20924    unix_path=`$CYGPATH -u "$windows_path"`
20925    new_path="$unix_path"
20926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20928    new_path="$unix_path"
20929  fi
20930
20931
20932  # Now try to locate executable using which
20933  new_path=`$WHICH "$new_path" 2> /dev/null`
20934
20935  if test "x$new_path" = x; then
20936    # Oops. Which didn't find the executable.
20937    # The splitting of arguments from the executable at a space might have been incorrect,
20938    # since paths with space are more likely in Windows. Give it another try with the whole
20939    # argument.
20940    path="$complete"
20941    arguments="EOL"
20942    new_path="$path"
20943
20944  windows_path="$new_path"
20945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20946    unix_path=`$CYGPATH -u "$windows_path"`
20947    new_path="$unix_path"
20948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20950    new_path="$unix_path"
20951  fi
20952
20953
20954    new_path=`$WHICH "$new_path" 2> /dev/null`
20955    # bat and cmd files are not always considered executable in MSYS causing which
20956    # to not find them
20957    if test "x$new_path" = x \
20958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20960      new_path="$path"
20961
20962  windows_path="$new_path"
20963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20964    unix_path=`$CYGPATH -u "$windows_path"`
20965    new_path="$unix_path"
20966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20968    new_path="$unix_path"
20969  fi
20970
20971    fi
20972
20973    if test "x$new_path" = x; then
20974      # It's still not found. Now this is an unrecoverable error.
20975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20977      has_space=`$ECHO "$complete" | $GREP " "`
20978      if test "x$has_space" != x; then
20979        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20981      fi
20982      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20983    fi
20984  fi
20985
20986  # Now new_path has a complete unix path to the binary
20987  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20988    # Keep paths in /bin as-is, but remove trailing .exe if any
20989    new_path="${new_path/%.exe/}"
20990    # Do not save /bin paths to all_fixpath_prefixes!
20991  else
20992    # Not in mixed or Windows style, start by that.
20993    new_path=`cmd //c echo $new_path`
20994
20995  input_path="$new_path"
20996  # Check if we need to convert this using DOS-style short mode. If the path
20997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20998  # take no chances and rewrite it.
20999  # Note: m4 eats our [], so we need to use [ and ] instead.
21000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21001  if test "x$has_forbidden_chars" != x; then
21002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21004  fi
21005
21006    # Output is in $new_path
21007
21008  windows_path="$new_path"
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010    unix_path=`$CYGPATH -u "$windows_path"`
21011    new_path="$unix_path"
21012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21014    new_path="$unix_path"
21015  fi
21016
21017    # remove trailing .exe if any
21018    new_path="${new_path/%.exe/}"
21019
21020    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21021    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21022  fi
21023
21024    else
21025      # We're on a unix platform. Hooray! :)
21026      # First separate the path from the arguments. This will split at the first
21027      # space.
21028      complete="$FOUND_MAKE"
21029      path="${complete%% *}"
21030      tmp="$complete EOL"
21031      arguments="${tmp#* }"
21032
21033      # Cannot rely on the command "which" here since it doesn't always work.
21034      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21035      if test -z "$is_absolute_path"; then
21036        # Path to executable is not absolute. Find it.
21037        IFS_save="$IFS"
21038        IFS=:
21039        for p in $PATH; do
21040          if test -f "$p/$path" && test -x "$p/$path"; then
21041            new_path="$p/$path"
21042            break
21043          fi
21044        done
21045        IFS="$IFS_save"
21046      else
21047        # This is an absolute path, we can use it without further modifications.
21048        new_path="$path"
21049      fi
21050
21051      if test "x$new_path" = x; then
21052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21054        has_space=`$ECHO "$complete" | $GREP " "`
21055        if test "x$has_space" != x; then
21056          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21058        fi
21059        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21060      fi
21061    fi
21062
21063    # Now join together the path and the arguments once again
21064    if test "x$arguments" != xEOL; then
21065      new_complete="$new_path ${arguments% *}"
21066    else
21067      new_complete="$new_path"
21068    fi
21069
21070    if test "x$complete" != "x$new_complete"; then
21071      FOUND_MAKE="$new_complete"
21072      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21073$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21074    fi
21075  fi
21076
21077        fi
21078      fi
21079    fi
21080  fi
21081
21082    if test "x$FOUND_MAKE" = x; then
21083      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21084    fi
21085
21086  fi
21087
21088
21089  MAKE=$FOUND_MAKE
21090
21091  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21092$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21093
21094
21095  # Check if make supports the output sync option and if so, setup using it.
21096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21097$as_echo_n "checking if make --output-sync is supported... " >&6; }
21098  if $MAKE --version -O > /dev/null 2>&1; then
21099    OUTPUT_SYNC_SUPPORTED=true
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21101$as_echo "yes" >&6; }
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21103$as_echo_n "checking for output-sync value... " >&6; }
21104
21105# Check whether --with-output-sync was given.
21106if test "${with_output_sync+set}" = set; then :
21107  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21108fi
21109
21110    if test "x$OUTPUT_SYNC" = "x"; then
21111      OUTPUT_SYNC=none
21112    fi
21113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21114$as_echo "$OUTPUT_SYNC" >&6; }
21115    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21116      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21117    fi
21118  else
21119    OUTPUT_SYNC_SUPPORTED=false
21120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21121$as_echo "no" >&6; }
21122  fi
21123
21124
21125
21126
21127
21128
21129  # Test if find supports -delete
21130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21131$as_echo_n "checking if find supports -delete... " >&6; }
21132  FIND_DELETE="-delete"
21133
21134  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21135
21136  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21137
21138  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21139  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21140    # No, it does not.
21141    $RM $DELETEDIR/TestIfFindSupportsDelete
21142    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21143      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21144      FIND_DELETE="-print | $XARGS $RM"
21145    else
21146      FIND_DELETE="-exec $RM \{\} \+"
21147    fi
21148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21149$as_echo "no" >&6; }
21150  else
21151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21152$as_echo "yes" >&6; }
21153  fi
21154  $RMDIR $DELETEDIR
21155
21156
21157
21158  # Test which kind of tar was found
21159  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21160    TAR_TYPE="gnu"
21161  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21162    TAR_TYPE="bsd"
21163  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21164    TAR_TYPE="bsd"
21165  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21166    TAR_TYPE="solaris"
21167  fi
21168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21169$as_echo_n "checking what type of tar was found... " >&6; }
21170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21171$as_echo "$TAR_TYPE" >&6; }
21172
21173  TAR_CREATE_FILE_PARAM=""
21174
21175  if test "x$TAR_TYPE" = "xgnu"; then
21176    TAR_INCLUDE_PARAM="T"
21177    TAR_SUPPORTS_TRANSFORM="true"
21178    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21179      # When using gnu tar for Solaris targets, need to use compatibility mode
21180      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21181    fi
21182  else
21183    TAR_INCLUDE_PARAM="I"
21184    TAR_SUPPORTS_TRANSFORM="false"
21185  fi
21186
21187
21188
21189
21190
21191
21192  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21193  # This is a problem for the grep resident on AIX.
21194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21195$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21196  # Multiple subsequent spaces..
21197  STACK_SPACES='aaa   bbb   ccc'
21198  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21199  # patterns in it.
21200  STACK_LIST=${STACK_SPACES// /$'\n'}
21201  NEEDLE_SPACES='ccc bbb aaa'
21202  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21203  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21204  if test "x$RESULT" == "x"; then
21205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21206$as_echo "yes" >&6; }
21207  else
21208    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21209      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21210    fi
21211    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21212  fi
21213
21214
21215  # These tools might not be installed by default,
21216  # need hint on how to install them.
21217
21218
21219
21220  # Publish this variable in the help.
21221
21222
21223  if [ -z "${UNZIP+x}" ]; then
21224    # The variable is not set by user, try to locate tool using the code snippet
21225    for ac_prog in unzip
21226do
21227  # Extract the first word of "$ac_prog", so it can be a program name with args.
21228set dummy $ac_prog; ac_word=$2
21229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21230$as_echo_n "checking for $ac_word... " >&6; }
21231if ${ac_cv_path_UNZIP+:} false; then :
21232  $as_echo_n "(cached) " >&6
21233else
21234  case $UNZIP in
21235  [\\/]* | ?:[\\/]*)
21236  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21237  ;;
21238  *)
21239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21240for as_dir in $PATH
21241do
21242  IFS=$as_save_IFS
21243  test -z "$as_dir" && as_dir=.
21244    for ac_exec_ext in '' $ac_executable_extensions; do
21245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21246    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21248    break 2
21249  fi
21250done
21251  done
21252IFS=$as_save_IFS
21253
21254  ;;
21255esac
21256fi
21257UNZIP=$ac_cv_path_UNZIP
21258if test -n "$UNZIP"; then
21259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21260$as_echo "$UNZIP" >&6; }
21261else
21262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21263$as_echo "no" >&6; }
21264fi
21265
21266
21267  test -n "$UNZIP" && break
21268done
21269
21270  else
21271    # The variable is set, but is it from the command line or the environment?
21272
21273    # Try to remove the string !UNZIP! from our list.
21274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21276      # If it failed, the variable was not from the command line. Ignore it,
21277      # but warn the user (except for BASH, which is always set by the calling BASH).
21278      if test "xUNZIP" != xBASH; then
21279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21280$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21281      fi
21282      # Try to locate tool using the code snippet
21283      for ac_prog in unzip
21284do
21285  # Extract the first word of "$ac_prog", so it can be a program name with args.
21286set dummy $ac_prog; ac_word=$2
21287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21288$as_echo_n "checking for $ac_word... " >&6; }
21289if ${ac_cv_path_UNZIP+:} false; then :
21290  $as_echo_n "(cached) " >&6
21291else
21292  case $UNZIP in
21293  [\\/]* | ?:[\\/]*)
21294  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21295  ;;
21296  *)
21297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21298for as_dir in $PATH
21299do
21300  IFS=$as_save_IFS
21301  test -z "$as_dir" && as_dir=.
21302    for ac_exec_ext in '' $ac_executable_extensions; do
21303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21304    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21306    break 2
21307  fi
21308done
21309  done
21310IFS=$as_save_IFS
21311
21312  ;;
21313esac
21314fi
21315UNZIP=$ac_cv_path_UNZIP
21316if test -n "$UNZIP"; then
21317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21318$as_echo "$UNZIP" >&6; }
21319else
21320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21321$as_echo "no" >&6; }
21322fi
21323
21324
21325  test -n "$UNZIP" && break
21326done
21327
21328    else
21329      # If it succeeded, then it was overridden by the user. We will use it
21330      # for the tool.
21331
21332      # First remove it from the list of overridden variables, so we can test
21333      # for unknown variables in the end.
21334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21335
21336      # Check if we try to supply an empty value
21337      if test "x$UNZIP" = x; then
21338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21339$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21341$as_echo_n "checking for UNZIP... " >&6; }
21342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21343$as_echo "disabled" >&6; }
21344      else
21345        # Check if the provided tool contains a complete path.
21346        tool_specified="$UNZIP"
21347        tool_basename="${tool_specified##*/}"
21348        if test "x$tool_basename" = "x$tool_specified"; then
21349          # A command without a complete path is provided, search $PATH.
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21351$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21352          # Extract the first word of "$tool_basename", so it can be a program name with args.
21353set dummy $tool_basename; ac_word=$2
21354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21355$as_echo_n "checking for $ac_word... " >&6; }
21356if ${ac_cv_path_UNZIP+:} false; then :
21357  $as_echo_n "(cached) " >&6
21358else
21359  case $UNZIP in
21360  [\\/]* | ?:[\\/]*)
21361  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21362  ;;
21363  *)
21364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21365for as_dir in $PATH
21366do
21367  IFS=$as_save_IFS
21368  test -z "$as_dir" && as_dir=.
21369    for ac_exec_ext in '' $ac_executable_extensions; do
21370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21371    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21373    break 2
21374  fi
21375done
21376  done
21377IFS=$as_save_IFS
21378
21379  ;;
21380esac
21381fi
21382UNZIP=$ac_cv_path_UNZIP
21383if test -n "$UNZIP"; then
21384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21385$as_echo "$UNZIP" >&6; }
21386else
21387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21388$as_echo "no" >&6; }
21389fi
21390
21391
21392          if test "x$UNZIP" = x; then
21393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21394          fi
21395        else
21396          # Otherwise we believe it is a complete path. Use it as it is.
21397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21398$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21400$as_echo_n "checking for UNZIP... " >&6; }
21401          if test ! -x "$tool_specified"; then
21402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21403$as_echo "not found" >&6; }
21404            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21405          fi
21406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21407$as_echo "$tool_specified" >&6; }
21408        fi
21409      fi
21410    fi
21411
21412  fi
21413
21414
21415
21416  if test "x$UNZIP" = x; then
21417    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21418  fi
21419
21420
21421  # Since zip uses "ZIP" as a environment variable for passing options, we need
21422  # to name our variable differently, hence ZIPEXE.
21423
21424
21425
21426  # Publish this variable in the help.
21427
21428
21429  if [ -z "${ZIPEXE+x}" ]; then
21430    # The variable is not set by user, try to locate tool using the code snippet
21431    for ac_prog in zip
21432do
21433  # Extract the first word of "$ac_prog", so it can be a program name with args.
21434set dummy $ac_prog; ac_word=$2
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21436$as_echo_n "checking for $ac_word... " >&6; }
21437if ${ac_cv_path_ZIPEXE+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440  case $ZIPEXE in
21441  [\\/]* | ?:[\\/]*)
21442  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21443  ;;
21444  *)
21445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21446for as_dir in $PATH
21447do
21448  IFS=$as_save_IFS
21449  test -z "$as_dir" && as_dir=.
21450    for ac_exec_ext in '' $ac_executable_extensions; do
21451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21452    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21454    break 2
21455  fi
21456done
21457  done
21458IFS=$as_save_IFS
21459
21460  ;;
21461esac
21462fi
21463ZIPEXE=$ac_cv_path_ZIPEXE
21464if test -n "$ZIPEXE"; then
21465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21466$as_echo "$ZIPEXE" >&6; }
21467else
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21469$as_echo "no" >&6; }
21470fi
21471
21472
21473  test -n "$ZIPEXE" && break
21474done
21475
21476  else
21477    # The variable is set, but is it from the command line or the environment?
21478
21479    # Try to remove the string !ZIPEXE! from our list.
21480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21482      # If it failed, the variable was not from the command line. Ignore it,
21483      # but warn the user (except for BASH, which is always set by the calling BASH).
21484      if test "xZIPEXE" != xBASH; then
21485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21486$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21487      fi
21488      # Try to locate tool using the code snippet
21489      for ac_prog in zip
21490do
21491  # Extract the first word of "$ac_prog", so it can be a program name with args.
21492set dummy $ac_prog; ac_word=$2
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21494$as_echo_n "checking for $ac_word... " >&6; }
21495if ${ac_cv_path_ZIPEXE+:} false; then :
21496  $as_echo_n "(cached) " >&6
21497else
21498  case $ZIPEXE in
21499  [\\/]* | ?:[\\/]*)
21500  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21501  ;;
21502  *)
21503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21504for as_dir in $PATH
21505do
21506  IFS=$as_save_IFS
21507  test -z "$as_dir" && as_dir=.
21508    for ac_exec_ext in '' $ac_executable_extensions; do
21509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21510    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21512    break 2
21513  fi
21514done
21515  done
21516IFS=$as_save_IFS
21517
21518  ;;
21519esac
21520fi
21521ZIPEXE=$ac_cv_path_ZIPEXE
21522if test -n "$ZIPEXE"; then
21523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21524$as_echo "$ZIPEXE" >&6; }
21525else
21526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21527$as_echo "no" >&6; }
21528fi
21529
21530
21531  test -n "$ZIPEXE" && break
21532done
21533
21534    else
21535      # If it succeeded, then it was overridden by the user. We will use it
21536      # for the tool.
21537
21538      # First remove it from the list of overridden variables, so we can test
21539      # for unknown variables in the end.
21540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21541
21542      # Check if we try to supply an empty value
21543      if test "x$ZIPEXE" = x; then
21544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21545$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21547$as_echo_n "checking for ZIPEXE... " >&6; }
21548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21549$as_echo "disabled" >&6; }
21550      else
21551        # Check if the provided tool contains a complete path.
21552        tool_specified="$ZIPEXE"
21553        tool_basename="${tool_specified##*/}"
21554        if test "x$tool_basename" = "x$tool_specified"; then
21555          # A command without a complete path is provided, search $PATH.
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21557$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21558          # Extract the first word of "$tool_basename", so it can be a program name with args.
21559set dummy $tool_basename; ac_word=$2
21560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21561$as_echo_n "checking for $ac_word... " >&6; }
21562if ${ac_cv_path_ZIPEXE+:} false; then :
21563  $as_echo_n "(cached) " >&6
21564else
21565  case $ZIPEXE in
21566  [\\/]* | ?:[\\/]*)
21567  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21568  ;;
21569  *)
21570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21571for as_dir in $PATH
21572do
21573  IFS=$as_save_IFS
21574  test -z "$as_dir" && as_dir=.
21575    for ac_exec_ext in '' $ac_executable_extensions; do
21576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21577    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21579    break 2
21580  fi
21581done
21582  done
21583IFS=$as_save_IFS
21584
21585  ;;
21586esac
21587fi
21588ZIPEXE=$ac_cv_path_ZIPEXE
21589if test -n "$ZIPEXE"; then
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21591$as_echo "$ZIPEXE" >&6; }
21592else
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21594$as_echo "no" >&6; }
21595fi
21596
21597
21598          if test "x$ZIPEXE" = x; then
21599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21600          fi
21601        else
21602          # Otherwise we believe it is a complete path. Use it as it is.
21603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21604$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21606$as_echo_n "checking for ZIPEXE... " >&6; }
21607          if test ! -x "$tool_specified"; then
21608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21609$as_echo "not found" >&6; }
21610            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21611          fi
21612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21613$as_echo "$tool_specified" >&6; }
21614        fi
21615      fi
21616    fi
21617
21618  fi
21619
21620
21621
21622  if test "x$ZIPEXE" = x; then
21623    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21624  fi
21625
21626
21627
21628  # Non-required basic tools
21629
21630
21631
21632  # Publish this variable in the help.
21633
21634
21635  if [ -z "${LDD+x}" ]; then
21636    # The variable is not set by user, try to locate tool using the code snippet
21637    for ac_prog in ldd
21638do
21639  # Extract the first word of "$ac_prog", so it can be a program name with args.
21640set dummy $ac_prog; ac_word=$2
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21642$as_echo_n "checking for $ac_word... " >&6; }
21643if ${ac_cv_path_LDD+:} false; then :
21644  $as_echo_n "(cached) " >&6
21645else
21646  case $LDD in
21647  [\\/]* | ?:[\\/]*)
21648  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21649  ;;
21650  *)
21651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21652for as_dir in $PATH
21653do
21654  IFS=$as_save_IFS
21655  test -z "$as_dir" && as_dir=.
21656    for ac_exec_ext in '' $ac_executable_extensions; do
21657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21658    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21660    break 2
21661  fi
21662done
21663  done
21664IFS=$as_save_IFS
21665
21666  ;;
21667esac
21668fi
21669LDD=$ac_cv_path_LDD
21670if test -n "$LDD"; then
21671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21672$as_echo "$LDD" >&6; }
21673else
21674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21675$as_echo "no" >&6; }
21676fi
21677
21678
21679  test -n "$LDD" && break
21680done
21681
21682  else
21683    # The variable is set, but is it from the command line or the environment?
21684
21685    # Try to remove the string !LDD! from our list.
21686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21688      # If it failed, the variable was not from the command line. Ignore it,
21689      # but warn the user (except for BASH, which is always set by the calling BASH).
21690      if test "xLDD" != xBASH; then
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21692$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21693      fi
21694      # Try to locate tool using the code snippet
21695      for ac_prog in ldd
21696do
21697  # Extract the first word of "$ac_prog", so it can be a program name with args.
21698set dummy $ac_prog; ac_word=$2
21699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21700$as_echo_n "checking for $ac_word... " >&6; }
21701if ${ac_cv_path_LDD+:} false; then :
21702  $as_echo_n "(cached) " >&6
21703else
21704  case $LDD in
21705  [\\/]* | ?:[\\/]*)
21706  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21707  ;;
21708  *)
21709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21710for as_dir in $PATH
21711do
21712  IFS=$as_save_IFS
21713  test -z "$as_dir" && as_dir=.
21714    for ac_exec_ext in '' $ac_executable_extensions; do
21715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21716    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21718    break 2
21719  fi
21720done
21721  done
21722IFS=$as_save_IFS
21723
21724  ;;
21725esac
21726fi
21727LDD=$ac_cv_path_LDD
21728if test -n "$LDD"; then
21729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21730$as_echo "$LDD" >&6; }
21731else
21732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21733$as_echo "no" >&6; }
21734fi
21735
21736
21737  test -n "$LDD" && break
21738done
21739
21740    else
21741      # If it succeeded, then it was overridden by the user. We will use it
21742      # for the tool.
21743
21744      # First remove it from the list of overridden variables, so we can test
21745      # for unknown variables in the end.
21746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21747
21748      # Check if we try to supply an empty value
21749      if test "x$LDD" = x; then
21750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21751$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21753$as_echo_n "checking for LDD... " >&6; }
21754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21755$as_echo "disabled" >&6; }
21756      else
21757        # Check if the provided tool contains a complete path.
21758        tool_specified="$LDD"
21759        tool_basename="${tool_specified##*/}"
21760        if test "x$tool_basename" = "x$tool_specified"; then
21761          # A command without a complete path is provided, search $PATH.
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21763$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21764          # Extract the first word of "$tool_basename", so it can be a program name with args.
21765set dummy $tool_basename; ac_word=$2
21766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21767$as_echo_n "checking for $ac_word... " >&6; }
21768if ${ac_cv_path_LDD+:} false; then :
21769  $as_echo_n "(cached) " >&6
21770else
21771  case $LDD in
21772  [\\/]* | ?:[\\/]*)
21773  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21774  ;;
21775  *)
21776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21777for as_dir in $PATH
21778do
21779  IFS=$as_save_IFS
21780  test -z "$as_dir" && as_dir=.
21781    for ac_exec_ext in '' $ac_executable_extensions; do
21782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21783    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21785    break 2
21786  fi
21787done
21788  done
21789IFS=$as_save_IFS
21790
21791  ;;
21792esac
21793fi
21794LDD=$ac_cv_path_LDD
21795if test -n "$LDD"; then
21796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21797$as_echo "$LDD" >&6; }
21798else
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21800$as_echo "no" >&6; }
21801fi
21802
21803
21804          if test "x$LDD" = x; then
21805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21806          fi
21807        else
21808          # Otherwise we believe it is a complete path. Use it as it is.
21809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21810$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21812$as_echo_n "checking for LDD... " >&6; }
21813          if test ! -x "$tool_specified"; then
21814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21815$as_echo "not found" >&6; }
21816            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21817          fi
21818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21819$as_echo "$tool_specified" >&6; }
21820        fi
21821      fi
21822    fi
21823
21824  fi
21825
21826
21827  if test "x$LDD" = "x"; then
21828    # List shared lib dependencies is used for
21829    # debug output and checking for forbidden dependencies.
21830    # We can build without it.
21831    LDD="true"
21832  fi
21833
21834
21835  # Publish this variable in the help.
21836
21837
21838  if [ -z "${OTOOL+x}" ]; then
21839    # The variable is not set by user, try to locate tool using the code snippet
21840    for ac_prog in otool
21841do
21842  # Extract the first word of "$ac_prog", so it can be a program name with args.
21843set dummy $ac_prog; ac_word=$2
21844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21845$as_echo_n "checking for $ac_word... " >&6; }
21846if ${ac_cv_path_OTOOL+:} false; then :
21847  $as_echo_n "(cached) " >&6
21848else
21849  case $OTOOL in
21850  [\\/]* | ?:[\\/]*)
21851  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21852  ;;
21853  *)
21854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21855for as_dir in $PATH
21856do
21857  IFS=$as_save_IFS
21858  test -z "$as_dir" && as_dir=.
21859    for ac_exec_ext in '' $ac_executable_extensions; do
21860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21861    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21863    break 2
21864  fi
21865done
21866  done
21867IFS=$as_save_IFS
21868
21869  ;;
21870esac
21871fi
21872OTOOL=$ac_cv_path_OTOOL
21873if test -n "$OTOOL"; then
21874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21875$as_echo "$OTOOL" >&6; }
21876else
21877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21878$as_echo "no" >&6; }
21879fi
21880
21881
21882  test -n "$OTOOL" && break
21883done
21884
21885  else
21886    # The variable is set, but is it from the command line or the environment?
21887
21888    # Try to remove the string !OTOOL! from our list.
21889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21891      # If it failed, the variable was not from the command line. Ignore it,
21892      # but warn the user (except for BASH, which is always set by the calling BASH).
21893      if test "xOTOOL" != xBASH; then
21894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21895$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21896      fi
21897      # Try to locate tool using the code snippet
21898      for ac_prog in otool
21899do
21900  # Extract the first word of "$ac_prog", so it can be a program name with args.
21901set dummy $ac_prog; ac_word=$2
21902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21903$as_echo_n "checking for $ac_word... " >&6; }
21904if ${ac_cv_path_OTOOL+:} false; then :
21905  $as_echo_n "(cached) " >&6
21906else
21907  case $OTOOL in
21908  [\\/]* | ?:[\\/]*)
21909  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21910  ;;
21911  *)
21912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21913for as_dir in $PATH
21914do
21915  IFS=$as_save_IFS
21916  test -z "$as_dir" && as_dir=.
21917    for ac_exec_ext in '' $ac_executable_extensions; do
21918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21919    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21921    break 2
21922  fi
21923done
21924  done
21925IFS=$as_save_IFS
21926
21927  ;;
21928esac
21929fi
21930OTOOL=$ac_cv_path_OTOOL
21931if test -n "$OTOOL"; then
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21933$as_echo "$OTOOL" >&6; }
21934else
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21936$as_echo "no" >&6; }
21937fi
21938
21939
21940  test -n "$OTOOL" && break
21941done
21942
21943    else
21944      # If it succeeded, then it was overridden by the user. We will use it
21945      # for the tool.
21946
21947      # First remove it from the list of overridden variables, so we can test
21948      # for unknown variables in the end.
21949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21950
21951      # Check if we try to supply an empty value
21952      if test "x$OTOOL" = x; then
21953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21954$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21956$as_echo_n "checking for OTOOL... " >&6; }
21957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21958$as_echo "disabled" >&6; }
21959      else
21960        # Check if the provided tool contains a complete path.
21961        tool_specified="$OTOOL"
21962        tool_basename="${tool_specified##*/}"
21963        if test "x$tool_basename" = "x$tool_specified"; then
21964          # A command without a complete path is provided, search $PATH.
21965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21966$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21967          # Extract the first word of "$tool_basename", so it can be a program name with args.
21968set dummy $tool_basename; ac_word=$2
21969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21970$as_echo_n "checking for $ac_word... " >&6; }
21971if ${ac_cv_path_OTOOL+:} false; then :
21972  $as_echo_n "(cached) " >&6
21973else
21974  case $OTOOL in
21975  [\\/]* | ?:[\\/]*)
21976  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21977  ;;
21978  *)
21979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21980for as_dir in $PATH
21981do
21982  IFS=$as_save_IFS
21983  test -z "$as_dir" && as_dir=.
21984    for ac_exec_ext in '' $ac_executable_extensions; do
21985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21986    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21988    break 2
21989  fi
21990done
21991  done
21992IFS=$as_save_IFS
21993
21994  ;;
21995esac
21996fi
21997OTOOL=$ac_cv_path_OTOOL
21998if test -n "$OTOOL"; then
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22000$as_echo "$OTOOL" >&6; }
22001else
22002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22003$as_echo "no" >&6; }
22004fi
22005
22006
22007          if test "x$OTOOL" = x; then
22008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22009          fi
22010        else
22011          # Otherwise we believe it is a complete path. Use it as it is.
22012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22013$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22015$as_echo_n "checking for OTOOL... " >&6; }
22016          if test ! -x "$tool_specified"; then
22017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22018$as_echo "not found" >&6; }
22019            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22020          fi
22021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22022$as_echo "$tool_specified" >&6; }
22023        fi
22024      fi
22025    fi
22026
22027  fi
22028
22029
22030  if test "x$OTOOL" = "x"; then
22031    OTOOL="true"
22032  fi
22033
22034
22035  # Publish this variable in the help.
22036
22037
22038  if [ -z "${READELF+x}" ]; then
22039    # The variable is not set by user, try to locate tool using the code snippet
22040    for ac_prog in greadelf readelf
22041do
22042  # Extract the first word of "$ac_prog", so it can be a program name with args.
22043set dummy $ac_prog; ac_word=$2
22044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22045$as_echo_n "checking for $ac_word... " >&6; }
22046if ${ac_cv_path_READELF+:} false; then :
22047  $as_echo_n "(cached) " >&6
22048else
22049  case $READELF in
22050  [\\/]* | ?:[\\/]*)
22051  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22052  ;;
22053  *)
22054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22055for as_dir in $PATH
22056do
22057  IFS=$as_save_IFS
22058  test -z "$as_dir" && as_dir=.
22059    for ac_exec_ext in '' $ac_executable_extensions; do
22060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22061    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22063    break 2
22064  fi
22065done
22066  done
22067IFS=$as_save_IFS
22068
22069  ;;
22070esac
22071fi
22072READELF=$ac_cv_path_READELF
22073if test -n "$READELF"; then
22074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22075$as_echo "$READELF" >&6; }
22076else
22077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22078$as_echo "no" >&6; }
22079fi
22080
22081
22082  test -n "$READELF" && break
22083done
22084
22085  else
22086    # The variable is set, but is it from the command line or the environment?
22087
22088    # Try to remove the string !READELF! from our list.
22089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22091      # If it failed, the variable was not from the command line. Ignore it,
22092      # but warn the user (except for BASH, which is always set by the calling BASH).
22093      if test "xREADELF" != xBASH; then
22094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22095$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22096      fi
22097      # Try to locate tool using the code snippet
22098      for ac_prog in greadelf readelf
22099do
22100  # Extract the first word of "$ac_prog", so it can be a program name with args.
22101set dummy $ac_prog; ac_word=$2
22102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22103$as_echo_n "checking for $ac_word... " >&6; }
22104if ${ac_cv_path_READELF+:} false; then :
22105  $as_echo_n "(cached) " >&6
22106else
22107  case $READELF in
22108  [\\/]* | ?:[\\/]*)
22109  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22110  ;;
22111  *)
22112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22113for as_dir in $PATH
22114do
22115  IFS=$as_save_IFS
22116  test -z "$as_dir" && as_dir=.
22117    for ac_exec_ext in '' $ac_executable_extensions; do
22118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22119    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22121    break 2
22122  fi
22123done
22124  done
22125IFS=$as_save_IFS
22126
22127  ;;
22128esac
22129fi
22130READELF=$ac_cv_path_READELF
22131if test -n "$READELF"; then
22132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22133$as_echo "$READELF" >&6; }
22134else
22135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22136$as_echo "no" >&6; }
22137fi
22138
22139
22140  test -n "$READELF" && break
22141done
22142
22143    else
22144      # If it succeeded, then it was overridden by the user. We will use it
22145      # for the tool.
22146
22147      # First remove it from the list of overridden variables, so we can test
22148      # for unknown variables in the end.
22149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22150
22151      # Check if we try to supply an empty value
22152      if test "x$READELF" = x; then
22153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22154$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22156$as_echo_n "checking for READELF... " >&6; }
22157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22158$as_echo "disabled" >&6; }
22159      else
22160        # Check if the provided tool contains a complete path.
22161        tool_specified="$READELF"
22162        tool_basename="${tool_specified##*/}"
22163        if test "x$tool_basename" = "x$tool_specified"; then
22164          # A command without a complete path is provided, search $PATH.
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22166$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22167          # Extract the first word of "$tool_basename", so it can be a program name with args.
22168set dummy $tool_basename; ac_word=$2
22169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22170$as_echo_n "checking for $ac_word... " >&6; }
22171if ${ac_cv_path_READELF+:} false; then :
22172  $as_echo_n "(cached) " >&6
22173else
22174  case $READELF in
22175  [\\/]* | ?:[\\/]*)
22176  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22177  ;;
22178  *)
22179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22180for as_dir in $PATH
22181do
22182  IFS=$as_save_IFS
22183  test -z "$as_dir" && as_dir=.
22184    for ac_exec_ext in '' $ac_executable_extensions; do
22185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22186    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22188    break 2
22189  fi
22190done
22191  done
22192IFS=$as_save_IFS
22193
22194  ;;
22195esac
22196fi
22197READELF=$ac_cv_path_READELF
22198if test -n "$READELF"; then
22199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22200$as_echo "$READELF" >&6; }
22201else
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22203$as_echo "no" >&6; }
22204fi
22205
22206
22207          if test "x$READELF" = x; then
22208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22209          fi
22210        else
22211          # Otherwise we believe it is a complete path. Use it as it is.
22212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22213$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22215$as_echo_n "checking for READELF... " >&6; }
22216          if test ! -x "$tool_specified"; then
22217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22218$as_echo "not found" >&6; }
22219            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22220          fi
22221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22222$as_echo "$tool_specified" >&6; }
22223        fi
22224      fi
22225    fi
22226
22227  fi
22228
22229
22230
22231
22232  # Publish this variable in the help.
22233
22234
22235  if [ -z "${HG+x}" ]; then
22236    # The variable is not set by user, try to locate tool using the code snippet
22237    for ac_prog in hg
22238do
22239  # Extract the first word of "$ac_prog", so it can be a program name with args.
22240set dummy $ac_prog; ac_word=$2
22241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22242$as_echo_n "checking for $ac_word... " >&6; }
22243if ${ac_cv_path_HG+:} false; then :
22244  $as_echo_n "(cached) " >&6
22245else
22246  case $HG in
22247  [\\/]* | ?:[\\/]*)
22248  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22249  ;;
22250  *)
22251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22252for as_dir in $PATH
22253do
22254  IFS=$as_save_IFS
22255  test -z "$as_dir" && as_dir=.
22256    for ac_exec_ext in '' $ac_executable_extensions; do
22257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22258    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22260    break 2
22261  fi
22262done
22263  done
22264IFS=$as_save_IFS
22265
22266  ;;
22267esac
22268fi
22269HG=$ac_cv_path_HG
22270if test -n "$HG"; then
22271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22272$as_echo "$HG" >&6; }
22273else
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22275$as_echo "no" >&6; }
22276fi
22277
22278
22279  test -n "$HG" && break
22280done
22281
22282  else
22283    # The variable is set, but is it from the command line or the environment?
22284
22285    # Try to remove the string !HG! from our list.
22286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22288      # If it failed, the variable was not from the command line. Ignore it,
22289      # but warn the user (except for BASH, which is always set by the calling BASH).
22290      if test "xHG" != xBASH; then
22291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22292$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22293      fi
22294      # Try to locate tool using the code snippet
22295      for ac_prog in hg
22296do
22297  # Extract the first word of "$ac_prog", so it can be a program name with args.
22298set dummy $ac_prog; ac_word=$2
22299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22300$as_echo_n "checking for $ac_word... " >&6; }
22301if ${ac_cv_path_HG+:} false; then :
22302  $as_echo_n "(cached) " >&6
22303else
22304  case $HG in
22305  [\\/]* | ?:[\\/]*)
22306  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22307  ;;
22308  *)
22309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22310for as_dir in $PATH
22311do
22312  IFS=$as_save_IFS
22313  test -z "$as_dir" && as_dir=.
22314    for ac_exec_ext in '' $ac_executable_extensions; do
22315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22316    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22318    break 2
22319  fi
22320done
22321  done
22322IFS=$as_save_IFS
22323
22324  ;;
22325esac
22326fi
22327HG=$ac_cv_path_HG
22328if test -n "$HG"; then
22329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22330$as_echo "$HG" >&6; }
22331else
22332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22333$as_echo "no" >&6; }
22334fi
22335
22336
22337  test -n "$HG" && break
22338done
22339
22340    else
22341      # If it succeeded, then it was overridden by the user. We will use it
22342      # for the tool.
22343
22344      # First remove it from the list of overridden variables, so we can test
22345      # for unknown variables in the end.
22346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22347
22348      # Check if we try to supply an empty value
22349      if test "x$HG" = x; then
22350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22351$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22353$as_echo_n "checking for HG... " >&6; }
22354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22355$as_echo "disabled" >&6; }
22356      else
22357        # Check if the provided tool contains a complete path.
22358        tool_specified="$HG"
22359        tool_basename="${tool_specified##*/}"
22360        if test "x$tool_basename" = "x$tool_specified"; then
22361          # A command without a complete path is provided, search $PATH.
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22363$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22364          # Extract the first word of "$tool_basename", so it can be a program name with args.
22365set dummy $tool_basename; ac_word=$2
22366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22367$as_echo_n "checking for $ac_word... " >&6; }
22368if ${ac_cv_path_HG+:} false; then :
22369  $as_echo_n "(cached) " >&6
22370else
22371  case $HG in
22372  [\\/]* | ?:[\\/]*)
22373  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22374  ;;
22375  *)
22376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22377for as_dir in $PATH
22378do
22379  IFS=$as_save_IFS
22380  test -z "$as_dir" && as_dir=.
22381    for ac_exec_ext in '' $ac_executable_extensions; do
22382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22383    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22385    break 2
22386  fi
22387done
22388  done
22389IFS=$as_save_IFS
22390
22391  ;;
22392esac
22393fi
22394HG=$ac_cv_path_HG
22395if test -n "$HG"; then
22396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22397$as_echo "$HG" >&6; }
22398else
22399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22400$as_echo "no" >&6; }
22401fi
22402
22403
22404          if test "x$HG" = x; then
22405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22406          fi
22407        else
22408          # Otherwise we believe it is a complete path. Use it as it is.
22409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22410$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22412$as_echo_n "checking for HG... " >&6; }
22413          if test ! -x "$tool_specified"; then
22414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22415$as_echo "not found" >&6; }
22416            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22417          fi
22418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22419$as_echo "$tool_specified" >&6; }
22420        fi
22421      fi
22422    fi
22423
22424  fi
22425
22426
22427
22428
22429  # Publish this variable in the help.
22430
22431
22432  if [ -z "${STAT+x}" ]; then
22433    # The variable is not set by user, try to locate tool using the code snippet
22434    for ac_prog in stat
22435do
22436  # Extract the first word of "$ac_prog", so it can be a program name with args.
22437set dummy $ac_prog; ac_word=$2
22438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22439$as_echo_n "checking for $ac_word... " >&6; }
22440if ${ac_cv_path_STAT+:} false; then :
22441  $as_echo_n "(cached) " >&6
22442else
22443  case $STAT in
22444  [\\/]* | ?:[\\/]*)
22445  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22446  ;;
22447  *)
22448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22449for as_dir in $PATH
22450do
22451  IFS=$as_save_IFS
22452  test -z "$as_dir" && as_dir=.
22453    for ac_exec_ext in '' $ac_executable_extensions; do
22454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22455    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22457    break 2
22458  fi
22459done
22460  done
22461IFS=$as_save_IFS
22462
22463  ;;
22464esac
22465fi
22466STAT=$ac_cv_path_STAT
22467if test -n "$STAT"; then
22468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22469$as_echo "$STAT" >&6; }
22470else
22471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22472$as_echo "no" >&6; }
22473fi
22474
22475
22476  test -n "$STAT" && break
22477done
22478
22479  else
22480    # The variable is set, but is it from the command line or the environment?
22481
22482    # Try to remove the string !STAT! from our list.
22483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22485      # If it failed, the variable was not from the command line. Ignore it,
22486      # but warn the user (except for BASH, which is always set by the calling BASH).
22487      if test "xSTAT" != xBASH; then
22488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22489$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22490      fi
22491      # Try to locate tool using the code snippet
22492      for ac_prog in stat
22493do
22494  # Extract the first word of "$ac_prog", so it can be a program name with args.
22495set dummy $ac_prog; ac_word=$2
22496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22497$as_echo_n "checking for $ac_word... " >&6; }
22498if ${ac_cv_path_STAT+:} false; then :
22499  $as_echo_n "(cached) " >&6
22500else
22501  case $STAT in
22502  [\\/]* | ?:[\\/]*)
22503  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22504  ;;
22505  *)
22506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22507for as_dir in $PATH
22508do
22509  IFS=$as_save_IFS
22510  test -z "$as_dir" && as_dir=.
22511    for ac_exec_ext in '' $ac_executable_extensions; do
22512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22513    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22515    break 2
22516  fi
22517done
22518  done
22519IFS=$as_save_IFS
22520
22521  ;;
22522esac
22523fi
22524STAT=$ac_cv_path_STAT
22525if test -n "$STAT"; then
22526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22527$as_echo "$STAT" >&6; }
22528else
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22530$as_echo "no" >&6; }
22531fi
22532
22533
22534  test -n "$STAT" && break
22535done
22536
22537    else
22538      # If it succeeded, then it was overridden by the user. We will use it
22539      # for the tool.
22540
22541      # First remove it from the list of overridden variables, so we can test
22542      # for unknown variables in the end.
22543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22544
22545      # Check if we try to supply an empty value
22546      if test "x$STAT" = x; then
22547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22548$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22550$as_echo_n "checking for STAT... " >&6; }
22551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22552$as_echo "disabled" >&6; }
22553      else
22554        # Check if the provided tool contains a complete path.
22555        tool_specified="$STAT"
22556        tool_basename="${tool_specified##*/}"
22557        if test "x$tool_basename" = "x$tool_specified"; then
22558          # A command without a complete path is provided, search $PATH.
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22560$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22561          # Extract the first word of "$tool_basename", so it can be a program name with args.
22562set dummy $tool_basename; ac_word=$2
22563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22564$as_echo_n "checking for $ac_word... " >&6; }
22565if ${ac_cv_path_STAT+:} false; then :
22566  $as_echo_n "(cached) " >&6
22567else
22568  case $STAT in
22569  [\\/]* | ?:[\\/]*)
22570  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22571  ;;
22572  *)
22573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22574for as_dir in $PATH
22575do
22576  IFS=$as_save_IFS
22577  test -z "$as_dir" && as_dir=.
22578    for ac_exec_ext in '' $ac_executable_extensions; do
22579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22580    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22582    break 2
22583  fi
22584done
22585  done
22586IFS=$as_save_IFS
22587
22588  ;;
22589esac
22590fi
22591STAT=$ac_cv_path_STAT
22592if test -n "$STAT"; then
22593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22594$as_echo "$STAT" >&6; }
22595else
22596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22597$as_echo "no" >&6; }
22598fi
22599
22600
22601          if test "x$STAT" = x; then
22602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22603          fi
22604        else
22605          # Otherwise we believe it is a complete path. Use it as it is.
22606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22607$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22609$as_echo_n "checking for STAT... " >&6; }
22610          if test ! -x "$tool_specified"; then
22611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22612$as_echo "not found" >&6; }
22613            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22614          fi
22615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22616$as_echo "$tool_specified" >&6; }
22617        fi
22618      fi
22619    fi
22620
22621  fi
22622
22623
22624
22625
22626  # Publish this variable in the help.
22627
22628
22629  if [ -z "${TIME+x}" ]; then
22630    # The variable is not set by user, try to locate tool using the code snippet
22631    for ac_prog in time
22632do
22633  # Extract the first word of "$ac_prog", so it can be a program name with args.
22634set dummy $ac_prog; ac_word=$2
22635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22636$as_echo_n "checking for $ac_word... " >&6; }
22637if ${ac_cv_path_TIME+:} false; then :
22638  $as_echo_n "(cached) " >&6
22639else
22640  case $TIME in
22641  [\\/]* | ?:[\\/]*)
22642  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22643  ;;
22644  *)
22645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22646for as_dir in $PATH
22647do
22648  IFS=$as_save_IFS
22649  test -z "$as_dir" && as_dir=.
22650    for ac_exec_ext in '' $ac_executable_extensions; do
22651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22652    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22654    break 2
22655  fi
22656done
22657  done
22658IFS=$as_save_IFS
22659
22660  ;;
22661esac
22662fi
22663TIME=$ac_cv_path_TIME
22664if test -n "$TIME"; then
22665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22666$as_echo "$TIME" >&6; }
22667else
22668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22669$as_echo "no" >&6; }
22670fi
22671
22672
22673  test -n "$TIME" && break
22674done
22675
22676  else
22677    # The variable is set, but is it from the command line or the environment?
22678
22679    # Try to remove the string !TIME! from our list.
22680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22682      # If it failed, the variable was not from the command line. Ignore it,
22683      # but warn the user (except for BASH, which is always set by the calling BASH).
22684      if test "xTIME" != xBASH; then
22685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22686$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22687      fi
22688      # Try to locate tool using the code snippet
22689      for ac_prog in time
22690do
22691  # Extract the first word of "$ac_prog", so it can be a program name with args.
22692set dummy $ac_prog; ac_word=$2
22693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22694$as_echo_n "checking for $ac_word... " >&6; }
22695if ${ac_cv_path_TIME+:} false; then :
22696  $as_echo_n "(cached) " >&6
22697else
22698  case $TIME in
22699  [\\/]* | ?:[\\/]*)
22700  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22701  ;;
22702  *)
22703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22704for as_dir in $PATH
22705do
22706  IFS=$as_save_IFS
22707  test -z "$as_dir" && as_dir=.
22708    for ac_exec_ext in '' $ac_executable_extensions; do
22709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22710    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22712    break 2
22713  fi
22714done
22715  done
22716IFS=$as_save_IFS
22717
22718  ;;
22719esac
22720fi
22721TIME=$ac_cv_path_TIME
22722if test -n "$TIME"; then
22723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22724$as_echo "$TIME" >&6; }
22725else
22726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22727$as_echo "no" >&6; }
22728fi
22729
22730
22731  test -n "$TIME" && break
22732done
22733
22734    else
22735      # If it succeeded, then it was overridden by the user. We will use it
22736      # for the tool.
22737
22738      # First remove it from the list of overridden variables, so we can test
22739      # for unknown variables in the end.
22740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22741
22742      # Check if we try to supply an empty value
22743      if test "x$TIME" = x; then
22744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22745$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22747$as_echo_n "checking for TIME... " >&6; }
22748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22749$as_echo "disabled" >&6; }
22750      else
22751        # Check if the provided tool contains a complete path.
22752        tool_specified="$TIME"
22753        tool_basename="${tool_specified##*/}"
22754        if test "x$tool_basename" = "x$tool_specified"; then
22755          # A command without a complete path is provided, search $PATH.
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22757$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22758          # Extract the first word of "$tool_basename", so it can be a program name with args.
22759set dummy $tool_basename; ac_word=$2
22760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22761$as_echo_n "checking for $ac_word... " >&6; }
22762if ${ac_cv_path_TIME+:} false; then :
22763  $as_echo_n "(cached) " >&6
22764else
22765  case $TIME in
22766  [\\/]* | ?:[\\/]*)
22767  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22768  ;;
22769  *)
22770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22771for as_dir in $PATH
22772do
22773  IFS=$as_save_IFS
22774  test -z "$as_dir" && as_dir=.
22775    for ac_exec_ext in '' $ac_executable_extensions; do
22776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22777    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22779    break 2
22780  fi
22781done
22782  done
22783IFS=$as_save_IFS
22784
22785  ;;
22786esac
22787fi
22788TIME=$ac_cv_path_TIME
22789if test -n "$TIME"; then
22790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22791$as_echo "$TIME" >&6; }
22792else
22793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22794$as_echo "no" >&6; }
22795fi
22796
22797
22798          if test "x$TIME" = x; then
22799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22800          fi
22801        else
22802          # Otherwise we believe it is a complete path. Use it as it is.
22803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22804$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22806$as_echo_n "checking for TIME... " >&6; }
22807          if test ! -x "$tool_specified"; then
22808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22809$as_echo "not found" >&6; }
22810            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22811          fi
22812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22813$as_echo "$tool_specified" >&6; }
22814        fi
22815      fi
22816    fi
22817
22818  fi
22819
22820
22821  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22822  # be in the user path.
22823
22824
22825  # Publish this variable in the help.
22826
22827
22828  if [ -z "${DTRACE+x}" ]; then
22829    # The variable is not set by user, try to locate tool using the code snippet
22830    for ac_prog in dtrace
22831do
22832  # Extract the first word of "$ac_prog", so it can be a program name with args.
22833set dummy $ac_prog; ac_word=$2
22834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22835$as_echo_n "checking for $ac_word... " >&6; }
22836if ${ac_cv_path_DTRACE+:} false; then :
22837  $as_echo_n "(cached) " >&6
22838else
22839  case $DTRACE in
22840  [\\/]* | ?:[\\/]*)
22841  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22842  ;;
22843  *)
22844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22845as_dummy="$PATH:/usr/sbin"
22846for as_dir in $as_dummy
22847do
22848  IFS=$as_save_IFS
22849  test -z "$as_dir" && as_dir=.
22850    for ac_exec_ext in '' $ac_executable_extensions; do
22851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22852    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22854    break 2
22855  fi
22856done
22857  done
22858IFS=$as_save_IFS
22859
22860  ;;
22861esac
22862fi
22863DTRACE=$ac_cv_path_DTRACE
22864if test -n "$DTRACE"; then
22865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22866$as_echo "$DTRACE" >&6; }
22867else
22868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22869$as_echo "no" >&6; }
22870fi
22871
22872
22873  test -n "$DTRACE" && break
22874done
22875
22876  else
22877    # The variable is set, but is it from the command line or the environment?
22878
22879    # Try to remove the string !DTRACE! from our list.
22880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22882      # If it failed, the variable was not from the command line. Ignore it,
22883      # but warn the user (except for BASH, which is always set by the calling BASH).
22884      if test "xDTRACE" != xBASH; then
22885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22886$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22887      fi
22888      # Try to locate tool using the code snippet
22889      for ac_prog in dtrace
22890do
22891  # Extract the first word of "$ac_prog", so it can be a program name with args.
22892set dummy $ac_prog; ac_word=$2
22893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22894$as_echo_n "checking for $ac_word... " >&6; }
22895if ${ac_cv_path_DTRACE+:} false; then :
22896  $as_echo_n "(cached) " >&6
22897else
22898  case $DTRACE in
22899  [\\/]* | ?:[\\/]*)
22900  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22901  ;;
22902  *)
22903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22904as_dummy="$PATH:/usr/sbin"
22905for as_dir in $as_dummy
22906do
22907  IFS=$as_save_IFS
22908  test -z "$as_dir" && as_dir=.
22909    for ac_exec_ext in '' $ac_executable_extensions; do
22910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22911    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22913    break 2
22914  fi
22915done
22916  done
22917IFS=$as_save_IFS
22918
22919  ;;
22920esac
22921fi
22922DTRACE=$ac_cv_path_DTRACE
22923if test -n "$DTRACE"; then
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22925$as_echo "$DTRACE" >&6; }
22926else
22927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22928$as_echo "no" >&6; }
22929fi
22930
22931
22932  test -n "$DTRACE" && break
22933done
22934
22935    else
22936      # If it succeeded, then it was overridden by the user. We will use it
22937      # for the tool.
22938
22939      # First remove it from the list of overridden variables, so we can test
22940      # for unknown variables in the end.
22941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22942
22943      # Check if we try to supply an empty value
22944      if test "x$DTRACE" = x; then
22945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22946$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22948$as_echo_n "checking for DTRACE... " >&6; }
22949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22950$as_echo "disabled" >&6; }
22951      else
22952        # Check if the provided tool contains a complete path.
22953        tool_specified="$DTRACE"
22954        tool_basename="${tool_specified##*/}"
22955        if test "x$tool_basename" = "x$tool_specified"; then
22956          # A command without a complete path is provided, search $PATH.
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22958$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22959          # Extract the first word of "$tool_basename", so it can be a program name with args.
22960set dummy $tool_basename; ac_word=$2
22961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22962$as_echo_n "checking for $ac_word... " >&6; }
22963if ${ac_cv_path_DTRACE+:} false; then :
22964  $as_echo_n "(cached) " >&6
22965else
22966  case $DTRACE in
22967  [\\/]* | ?:[\\/]*)
22968  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22969  ;;
22970  *)
22971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22972for as_dir in $PATH
22973do
22974  IFS=$as_save_IFS
22975  test -z "$as_dir" && as_dir=.
22976    for ac_exec_ext in '' $ac_executable_extensions; do
22977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22978    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22980    break 2
22981  fi
22982done
22983  done
22984IFS=$as_save_IFS
22985
22986  ;;
22987esac
22988fi
22989DTRACE=$ac_cv_path_DTRACE
22990if test -n "$DTRACE"; then
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22992$as_echo "$DTRACE" >&6; }
22993else
22994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22995$as_echo "no" >&6; }
22996fi
22997
22998
22999          if test "x$DTRACE" = x; then
23000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23001          fi
23002        else
23003          # Otherwise we believe it is a complete path. Use it as it is.
23004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23005$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23007$as_echo_n "checking for DTRACE... " >&6; }
23008          if test ! -x "$tool_specified"; then
23009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23010$as_echo "not found" >&6; }
23011            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23012          fi
23013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23014$as_echo "$tool_specified" >&6; }
23015        fi
23016      fi
23017    fi
23018
23019  fi
23020
23021
23022
23023
23024  # Publish this variable in the help.
23025
23026
23027  if [ -z "${PATCH+x}" ]; then
23028    # The variable is not set by user, try to locate tool using the code snippet
23029    for ac_prog in gpatch patch
23030do
23031  # Extract the first word of "$ac_prog", so it can be a program name with args.
23032set dummy $ac_prog; ac_word=$2
23033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23034$as_echo_n "checking for $ac_word... " >&6; }
23035if ${ac_cv_path_PATCH+:} false; then :
23036  $as_echo_n "(cached) " >&6
23037else
23038  case $PATCH in
23039  [\\/]* | ?:[\\/]*)
23040  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23041  ;;
23042  *)
23043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23044for as_dir in $PATH
23045do
23046  IFS=$as_save_IFS
23047  test -z "$as_dir" && as_dir=.
23048    for ac_exec_ext in '' $ac_executable_extensions; do
23049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23050    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23052    break 2
23053  fi
23054done
23055  done
23056IFS=$as_save_IFS
23057
23058  ;;
23059esac
23060fi
23061PATCH=$ac_cv_path_PATCH
23062if test -n "$PATCH"; then
23063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23064$as_echo "$PATCH" >&6; }
23065else
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067$as_echo "no" >&6; }
23068fi
23069
23070
23071  test -n "$PATCH" && break
23072done
23073
23074  else
23075    # The variable is set, but is it from the command line or the environment?
23076
23077    # Try to remove the string !PATCH! from our list.
23078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23080      # If it failed, the variable was not from the command line. Ignore it,
23081      # but warn the user (except for BASH, which is always set by the calling BASH).
23082      if test "xPATCH" != xBASH; then
23083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23084$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23085      fi
23086      # Try to locate tool using the code snippet
23087      for ac_prog in gpatch patch
23088do
23089  # Extract the first word of "$ac_prog", so it can be a program name with args.
23090set dummy $ac_prog; ac_word=$2
23091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23092$as_echo_n "checking for $ac_word... " >&6; }
23093if ${ac_cv_path_PATCH+:} false; then :
23094  $as_echo_n "(cached) " >&6
23095else
23096  case $PATCH in
23097  [\\/]* | ?:[\\/]*)
23098  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23099  ;;
23100  *)
23101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23102for as_dir in $PATH
23103do
23104  IFS=$as_save_IFS
23105  test -z "$as_dir" && as_dir=.
23106    for ac_exec_ext in '' $ac_executable_extensions; do
23107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23108    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23110    break 2
23111  fi
23112done
23113  done
23114IFS=$as_save_IFS
23115
23116  ;;
23117esac
23118fi
23119PATCH=$ac_cv_path_PATCH
23120if test -n "$PATCH"; then
23121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23122$as_echo "$PATCH" >&6; }
23123else
23124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23125$as_echo "no" >&6; }
23126fi
23127
23128
23129  test -n "$PATCH" && break
23130done
23131
23132    else
23133      # If it succeeded, then it was overridden by the user. We will use it
23134      # for the tool.
23135
23136      # First remove it from the list of overridden variables, so we can test
23137      # for unknown variables in the end.
23138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23139
23140      # Check if we try to supply an empty value
23141      if test "x$PATCH" = x; then
23142        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23143$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23145$as_echo_n "checking for PATCH... " >&6; }
23146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23147$as_echo "disabled" >&6; }
23148      else
23149        # Check if the provided tool contains a complete path.
23150        tool_specified="$PATCH"
23151        tool_basename="${tool_specified##*/}"
23152        if test "x$tool_basename" = "x$tool_specified"; then
23153          # A command without a complete path is provided, search $PATH.
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23155$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23156          # Extract the first word of "$tool_basename", so it can be a program name with args.
23157set dummy $tool_basename; ac_word=$2
23158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23159$as_echo_n "checking for $ac_word... " >&6; }
23160if ${ac_cv_path_PATCH+:} false; then :
23161  $as_echo_n "(cached) " >&6
23162else
23163  case $PATCH in
23164  [\\/]* | ?:[\\/]*)
23165  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23166  ;;
23167  *)
23168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23169for as_dir in $PATH
23170do
23171  IFS=$as_save_IFS
23172  test -z "$as_dir" && as_dir=.
23173    for ac_exec_ext in '' $ac_executable_extensions; do
23174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23175    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23177    break 2
23178  fi
23179done
23180  done
23181IFS=$as_save_IFS
23182
23183  ;;
23184esac
23185fi
23186PATCH=$ac_cv_path_PATCH
23187if test -n "$PATCH"; then
23188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23189$as_echo "$PATCH" >&6; }
23190else
23191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23192$as_echo "no" >&6; }
23193fi
23194
23195
23196          if test "x$PATCH" = x; then
23197            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23198          fi
23199        else
23200          # Otherwise we believe it is a complete path. Use it as it is.
23201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23202$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23203          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23204$as_echo_n "checking for PATCH... " >&6; }
23205          if test ! -x "$tool_specified"; then
23206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23207$as_echo "not found" >&6; }
23208            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23209          fi
23210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23211$as_echo "$tool_specified" >&6; }
23212        fi
23213      fi
23214    fi
23215
23216  fi
23217
23218
23219  # Check if it's GNU time
23220  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23221  if test "x$IS_GNU_TIME" != x; then
23222    IS_GNU_TIME=yes
23223  else
23224    IS_GNU_TIME=no
23225  fi
23226
23227
23228  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23229
23230
23231
23232  # Publish this variable in the help.
23233
23234
23235  if [ -z "${DSYMUTIL+x}" ]; then
23236    # The variable is not set by user, try to locate tool using the code snippet
23237    for ac_prog in dsymutil
23238do
23239  # Extract the first word of "$ac_prog", so it can be a program name with args.
23240set dummy $ac_prog; ac_word=$2
23241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23242$as_echo_n "checking for $ac_word... " >&6; }
23243if ${ac_cv_path_DSYMUTIL+:} false; then :
23244  $as_echo_n "(cached) " >&6
23245else
23246  case $DSYMUTIL in
23247  [\\/]* | ?:[\\/]*)
23248  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23249  ;;
23250  *)
23251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23252for as_dir in $PATH
23253do
23254  IFS=$as_save_IFS
23255  test -z "$as_dir" && as_dir=.
23256    for ac_exec_ext in '' $ac_executable_extensions; do
23257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23258    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23260    break 2
23261  fi
23262done
23263  done
23264IFS=$as_save_IFS
23265
23266  ;;
23267esac
23268fi
23269DSYMUTIL=$ac_cv_path_DSYMUTIL
23270if test -n "$DSYMUTIL"; then
23271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23272$as_echo "$DSYMUTIL" >&6; }
23273else
23274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23275$as_echo "no" >&6; }
23276fi
23277
23278
23279  test -n "$DSYMUTIL" && break
23280done
23281
23282  else
23283    # The variable is set, but is it from the command line or the environment?
23284
23285    # Try to remove the string !DSYMUTIL! from our list.
23286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23288      # If it failed, the variable was not from the command line. Ignore it,
23289      # but warn the user (except for BASH, which is always set by the calling BASH).
23290      if test "xDSYMUTIL" != xBASH; then
23291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23292$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23293      fi
23294      # Try to locate tool using the code snippet
23295      for ac_prog in dsymutil
23296do
23297  # Extract the first word of "$ac_prog", so it can be a program name with args.
23298set dummy $ac_prog; ac_word=$2
23299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23300$as_echo_n "checking for $ac_word... " >&6; }
23301if ${ac_cv_path_DSYMUTIL+:} false; then :
23302  $as_echo_n "(cached) " >&6
23303else
23304  case $DSYMUTIL in
23305  [\\/]* | ?:[\\/]*)
23306  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23307  ;;
23308  *)
23309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23310for as_dir in $PATH
23311do
23312  IFS=$as_save_IFS
23313  test -z "$as_dir" && as_dir=.
23314    for ac_exec_ext in '' $ac_executable_extensions; do
23315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23316    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23318    break 2
23319  fi
23320done
23321  done
23322IFS=$as_save_IFS
23323
23324  ;;
23325esac
23326fi
23327DSYMUTIL=$ac_cv_path_DSYMUTIL
23328if test -n "$DSYMUTIL"; then
23329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23330$as_echo "$DSYMUTIL" >&6; }
23331else
23332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23333$as_echo "no" >&6; }
23334fi
23335
23336
23337  test -n "$DSYMUTIL" && break
23338done
23339
23340    else
23341      # If it succeeded, then it was overridden by the user. We will use it
23342      # for the tool.
23343
23344      # First remove it from the list of overridden variables, so we can test
23345      # for unknown variables in the end.
23346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23347
23348      # Check if we try to supply an empty value
23349      if test "x$DSYMUTIL" = x; then
23350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23351$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23353$as_echo_n "checking for DSYMUTIL... " >&6; }
23354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23355$as_echo "disabled" >&6; }
23356      else
23357        # Check if the provided tool contains a complete path.
23358        tool_specified="$DSYMUTIL"
23359        tool_basename="${tool_specified##*/}"
23360        if test "x$tool_basename" = "x$tool_specified"; then
23361          # A command without a complete path is provided, search $PATH.
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23363$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23364          # Extract the first word of "$tool_basename", so it can be a program name with args.
23365set dummy $tool_basename; ac_word=$2
23366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23367$as_echo_n "checking for $ac_word... " >&6; }
23368if ${ac_cv_path_DSYMUTIL+:} false; then :
23369  $as_echo_n "(cached) " >&6
23370else
23371  case $DSYMUTIL in
23372  [\\/]* | ?:[\\/]*)
23373  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23374  ;;
23375  *)
23376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23377for as_dir in $PATH
23378do
23379  IFS=$as_save_IFS
23380  test -z "$as_dir" && as_dir=.
23381    for ac_exec_ext in '' $ac_executable_extensions; do
23382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23383    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23385    break 2
23386  fi
23387done
23388  done
23389IFS=$as_save_IFS
23390
23391  ;;
23392esac
23393fi
23394DSYMUTIL=$ac_cv_path_DSYMUTIL
23395if test -n "$DSYMUTIL"; then
23396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23397$as_echo "$DSYMUTIL" >&6; }
23398else
23399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23400$as_echo "no" >&6; }
23401fi
23402
23403
23404          if test "x$DSYMUTIL" = x; then
23405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23406          fi
23407        else
23408          # Otherwise we believe it is a complete path. Use it as it is.
23409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23410$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23412$as_echo_n "checking for DSYMUTIL... " >&6; }
23413          if test ! -x "$tool_specified"; then
23414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23415$as_echo "not found" >&6; }
23416            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23417          fi
23418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23419$as_echo "$tool_specified" >&6; }
23420        fi
23421      fi
23422    fi
23423
23424  fi
23425
23426
23427
23428  if test "x$DSYMUTIL" = x; then
23429    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23430  fi
23431
23432
23433
23434
23435
23436  # Publish this variable in the help.
23437
23438
23439  if [ -z "${XATTR+x}" ]; then
23440    # The variable is not set by user, try to locate tool using the code snippet
23441    for ac_prog in xattr
23442do
23443  # Extract the first word of "$ac_prog", so it can be a program name with args.
23444set dummy $ac_prog; ac_word=$2
23445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23446$as_echo_n "checking for $ac_word... " >&6; }
23447if ${ac_cv_path_XATTR+:} false; then :
23448  $as_echo_n "(cached) " >&6
23449else
23450  case $XATTR in
23451  [\\/]* | ?:[\\/]*)
23452  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23453  ;;
23454  *)
23455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23456for as_dir in $PATH
23457do
23458  IFS=$as_save_IFS
23459  test -z "$as_dir" && as_dir=.
23460    for ac_exec_ext in '' $ac_executable_extensions; do
23461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23462    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23464    break 2
23465  fi
23466done
23467  done
23468IFS=$as_save_IFS
23469
23470  ;;
23471esac
23472fi
23473XATTR=$ac_cv_path_XATTR
23474if test -n "$XATTR"; then
23475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23476$as_echo "$XATTR" >&6; }
23477else
23478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23479$as_echo "no" >&6; }
23480fi
23481
23482
23483  test -n "$XATTR" && break
23484done
23485
23486  else
23487    # The variable is set, but is it from the command line or the environment?
23488
23489    # Try to remove the string !XATTR! from our list.
23490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23492      # If it failed, the variable was not from the command line. Ignore it,
23493      # but warn the user (except for BASH, which is always set by the calling BASH).
23494      if test "xXATTR" != xBASH; then
23495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23496$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23497      fi
23498      # Try to locate tool using the code snippet
23499      for ac_prog in xattr
23500do
23501  # Extract the first word of "$ac_prog", so it can be a program name with args.
23502set dummy $ac_prog; ac_word=$2
23503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23504$as_echo_n "checking for $ac_word... " >&6; }
23505if ${ac_cv_path_XATTR+:} false; then :
23506  $as_echo_n "(cached) " >&6
23507else
23508  case $XATTR in
23509  [\\/]* | ?:[\\/]*)
23510  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23511  ;;
23512  *)
23513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23514for as_dir in $PATH
23515do
23516  IFS=$as_save_IFS
23517  test -z "$as_dir" && as_dir=.
23518    for ac_exec_ext in '' $ac_executable_extensions; do
23519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23520    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23522    break 2
23523  fi
23524done
23525  done
23526IFS=$as_save_IFS
23527
23528  ;;
23529esac
23530fi
23531XATTR=$ac_cv_path_XATTR
23532if test -n "$XATTR"; then
23533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23534$as_echo "$XATTR" >&6; }
23535else
23536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23537$as_echo "no" >&6; }
23538fi
23539
23540
23541  test -n "$XATTR" && break
23542done
23543
23544    else
23545      # If it succeeded, then it was overridden by the user. We will use it
23546      # for the tool.
23547
23548      # First remove it from the list of overridden variables, so we can test
23549      # for unknown variables in the end.
23550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23551
23552      # Check if we try to supply an empty value
23553      if test "x$XATTR" = x; then
23554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23555$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23557$as_echo_n "checking for XATTR... " >&6; }
23558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23559$as_echo "disabled" >&6; }
23560      else
23561        # Check if the provided tool contains a complete path.
23562        tool_specified="$XATTR"
23563        tool_basename="${tool_specified##*/}"
23564        if test "x$tool_basename" = "x$tool_specified"; then
23565          # A command without a complete path is provided, search $PATH.
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23567$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23568          # Extract the first word of "$tool_basename", so it can be a program name with args.
23569set dummy $tool_basename; ac_word=$2
23570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23571$as_echo_n "checking for $ac_word... " >&6; }
23572if ${ac_cv_path_XATTR+:} false; then :
23573  $as_echo_n "(cached) " >&6
23574else
23575  case $XATTR in
23576  [\\/]* | ?:[\\/]*)
23577  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23578  ;;
23579  *)
23580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23581for as_dir in $PATH
23582do
23583  IFS=$as_save_IFS
23584  test -z "$as_dir" && as_dir=.
23585    for ac_exec_ext in '' $ac_executable_extensions; do
23586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23587    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23589    break 2
23590  fi
23591done
23592  done
23593IFS=$as_save_IFS
23594
23595  ;;
23596esac
23597fi
23598XATTR=$ac_cv_path_XATTR
23599if test -n "$XATTR"; then
23600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23601$as_echo "$XATTR" >&6; }
23602else
23603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23604$as_echo "no" >&6; }
23605fi
23606
23607
23608          if test "x$XATTR" = x; then
23609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23610          fi
23611        else
23612          # Otherwise we believe it is a complete path. Use it as it is.
23613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23614$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23616$as_echo_n "checking for XATTR... " >&6; }
23617          if test ! -x "$tool_specified"; then
23618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23619$as_echo "not found" >&6; }
23620            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23621          fi
23622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23623$as_echo "$tool_specified" >&6; }
23624        fi
23625      fi
23626    fi
23627
23628  fi
23629
23630
23631
23632  if test "x$XATTR" = x; then
23633    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23634  fi
23635
23636
23637
23638
23639  # Publish this variable in the help.
23640
23641
23642  if [ -z "${CODESIGN+x}" ]; then
23643    # The variable is not set by user, try to locate tool using the code snippet
23644    for ac_prog in codesign
23645do
23646  # Extract the first word of "$ac_prog", so it can be a program name with args.
23647set dummy $ac_prog; ac_word=$2
23648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23649$as_echo_n "checking for $ac_word... " >&6; }
23650if ${ac_cv_path_CODESIGN+:} false; then :
23651  $as_echo_n "(cached) " >&6
23652else
23653  case $CODESIGN in
23654  [\\/]* | ?:[\\/]*)
23655  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23656  ;;
23657  *)
23658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23659for as_dir in $PATH
23660do
23661  IFS=$as_save_IFS
23662  test -z "$as_dir" && as_dir=.
23663    for ac_exec_ext in '' $ac_executable_extensions; do
23664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23665    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23667    break 2
23668  fi
23669done
23670  done
23671IFS=$as_save_IFS
23672
23673  ;;
23674esac
23675fi
23676CODESIGN=$ac_cv_path_CODESIGN
23677if test -n "$CODESIGN"; then
23678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23679$as_echo "$CODESIGN" >&6; }
23680else
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23682$as_echo "no" >&6; }
23683fi
23684
23685
23686  test -n "$CODESIGN" && break
23687done
23688
23689  else
23690    # The variable is set, but is it from the command line or the environment?
23691
23692    # Try to remove the string !CODESIGN! from our list.
23693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23695      # If it failed, the variable was not from the command line. Ignore it,
23696      # but warn the user (except for BASH, which is always set by the calling BASH).
23697      if test "xCODESIGN" != xBASH; then
23698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23699$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23700      fi
23701      # Try to locate tool using the code snippet
23702      for ac_prog in codesign
23703do
23704  # Extract the first word of "$ac_prog", so it can be a program name with args.
23705set dummy $ac_prog; ac_word=$2
23706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23707$as_echo_n "checking for $ac_word... " >&6; }
23708if ${ac_cv_path_CODESIGN+:} false; then :
23709  $as_echo_n "(cached) " >&6
23710else
23711  case $CODESIGN in
23712  [\\/]* | ?:[\\/]*)
23713  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23714  ;;
23715  *)
23716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23717for as_dir in $PATH
23718do
23719  IFS=$as_save_IFS
23720  test -z "$as_dir" && as_dir=.
23721    for ac_exec_ext in '' $ac_executable_extensions; do
23722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23723    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23725    break 2
23726  fi
23727done
23728  done
23729IFS=$as_save_IFS
23730
23731  ;;
23732esac
23733fi
23734CODESIGN=$ac_cv_path_CODESIGN
23735if test -n "$CODESIGN"; then
23736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23737$as_echo "$CODESIGN" >&6; }
23738else
23739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23740$as_echo "no" >&6; }
23741fi
23742
23743
23744  test -n "$CODESIGN" && break
23745done
23746
23747    else
23748      # If it succeeded, then it was overridden by the user. We will use it
23749      # for the tool.
23750
23751      # First remove it from the list of overridden variables, so we can test
23752      # for unknown variables in the end.
23753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23754
23755      # Check if we try to supply an empty value
23756      if test "x$CODESIGN" = x; then
23757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23758$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23760$as_echo_n "checking for CODESIGN... " >&6; }
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23762$as_echo "disabled" >&6; }
23763      else
23764        # Check if the provided tool contains a complete path.
23765        tool_specified="$CODESIGN"
23766        tool_basename="${tool_specified##*/}"
23767        if test "x$tool_basename" = "x$tool_specified"; then
23768          # A command without a complete path is provided, search $PATH.
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23770$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23771          # Extract the first word of "$tool_basename", so it can be a program name with args.
23772set dummy $tool_basename; ac_word=$2
23773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23774$as_echo_n "checking for $ac_word... " >&6; }
23775if ${ac_cv_path_CODESIGN+:} false; then :
23776  $as_echo_n "(cached) " >&6
23777else
23778  case $CODESIGN in
23779  [\\/]* | ?:[\\/]*)
23780  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23781  ;;
23782  *)
23783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23784for as_dir in $PATH
23785do
23786  IFS=$as_save_IFS
23787  test -z "$as_dir" && as_dir=.
23788    for ac_exec_ext in '' $ac_executable_extensions; do
23789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23790    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23792    break 2
23793  fi
23794done
23795  done
23796IFS=$as_save_IFS
23797
23798  ;;
23799esac
23800fi
23801CODESIGN=$ac_cv_path_CODESIGN
23802if test -n "$CODESIGN"; then
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23804$as_echo "$CODESIGN" >&6; }
23805else
23806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807$as_echo "no" >&6; }
23808fi
23809
23810
23811          if test "x$CODESIGN" = x; then
23812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23813          fi
23814        else
23815          # Otherwise we believe it is a complete path. Use it as it is.
23816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23817$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23819$as_echo_n "checking for CODESIGN... " >&6; }
23820          if test ! -x "$tool_specified"; then
23821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23822$as_echo "not found" >&6; }
23823            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23824          fi
23825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23826$as_echo "$tool_specified" >&6; }
23827        fi
23828      fi
23829    fi
23830
23831  fi
23832
23833
23834    if test "x$CODESIGN" != "x"; then
23835      # Verify that the openjdk_codesign certificate is present
23836      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23837$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23838      $RM codesign-testfile
23839      $TOUCH codesign-testfile
23840      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23841      $RM codesign-testfile
23842      if test "x$CODESIGN" = x; then
23843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23844$as_echo "no" >&6; }
23845      else
23846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23847$as_echo "yes" >&6; }
23848      fi
23849    fi
23850
23851
23852
23853  # Publish this variable in the help.
23854
23855
23856  if [ -z "${SETFILE+x}" ]; then
23857    # The variable is not set by user, try to locate tool using the code snippet
23858    for ac_prog in SetFile
23859do
23860  # Extract the first word of "$ac_prog", so it can be a program name with args.
23861set dummy $ac_prog; ac_word=$2
23862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23863$as_echo_n "checking for $ac_word... " >&6; }
23864if ${ac_cv_path_SETFILE+:} false; then :
23865  $as_echo_n "(cached) " >&6
23866else
23867  case $SETFILE in
23868  [\\/]* | ?:[\\/]*)
23869  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23870  ;;
23871  *)
23872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23873for as_dir in $PATH
23874do
23875  IFS=$as_save_IFS
23876  test -z "$as_dir" && as_dir=.
23877    for ac_exec_ext in '' $ac_executable_extensions; do
23878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23879    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23881    break 2
23882  fi
23883done
23884  done
23885IFS=$as_save_IFS
23886
23887  ;;
23888esac
23889fi
23890SETFILE=$ac_cv_path_SETFILE
23891if test -n "$SETFILE"; then
23892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23893$as_echo "$SETFILE" >&6; }
23894else
23895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23896$as_echo "no" >&6; }
23897fi
23898
23899
23900  test -n "$SETFILE" && break
23901done
23902
23903  else
23904    # The variable is set, but is it from the command line or the environment?
23905
23906    # Try to remove the string !SETFILE! from our list.
23907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23909      # If it failed, the variable was not from the command line. Ignore it,
23910      # but warn the user (except for BASH, which is always set by the calling BASH).
23911      if test "xSETFILE" != xBASH; then
23912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23913$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23914      fi
23915      # Try to locate tool using the code snippet
23916      for ac_prog in SetFile
23917do
23918  # Extract the first word of "$ac_prog", so it can be a program name with args.
23919set dummy $ac_prog; ac_word=$2
23920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23921$as_echo_n "checking for $ac_word... " >&6; }
23922if ${ac_cv_path_SETFILE+:} false; then :
23923  $as_echo_n "(cached) " >&6
23924else
23925  case $SETFILE in
23926  [\\/]* | ?:[\\/]*)
23927  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23928  ;;
23929  *)
23930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23931for as_dir in $PATH
23932do
23933  IFS=$as_save_IFS
23934  test -z "$as_dir" && as_dir=.
23935    for ac_exec_ext in '' $ac_executable_extensions; do
23936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23937    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23939    break 2
23940  fi
23941done
23942  done
23943IFS=$as_save_IFS
23944
23945  ;;
23946esac
23947fi
23948SETFILE=$ac_cv_path_SETFILE
23949if test -n "$SETFILE"; then
23950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23951$as_echo "$SETFILE" >&6; }
23952else
23953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23954$as_echo "no" >&6; }
23955fi
23956
23957
23958  test -n "$SETFILE" && break
23959done
23960
23961    else
23962      # If it succeeded, then it was overridden by the user. We will use it
23963      # for the tool.
23964
23965      # First remove it from the list of overridden variables, so we can test
23966      # for unknown variables in the end.
23967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23968
23969      # Check if we try to supply an empty value
23970      if test "x$SETFILE" = x; then
23971        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23972$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23974$as_echo_n "checking for SETFILE... " >&6; }
23975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23976$as_echo "disabled" >&6; }
23977      else
23978        # Check if the provided tool contains a complete path.
23979        tool_specified="$SETFILE"
23980        tool_basename="${tool_specified##*/}"
23981        if test "x$tool_basename" = "x$tool_specified"; then
23982          # A command without a complete path is provided, search $PATH.
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23984$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23985          # Extract the first word of "$tool_basename", so it can be a program name with args.
23986set dummy $tool_basename; ac_word=$2
23987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23988$as_echo_n "checking for $ac_word... " >&6; }
23989if ${ac_cv_path_SETFILE+:} false; then :
23990  $as_echo_n "(cached) " >&6
23991else
23992  case $SETFILE in
23993  [\\/]* | ?:[\\/]*)
23994  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23995  ;;
23996  *)
23997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23998for as_dir in $PATH
23999do
24000  IFS=$as_save_IFS
24001  test -z "$as_dir" && as_dir=.
24002    for ac_exec_ext in '' $ac_executable_extensions; do
24003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24004    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24006    break 2
24007  fi
24008done
24009  done
24010IFS=$as_save_IFS
24011
24012  ;;
24013esac
24014fi
24015SETFILE=$ac_cv_path_SETFILE
24016if test -n "$SETFILE"; then
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24018$as_echo "$SETFILE" >&6; }
24019else
24020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24021$as_echo "no" >&6; }
24022fi
24023
24024
24025          if test "x$SETFILE" = x; then
24026            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24027          fi
24028        else
24029          # Otherwise we believe it is a complete path. Use it as it is.
24030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24031$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24032          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24033$as_echo_n "checking for SETFILE... " >&6; }
24034          if test ! -x "$tool_specified"; then
24035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24036$as_echo "not found" >&6; }
24037            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24038          fi
24039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24040$as_echo "$tool_specified" >&6; }
24041        fi
24042      fi
24043    fi
24044
24045  fi
24046
24047
24048
24049  if test "x$SETFILE" = x; then
24050    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24051  fi
24052
24053
24054  fi
24055
24056
24057  # Check bash version
24058  # Extra [ ] to stop m4 mangling
24059   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24061$as_echo_n "checking bash version... " >&6; }
24062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24063$as_echo "$BASH_VER" >&6; }
24064
24065  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24066  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24067  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24068    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24069  fi
24070
24071  # Test if bash supports pipefail.
24072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24073$as_echo_n "checking if bash supports pipefail... " >&6; }
24074  if ${BASH} -c 'set -o pipefail'; then
24075    BASH_ARGS="$BASH_ARGS -o pipefail"
24076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24077$as_echo "yes" >&6; }
24078  else
24079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24080$as_echo "no" >&6; }
24081  fi
24082
24083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24084$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24085  if ${BASH} -e -c 'true'; then
24086    BASH_ARGS="$BASH_ARGS -e"
24087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24088$as_echo "yes" >&6; }
24089  else
24090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24091$as_echo "no" >&6; }
24092  fi
24093
24094
24095
24096
24097# Check if pkg-config is available.
24098
24099
24100if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24101	if test -n "$ac_tool_prefix"; then
24102  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24103set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24105$as_echo_n "checking for $ac_word... " >&6; }
24106if ${ac_cv_path_PKG_CONFIG+:} false; then :
24107  $as_echo_n "(cached) " >&6
24108else
24109  case $PKG_CONFIG in
24110  [\\/]* | ?:[\\/]*)
24111  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24112  ;;
24113  *)
24114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24115for as_dir in $PATH
24116do
24117  IFS=$as_save_IFS
24118  test -z "$as_dir" && as_dir=.
24119    for ac_exec_ext in '' $ac_executable_extensions; do
24120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24121    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24123    break 2
24124  fi
24125done
24126  done
24127IFS=$as_save_IFS
24128
24129  ;;
24130esac
24131fi
24132PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24133if test -n "$PKG_CONFIG"; then
24134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24135$as_echo "$PKG_CONFIG" >&6; }
24136else
24137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24138$as_echo "no" >&6; }
24139fi
24140
24141
24142fi
24143if test -z "$ac_cv_path_PKG_CONFIG"; then
24144  ac_pt_PKG_CONFIG=$PKG_CONFIG
24145  # Extract the first word of "pkg-config", so it can be a program name with args.
24146set dummy pkg-config; ac_word=$2
24147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24148$as_echo_n "checking for $ac_word... " >&6; }
24149if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24150  $as_echo_n "(cached) " >&6
24151else
24152  case $ac_pt_PKG_CONFIG in
24153  [\\/]* | ?:[\\/]*)
24154  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24155  ;;
24156  *)
24157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24158for as_dir in $PATH
24159do
24160  IFS=$as_save_IFS
24161  test -z "$as_dir" && as_dir=.
24162    for ac_exec_ext in '' $ac_executable_extensions; do
24163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24164    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24166    break 2
24167  fi
24168done
24169  done
24170IFS=$as_save_IFS
24171
24172  ;;
24173esac
24174fi
24175ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24176if test -n "$ac_pt_PKG_CONFIG"; then
24177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24178$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24179else
24180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24181$as_echo "no" >&6; }
24182fi
24183
24184  if test "x$ac_pt_PKG_CONFIG" = x; then
24185    PKG_CONFIG=""
24186  else
24187    case $cross_compiling:$ac_tool_warned in
24188yes:)
24189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24191ac_tool_warned=yes ;;
24192esac
24193    PKG_CONFIG=$ac_pt_PKG_CONFIG
24194  fi
24195else
24196  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24197fi
24198
24199fi
24200if test -n "$PKG_CONFIG"; then
24201	_pkg_min_version=0.9.0
24202	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24203$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24204	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24205		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24206$as_echo "yes" >&6; }
24207	else
24208		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24209$as_echo "no" >&6; }
24210		PKG_CONFIG=""
24211	fi
24212
24213fi
24214
24215# After basic tools have been setup, we can check build os specific details.
24216
24217  ###############################################################################
24218
24219  # Note that this is the build platform OS version!
24220
24221  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24222  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24223  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24224  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24225
24226
24227
24228
24229
24230# Misc basic settings
24231
24232
24233# Check whether --with-default-make-target was given.
24234if test "${with_default_make_target+set}" = set; then :
24235  withval=$with_default_make_target;
24236fi
24237
24238  if test "x$with_default_make_target" = "x" \
24239      || test "x$with_default_make_target" = "xyes"; then
24240    DEFAULT_MAKE_TARGET="exploded-image"
24241  elif test "x$with_default_make_target" = "xno"; then
24242    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24243  else
24244    DEFAULT_MAKE_TARGET="$with_default_make_target"
24245  fi
24246
24247
24248
24249
24250###############################################################################
24251#
24252# Determine OpenJDK variants, options and version numbers.
24253#
24254###############################################################################
24255
24256# We need build & target for this.
24257
24258  # Should we build a JDK without a graphical UI?
24259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24260$as_echo_n "checking headless only... " >&6; }
24261  # Check whether --enable-headless-only was given.
24262if test "${enable_headless_only+set}" = set; then :
24263  enableval=$enable_headless_only;
24264fi
24265
24266
24267  if test "x$enable_headless_only" = "xyes"; then
24268    ENABLE_HEADLESS_ONLY="true"
24269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24270$as_echo "yes" >&6; }
24271  elif test "x$enable_headless_only" = "xno"; then
24272    ENABLE_HEADLESS_ONLY="false"
24273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24274$as_echo "no" >&6; }
24275  elif test "x$enable_headless_only" = "x"; then
24276    ENABLE_HEADLESS_ONLY="false"
24277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24278$as_echo "no" >&6; }
24279  else
24280    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24281  fi
24282
24283
24284
24285  # Choose cacerts source file
24286
24287# Check whether --with-cacerts-file was given.
24288if test "${with_cacerts_file+set}" = set; then :
24289  withval=$with_cacerts_file;
24290fi
24291
24292  if test "x$with_cacerts_file" != x; then
24293    CACERTS_FILE=$with_cacerts_file
24294  fi
24295
24296
24297  # Enable or disable unlimited crypto
24298  # Check whether --enable-unlimited-crypto was given.
24299if test "${enable_unlimited_crypto+set}" = set; then :
24300  enableval=$enable_unlimited_crypto;
24301else
24302  enable_unlimited_crypto=yes
24303fi
24304
24305  if test "x$enable_unlimited_crypto" = "xyes"; then
24306    UNLIMITED_CRYPTO=true
24307  else
24308    UNLIMITED_CRYPTO=false
24309  fi
24310
24311
24312  # Should we build the serviceability agent (SA)?
24313  INCLUDE_SA=true
24314  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24315    INCLUDE_SA=false
24316  fi
24317  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24318    INCLUDE_SA=false
24319  fi
24320
24321
24322  # Compress jars
24323  COMPRESS_JARS=false
24324
24325
24326
24327  # Setup default copyright year. Mostly overridden when building close to a new year.
24328
24329# Check whether --with-copyright-year was given.
24330if test "${with_copyright_year+set}" = set; then :
24331  withval=$with_copyright_year;
24332fi
24333
24334  if test "x$with_copyright_year" = xyes; then
24335    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24336  elif test "x$with_copyright_year" != x; then
24337    COPYRIGHT_YEAR="$with_copyright_year"
24338  else
24339    COPYRIGHT_YEAR=`$DATE +'%Y'`
24340  fi
24341
24342
24343
24344  # Check whether --enable-keep-packaged-modules was given.
24345if test "${enable_keep_packaged_modules+set}" = set; then :
24346  enableval=$enable_keep_packaged_modules;
24347fi
24348
24349
24350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24351$as_echo_n "checking if packaged modules are kept... " >&6; }
24352  if test "x$enable_keep_packaged_modules" = "xyes"; then
24353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24354$as_echo "yes" >&6; }
24355    JLINK_KEEP_PACKAGED_MODULES=true
24356  elif test "x$enable_keep_packaged_modules" = "xno"; then
24357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24358$as_echo "no" >&6; }
24359    JLINK_KEEP_PACKAGED_MODULES=false
24360  elif test "x$enable_keep_packaged_modules" = "x"; then
24361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24362$as_echo "yes (default)" >&6; }
24363    JLINK_KEEP_PACKAGED_MODULES=true
24364  else
24365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24366$as_echo "error" >&6; }
24367    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24368  fi
24369
24370
24371
24372
24373  # Warn user that old version arguments are deprecated.
24374
24375
24376# Check whether --with-milestone was given.
24377if test "${with_milestone+set}" = set; then :
24378  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24379$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24380fi
24381
24382
24383
24384
24385# Check whether --with-update-version was given.
24386if test "${with_update_version+set}" = set; then :
24387  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24388$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24389fi
24390
24391
24392
24393
24394# Check whether --with-user-release-suffix was given.
24395if test "${with_user_release_suffix+set}" = set; then :
24396  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
24397$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24398fi
24399
24400
24401
24402
24403# Check whether --with-build-number was given.
24404if test "${with_build_number+set}" = set; then :
24405  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24406$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24407fi
24408
24409
24410
24411  # Source the version numbers file
24412  . $AUTOCONF_DIR/version-numbers
24413
24414  # Some non-version number information is set in that file
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424  # Override version from arguments
24425
24426  # If --with-version-string is set, process it first. It is possible to
24427  # override parts with more specific flags, since these are processed later.
24428
24429# Check whether --with-version-string was given.
24430if test "${with_version_string+set}" = set; then :
24431  withval=$with_version_string;
24432fi
24433
24434  if test "x$with_version_string" = xyes; then
24435    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24436  elif test "x$with_version_string" != x; then
24437    # Additional [] needed to keep m4 from mangling shell constructs.
24438    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24439      VERSION_MAJOR=${BASH_REMATCH[1]}
24440      VERSION_MINOR=${BASH_REMATCH[3]}
24441      VERSION_SECURITY=${BASH_REMATCH[5]}
24442      VERSION_PATCH=${BASH_REMATCH[7]}
24443      VERSION_PRE=${BASH_REMATCH[9]}
24444      version_plus_separator=${BASH_REMATCH[11]}
24445      VERSION_BUILD=${BASH_REMATCH[12]}
24446      VERSION_OPT=${BASH_REMATCH[14]}
24447      # Unspecified numerical fields are interpreted as 0.
24448      if test "x$VERSION_MINOR" = x; then
24449        VERSION_MINOR=0
24450      fi
24451      if test "x$VERSION_SECURITY" = x; then
24452        VERSION_SECURITY=0
24453      fi
24454      if test "x$VERSION_PATCH" = x; then
24455        VERSION_PATCH=0
24456      fi
24457      if test "x$version_plus_separator" != x \
24458          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24459        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24460      fi
24461      # Stop the version part process from setting default values.
24462      # We still allow them to explicitly override though.
24463      NO_DEFAULT_VERSION_PARTS=true
24464    else
24465      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24466    fi
24467  fi
24468
24469
24470# Check whether --with-version-pre was given.
24471if test "${with_version_pre+set}" = set; then :
24472  withval=$with_version_pre; with_version_pre_present=true
24473else
24474  with_version_pre_present=false
24475fi
24476
24477
24478  if test "x$with_version_pre_present" = xtrue; then
24479    if test "x$with_version_pre" = xyes; then
24480      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24481    elif test "x$with_version_pre" = xno; then
24482      # Interpret --without-* as empty string instead of the literal "no"
24483      VERSION_PRE=
24484    else
24485      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24486       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24487      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24489$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24490      fi
24491    fi
24492  else
24493    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24494      # Default is to use "internal" as pre
24495      VERSION_PRE="internal"
24496    fi
24497  fi
24498
24499
24500# Check whether --with-version-opt was given.
24501if test "${with_version_opt+set}" = set; then :
24502  withval=$with_version_opt; with_version_opt_present=true
24503else
24504  with_version_opt_present=false
24505fi
24506
24507
24508  if test "x$with_version_opt_present" = xtrue; then
24509    if test "x$with_version_opt" = xyes; then
24510      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24511    elif test "x$with_version_opt" = xno; then
24512      # Interpret --without-* as empty string instead of the literal "no"
24513      VERSION_OPT=
24514    else
24515      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24516       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24517      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24519$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24520      fi
24521    fi
24522  else
24523    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24524      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24525      # Outer [ ] to quote m4.
24526       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24527      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24528    fi
24529  fi
24530
24531
24532# Check whether --with-version-build was given.
24533if test "${with_version_build+set}" = set; then :
24534  withval=$with_version_build; with_version_build_present=true
24535else
24536  with_version_build_present=false
24537fi
24538
24539
24540  if test "x$with_version_build_present" = xtrue; then
24541    if test "x$with_version_build" = xyes; then
24542      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24543    elif test "x$with_version_build" = xno; then
24544      # Interpret --without-* as empty string instead of the literal "no"
24545      VERSION_BUILD=
24546    elif test "x$with_version_build" = x; then
24547      VERSION_BUILD=
24548    else
24549
24550  # Additional [] needed to keep m4 from mangling shell constructs.
24551  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24552    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24553  fi
24554  # Extract the version number without leading zeros.
24555  cleaned_value=${BASH_REMATCH[1]}
24556  if test "x$cleaned_value" = x; then
24557    # Special case for zero
24558    cleaned_value=${BASH_REMATCH[2]}
24559  fi
24560
24561  if test $cleaned_value -gt 255; then
24562    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24563  fi
24564  if test "x$cleaned_value" != "x$with_version_build"; then
24565    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24566$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24567  fi
24568  VERSION_BUILD=$cleaned_value
24569
24570    fi
24571  else
24572    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24573      # Default is to not have a build number.
24574      VERSION_BUILD=""
24575      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24576      VERSION_BUILD=0
24577    fi
24578  fi
24579
24580
24581# Check whether --with-version-major was given.
24582if test "${with_version_major+set}" = set; then :
24583  withval=$with_version_major; with_version_major_present=true
24584else
24585  with_version_major_present=false
24586fi
24587
24588
24589  if test "x$with_version_major_present" = xtrue; then
24590    if test "x$with_version_major" = xyes; then
24591      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24592    else
24593
24594  # Additional [] needed to keep m4 from mangling shell constructs.
24595  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24596    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24597  fi
24598  # Extract the version number without leading zeros.
24599  cleaned_value=${BASH_REMATCH[1]}
24600  if test "x$cleaned_value" = x; then
24601    # Special case for zero
24602    cleaned_value=${BASH_REMATCH[2]}
24603  fi
24604
24605  if test $cleaned_value -gt 255; then
24606    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24607  fi
24608  if test "x$cleaned_value" != "x$with_version_major"; then
24609    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24610$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24611  fi
24612  VERSION_MAJOR=$cleaned_value
24613
24614    fi
24615  else
24616    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24617      # Default is to get value from version-numbers
24618      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24619    fi
24620  fi
24621
24622
24623# Check whether --with-version-minor was given.
24624if test "${with_version_minor+set}" = set; then :
24625  withval=$with_version_minor; with_version_minor_present=true
24626else
24627  with_version_minor_present=false
24628fi
24629
24630
24631  if test "x$with_version_minor_present" = xtrue; then
24632    if test "x$with_version_minor" = xyes; then
24633      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24634    elif test "x$with_version_minor" = xno; then
24635      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24636      VERSION_MINOR=0
24637    elif test "x$with_version_minor" = x; then
24638      VERSION_MINOR=0
24639    else
24640
24641  # Additional [] needed to keep m4 from mangling shell constructs.
24642  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24643    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24644  fi
24645  # Extract the version number without leading zeros.
24646  cleaned_value=${BASH_REMATCH[1]}
24647  if test "x$cleaned_value" = x; then
24648    # Special case for zero
24649    cleaned_value=${BASH_REMATCH[2]}
24650  fi
24651
24652  if test $cleaned_value -gt 255; then
24653    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24654  fi
24655  if test "x$cleaned_value" != "x$with_version_minor"; then
24656    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24657$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24658  fi
24659  VERSION_MINOR=$cleaned_value
24660
24661    fi
24662  else
24663    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24664      # Default is 0, if unspecified
24665      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24666    fi
24667  fi
24668
24669
24670# Check whether --with-version-security was given.
24671if test "${with_version_security+set}" = set; then :
24672  withval=$with_version_security; with_version_security_present=true
24673else
24674  with_version_security_present=false
24675fi
24676
24677
24678  if test "x$with_version_security_present" = xtrue; then
24679    if test "x$with_version_security" = xyes; then
24680      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24681    elif test "x$with_version_security" = xno; then
24682      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24683      VERSION_SECURITY=0
24684    elif test "x$with_version_security" = x; then
24685      VERSION_SECURITY=0
24686    else
24687
24688  # Additional [] needed to keep m4 from mangling shell constructs.
24689  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24690    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24691  fi
24692  # Extract the version number without leading zeros.
24693  cleaned_value=${BASH_REMATCH[1]}
24694  if test "x$cleaned_value" = x; then
24695    # Special case for zero
24696    cleaned_value=${BASH_REMATCH[2]}
24697  fi
24698
24699  if test $cleaned_value -gt 255; then
24700    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24701  fi
24702  if test "x$cleaned_value" != "x$with_version_security"; then
24703    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24704$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24705  fi
24706  VERSION_SECURITY=$cleaned_value
24707
24708    fi
24709  else
24710    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24711      # Default is 0, if unspecified
24712      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24713    fi
24714  fi
24715
24716
24717# Check whether --with-version-patch was given.
24718if test "${with_version_patch+set}" = set; then :
24719  withval=$with_version_patch; with_version_patch_present=true
24720else
24721  with_version_patch_present=false
24722fi
24723
24724
24725  if test "x$with_version_patch_present" = xtrue; then
24726    if test "x$with_version_patch" = xyes; then
24727      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24728    elif test "x$with_version_patch" = xno; then
24729      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24730      VERSION_PATCH=0
24731    elif test "x$with_version_patch" = x; then
24732      VERSION_PATCH=0
24733    else
24734
24735  # Additional [] needed to keep m4 from mangling shell constructs.
24736  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24737    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24738  fi
24739  # Extract the version number without leading zeros.
24740  cleaned_value=${BASH_REMATCH[1]}
24741  if test "x$cleaned_value" = x; then
24742    # Special case for zero
24743    cleaned_value=${BASH_REMATCH[2]}
24744  fi
24745
24746  if test $cleaned_value -gt 255; then
24747    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24748  fi
24749  if test "x$cleaned_value" != "x$with_version_patch"; then
24750    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24751$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24752  fi
24753  VERSION_PATCH=$cleaned_value
24754
24755    fi
24756  else
24757    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24758      # Default is 0, if unspecified
24759      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24760    fi
24761  fi
24762
24763  # Calculate derived version properties
24764
24765  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24766  if test "x$VERSION_PRE" = x; then
24767    VERSION_IS_GA=true
24768  else
24769    VERSION_IS_GA=false
24770  fi
24771
24772  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24773  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24774
24775  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24776  # Strip trailing zeroes from stripped_version_number
24777  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24778  VERSION_NUMBER=$stripped_version_number
24779
24780  # The complete version string, with additional build information
24781  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24782    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24783  else
24784    # If either build or opt is set, we need a + separator
24785    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24786  fi
24787
24788  # The short version string, just VERSION_NUMBER and PRE, if present.
24789  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24790
24791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24792$as_echo_n "checking for version string... " >&6; }
24793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24794$as_echo "$VERSION_STRING" >&6; }
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810###############################################################################
24811#
24812# Setup BootJDK, used to bootstrap the build.
24813#
24814###############################################################################
24815
24816
24817  BOOT_JDK_FOUND=no
24818
24819# Check whether --with-boot-jdk was given.
24820if test "${with_boot_jdk+set}" = set; then :
24821  withval=$with_boot_jdk;
24822fi
24823
24824
24825  # We look for the Boot JDK through various means, going from more certain to
24826  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24827  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24828  # must check if this is indeed valid; otherwise we'll continue looking.
24829
24830  # Test: Is bootjdk explicitly set by command line arguments?
24831
24832  if test "x$BOOT_JDK_FOUND" = xno; then
24833    # Now execute the test
24834
24835  if test "x$with_boot_jdk" != x; then
24836    BOOT_JDK=$with_boot_jdk
24837    BOOT_JDK_FOUND=maybe
24838    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24839$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24840  fi
24841
24842
24843    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24844    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24845      # Do we have a bin/java?
24846      if test ! -x "$BOOT_JDK/bin/java"; then
24847        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24849        BOOT_JDK_FOUND=no
24850      else
24851        # Do we have a bin/javac?
24852        if test ! -x "$BOOT_JDK/bin/javac"; then
24853          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24855          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24856$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24857          BOOT_JDK_FOUND=no
24858        else
24859          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24860          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24861
24862          # Extra M4 quote needed to protect [] in grep expression.
24863          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24864          if test "x$FOUND_CORRECT_VERSION" = x; then
24865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24867            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24869            BOOT_JDK_FOUND=no
24870          else
24871            # We're done! :-)
24872            BOOT_JDK_FOUND=yes
24873
24874  # Only process if variable expands to non-empty
24875
24876  if test "x$BOOT_JDK" != x; then
24877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878
24879  # Input might be given as Windows format, start by converting to
24880  # unix format.
24881  path="$BOOT_JDK"
24882  new_path=`$CYGPATH -u "$path"`
24883
24884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24887  # "foo.exe" is OK but "foo" is an error.
24888  #
24889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24890  # It is also a way to make sure we got the proper file name for the real test later on.
24891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24892  if test "x$test_shortpath" = x; then
24893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24896  fi
24897
24898  # Call helper function which possibly converts this using DOS-style short mode.
24899  # If so, the updated path is stored in $new_path.
24900
24901  input_path="$new_path"
24902  # Check if we need to convert this using DOS-style short mode. If the path
24903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24904  # take no chances and rewrite it.
24905  # Note: m4 eats our [], so we need to use [ and ] instead.
24906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24907  if test "x$has_forbidden_chars" != x; then
24908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24912      # Going to short mode and back again did indeed matter. Since short mode is
24913      # case insensitive, let's make it lowercase to improve readability.
24914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915      # Now convert it back to Unix-style (cygpath)
24916      input_path=`$CYGPATH -u "$shortmode_path"`
24917      new_path="$input_path"
24918    fi
24919  fi
24920
24921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24922  if test "x$test_cygdrive_prefix" = x; then
24923    # As a simple fix, exclude /usr/bin since it's not a real path.
24924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24926      # a path prefixed by /cygdrive for fixpath to work.
24927      new_path="$CYGWIN_ROOT_PATH$input_path"
24928    fi
24929  fi
24930
24931
24932  if test "x$path" != "x$new_path"; then
24933    BOOT_JDK="$new_path"
24934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24936  fi
24937
24938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24939
24940  path="$BOOT_JDK"
24941  has_colon=`$ECHO $path | $GREP ^.:`
24942  new_path="$path"
24943  if test "x$has_colon" = x; then
24944    # Not in mixed or Windows style, start by that.
24945    new_path=`cmd //c echo $path`
24946  fi
24947
24948
24949  input_path="$new_path"
24950  # Check if we need to convert this using DOS-style short mode. If the path
24951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24952  # take no chances and rewrite it.
24953  # Note: m4 eats our [], so we need to use [ and ] instead.
24954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24955  if test "x$has_forbidden_chars" != x; then
24956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24958  fi
24959
24960
24961  windows_path="$new_path"
24962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24963    unix_path=`$CYGPATH -u "$windows_path"`
24964    new_path="$unix_path"
24965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24967    new_path="$unix_path"
24968  fi
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24978
24979    else
24980      # We're on a unix platform. Hooray! :)
24981      path="$BOOT_JDK"
24982      has_space=`$ECHO "$path" | $GREP " "`
24983      if test "x$has_space" != x; then
24984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24987      fi
24988
24989      # Use eval to expand a potential ~
24990      eval path="$path"
24991      if test ! -f "$path" && test ! -d "$path"; then
24992        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24993      fi
24994
24995      if test -d "$path"; then
24996        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24997      else
24998        dir="`$DIRNAME "$path"`"
24999        base="`$BASENAME "$path"`"
25000        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25001      fi
25002    fi
25003  fi
25004
25005            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25006$as_echo_n "checking for Boot JDK... " >&6; }
25007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25008$as_echo "$BOOT_JDK" >&6; }
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25010$as_echo_n "checking Boot JDK version... " >&6; }
25011            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25013$as_echo "$BOOT_JDK_VERSION" >&6; }
25014          fi # end check jdk version
25015        fi # end check javac
25016      fi # end check java
25017    fi # end check boot jdk found
25018  fi
25019
25020  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25021    # Having specified an argument which is incorrect will produce an instant failure;
25022    # we should not go on looking
25023    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25024  fi
25025
25026  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25027
25028  if test "x$BOOT_JDK_FOUND" = xno; then
25029    # Now execute the test
25030
25031  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25032    # First check at user selected default
25033
25034  if test "x$BOOT_JDK_FOUND" = xno; then
25035    # Now execute the test
25036
25037  if test -x /usr/libexec/java_home; then
25038    BOOT_JDK=`/usr/libexec/java_home `
25039    BOOT_JDK_FOUND=maybe
25040    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25041$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25042  fi
25043
25044
25045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25047      # Do we have a bin/java?
25048      if test ! -x "$BOOT_JDK/bin/java"; then
25049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25051        BOOT_JDK_FOUND=no
25052      else
25053        # Do we have a bin/javac?
25054        if test ! -x "$BOOT_JDK/bin/javac"; then
25055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25059          BOOT_JDK_FOUND=no
25060        else
25061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25063
25064          # Extra M4 quote needed to protect [] in grep expression.
25065          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25066          if test "x$FOUND_CORRECT_VERSION" = x; then
25067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25071            BOOT_JDK_FOUND=no
25072          else
25073            # We're done! :-)
25074            BOOT_JDK_FOUND=yes
25075
25076  # Only process if variable expands to non-empty
25077
25078  if test "x$BOOT_JDK" != x; then
25079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25080
25081  # Input might be given as Windows format, start by converting to
25082  # unix format.
25083  path="$BOOT_JDK"
25084  new_path=`$CYGPATH -u "$path"`
25085
25086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25089  # "foo.exe" is OK but "foo" is an error.
25090  #
25091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25092  # It is also a way to make sure we got the proper file name for the real test later on.
25093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25094  if test "x$test_shortpath" = x; then
25095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25098  fi
25099
25100  # Call helper function which possibly converts this using DOS-style short mode.
25101  # If so, the updated path is stored in $new_path.
25102
25103  input_path="$new_path"
25104  # Check if we need to convert this using DOS-style short mode. If the path
25105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25106  # take no chances and rewrite it.
25107  # Note: m4 eats our [], so we need to use [ and ] instead.
25108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25109  if test "x$has_forbidden_chars" != x; then
25110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25114      # Going to short mode and back again did indeed matter. Since short mode is
25115      # case insensitive, let's make it lowercase to improve readability.
25116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25117      # Now convert it back to Unix-style (cygpath)
25118      input_path=`$CYGPATH -u "$shortmode_path"`
25119      new_path="$input_path"
25120    fi
25121  fi
25122
25123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25124  if test "x$test_cygdrive_prefix" = x; then
25125    # As a simple fix, exclude /usr/bin since it's not a real path.
25126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25128      # a path prefixed by /cygdrive for fixpath to work.
25129      new_path="$CYGWIN_ROOT_PATH$input_path"
25130    fi
25131  fi
25132
25133
25134  if test "x$path" != "x$new_path"; then
25135    BOOT_JDK="$new_path"
25136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25138  fi
25139
25140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25141
25142  path="$BOOT_JDK"
25143  has_colon=`$ECHO $path | $GREP ^.:`
25144  new_path="$path"
25145  if test "x$has_colon" = x; then
25146    # Not in mixed or Windows style, start by that.
25147    new_path=`cmd //c echo $path`
25148  fi
25149
25150
25151  input_path="$new_path"
25152  # Check if we need to convert this using DOS-style short mode. If the path
25153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25154  # take no chances and rewrite it.
25155  # Note: m4 eats our [], so we need to use [ and ] instead.
25156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25157  if test "x$has_forbidden_chars" != x; then
25158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25160  fi
25161
25162
25163  windows_path="$new_path"
25164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25165    unix_path=`$CYGPATH -u "$windows_path"`
25166    new_path="$unix_path"
25167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25169    new_path="$unix_path"
25170  fi
25171
25172  if test "x$path" != "x$new_path"; then
25173    BOOT_JDK="$new_path"
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25176  fi
25177
25178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25180
25181    else
25182      # We're on a unix platform. Hooray! :)
25183      path="$BOOT_JDK"
25184      has_space=`$ECHO "$path" | $GREP " "`
25185      if test "x$has_space" != x; then
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25189      fi
25190
25191      # Use eval to expand a potential ~
25192      eval path="$path"
25193      if test ! -f "$path" && test ! -d "$path"; then
25194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25195      fi
25196
25197      if test -d "$path"; then
25198        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25199      else
25200        dir="`$DIRNAME "$path"`"
25201        base="`$BASENAME "$path"`"
25202        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25203      fi
25204    fi
25205  fi
25206
25207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25208$as_echo_n "checking for Boot JDK... " >&6; }
25209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25210$as_echo "$BOOT_JDK" >&6; }
25211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25212$as_echo_n "checking Boot JDK version... " >&6; }
25213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25215$as_echo "$BOOT_JDK_VERSION" >&6; }
25216          fi # end check jdk version
25217        fi # end check javac
25218      fi # end check java
25219    fi # end check boot jdk found
25220  fi
25221
25222    # If that did not work out (e.g. too old), try explicit versions instead
25223
25224  if test "x$BOOT_JDK_FOUND" = xno; then
25225    # Now execute the test
25226
25227  if test -x /usr/libexec/java_home; then
25228    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25229    BOOT_JDK_FOUND=maybe
25230    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25231$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25232  fi
25233
25234
25235    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25236    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25237      # Do we have a bin/java?
25238      if test ! -x "$BOOT_JDK/bin/java"; then
25239        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25241        BOOT_JDK_FOUND=no
25242      else
25243        # Do we have a bin/javac?
25244        if test ! -x "$BOOT_JDK/bin/javac"; then
25245          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25247          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25248$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25249          BOOT_JDK_FOUND=no
25250        else
25251          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25252          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25253
25254          # Extra M4 quote needed to protect [] in grep expression.
25255          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25256          if test "x$FOUND_CORRECT_VERSION" = x; then
25257            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25259            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25260$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25261            BOOT_JDK_FOUND=no
25262          else
25263            # We're done! :-)
25264            BOOT_JDK_FOUND=yes
25265
25266  # Only process if variable expands to non-empty
25267
25268  if test "x$BOOT_JDK" != x; then
25269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25270
25271  # Input might be given as Windows format, start by converting to
25272  # unix format.
25273  path="$BOOT_JDK"
25274  new_path=`$CYGPATH -u "$path"`
25275
25276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25279  # "foo.exe" is OK but "foo" is an error.
25280  #
25281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25282  # It is also a way to make sure we got the proper file name for the real test later on.
25283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25284  if test "x$test_shortpath" = x; then
25285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25287    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25288  fi
25289
25290  # Call helper function which possibly converts this using DOS-style short mode.
25291  # If so, the updated path is stored in $new_path.
25292
25293  input_path="$new_path"
25294  # Check if we need to convert this using DOS-style short mode. If the path
25295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25296  # take no chances and rewrite it.
25297  # Note: m4 eats our [], so we need to use [ and ] instead.
25298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25299  if test "x$has_forbidden_chars" != x; then
25300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25304      # Going to short mode and back again did indeed matter. Since short mode is
25305      # case insensitive, let's make it lowercase to improve readability.
25306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25307      # Now convert it back to Unix-style (cygpath)
25308      input_path=`$CYGPATH -u "$shortmode_path"`
25309      new_path="$input_path"
25310    fi
25311  fi
25312
25313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25314  if test "x$test_cygdrive_prefix" = x; then
25315    # As a simple fix, exclude /usr/bin since it's not a real path.
25316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25318      # a path prefixed by /cygdrive for fixpath to work.
25319      new_path="$CYGWIN_ROOT_PATH$input_path"
25320    fi
25321  fi
25322
25323
25324  if test "x$path" != "x$new_path"; then
25325    BOOT_JDK="$new_path"
25326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25328  fi
25329
25330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25331
25332  path="$BOOT_JDK"
25333  has_colon=`$ECHO $path | $GREP ^.:`
25334  new_path="$path"
25335  if test "x$has_colon" = x; then
25336    # Not in mixed or Windows style, start by that.
25337    new_path=`cmd //c echo $path`
25338  fi
25339
25340
25341  input_path="$new_path"
25342  # Check if we need to convert this using DOS-style short mode. If the path
25343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25344  # take no chances and rewrite it.
25345  # Note: m4 eats our [], so we need to use [ and ] instead.
25346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25347  if test "x$has_forbidden_chars" != x; then
25348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25350  fi
25351
25352
25353  windows_path="$new_path"
25354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25355    unix_path=`$CYGPATH -u "$windows_path"`
25356    new_path="$unix_path"
25357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25359    new_path="$unix_path"
25360  fi
25361
25362  if test "x$path" != "x$new_path"; then
25363    BOOT_JDK="$new_path"
25364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25366  fi
25367
25368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25370
25371    else
25372      # We're on a unix platform. Hooray! :)
25373      path="$BOOT_JDK"
25374      has_space=`$ECHO "$path" | $GREP " "`
25375      if test "x$has_space" != x; then
25376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25379      fi
25380
25381      # Use eval to expand a potential ~
25382      eval path="$path"
25383      if test ! -f "$path" && test ! -d "$path"; then
25384        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25385      fi
25386
25387      if test -d "$path"; then
25388        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25389      else
25390        dir="`$DIRNAME "$path"`"
25391        base="`$BASENAME "$path"`"
25392        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25393      fi
25394    fi
25395  fi
25396
25397            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25398$as_echo_n "checking for Boot JDK... " >&6; }
25399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25400$as_echo "$BOOT_JDK" >&6; }
25401            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25402$as_echo_n "checking Boot JDK version... " >&6; }
25403            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25404            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25405$as_echo "$BOOT_JDK_VERSION" >&6; }
25406          fi # end check jdk version
25407        fi # end check javac
25408      fi # end check java
25409    fi # end check boot jdk found
25410  fi
25411
25412
25413  if test "x$BOOT_JDK_FOUND" = xno; then
25414    # Now execute the test
25415
25416  if test -x /usr/libexec/java_home; then
25417    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25418    BOOT_JDK_FOUND=maybe
25419    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25420$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25421  fi
25422
25423
25424    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25425    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25426      # Do we have a bin/java?
25427      if test ! -x "$BOOT_JDK/bin/java"; then
25428        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25430        BOOT_JDK_FOUND=no
25431      else
25432        # Do we have a bin/javac?
25433        if test ! -x "$BOOT_JDK/bin/javac"; then
25434          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25436          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25437$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25438          BOOT_JDK_FOUND=no
25439        else
25440          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25441          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25442
25443          # Extra M4 quote needed to protect [] in grep expression.
25444          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25445          if test "x$FOUND_CORRECT_VERSION" = x; then
25446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25448            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25449$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25450            BOOT_JDK_FOUND=no
25451          else
25452            # We're done! :-)
25453            BOOT_JDK_FOUND=yes
25454
25455  # Only process if variable expands to non-empty
25456
25457  if test "x$BOOT_JDK" != x; then
25458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459
25460  # Input might be given as Windows format, start by converting to
25461  # unix format.
25462  path="$BOOT_JDK"
25463  new_path=`$CYGPATH -u "$path"`
25464
25465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25468  # "foo.exe" is OK but "foo" is an error.
25469  #
25470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25471  # It is also a way to make sure we got the proper file name for the real test later on.
25472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25473  if test "x$test_shortpath" = x; then
25474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25477  fi
25478
25479  # Call helper function which possibly converts this using DOS-style short mode.
25480  # If so, the updated path is stored in $new_path.
25481
25482  input_path="$new_path"
25483  # Check if we need to convert this using DOS-style short mode. If the path
25484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485  # take no chances and rewrite it.
25486  # Note: m4 eats our [], so we need to use [ and ] instead.
25487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25488  if test "x$has_forbidden_chars" != x; then
25489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25493      # Going to short mode and back again did indeed matter. Since short mode is
25494      # case insensitive, let's make it lowercase to improve readability.
25495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25496      # Now convert it back to Unix-style (cygpath)
25497      input_path=`$CYGPATH -u "$shortmode_path"`
25498      new_path="$input_path"
25499    fi
25500  fi
25501
25502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25503  if test "x$test_cygdrive_prefix" = x; then
25504    # As a simple fix, exclude /usr/bin since it's not a real path.
25505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25507      # a path prefixed by /cygdrive for fixpath to work.
25508      new_path="$CYGWIN_ROOT_PATH$input_path"
25509    fi
25510  fi
25511
25512
25513  if test "x$path" != "x$new_path"; then
25514    BOOT_JDK="$new_path"
25515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25517  fi
25518
25519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520
25521  path="$BOOT_JDK"
25522  has_colon=`$ECHO $path | $GREP ^.:`
25523  new_path="$path"
25524  if test "x$has_colon" = x; then
25525    # Not in mixed or Windows style, start by that.
25526    new_path=`cmd //c echo $path`
25527  fi
25528
25529
25530  input_path="$new_path"
25531  # Check if we need to convert this using DOS-style short mode. If the path
25532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25533  # take no chances and rewrite it.
25534  # Note: m4 eats our [], so we need to use [ and ] instead.
25535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25536  if test "x$has_forbidden_chars" != x; then
25537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539  fi
25540
25541
25542  windows_path="$new_path"
25543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544    unix_path=`$CYGPATH -u "$windows_path"`
25545    new_path="$unix_path"
25546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548    new_path="$unix_path"
25549  fi
25550
25551  if test "x$path" != "x$new_path"; then
25552    BOOT_JDK="$new_path"
25553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25555  fi
25556
25557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25559
25560    else
25561      # We're on a unix platform. Hooray! :)
25562      path="$BOOT_JDK"
25563      has_space=`$ECHO "$path" | $GREP " "`
25564      if test "x$has_space" != x; then
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25568      fi
25569
25570      # Use eval to expand a potential ~
25571      eval path="$path"
25572      if test ! -f "$path" && test ! -d "$path"; then
25573        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25574      fi
25575
25576      if test -d "$path"; then
25577        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25578      else
25579        dir="`$DIRNAME "$path"`"
25580        base="`$BASENAME "$path"`"
25581        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25582      fi
25583    fi
25584  fi
25585
25586            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25587$as_echo_n "checking for Boot JDK... " >&6; }
25588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25589$as_echo "$BOOT_JDK" >&6; }
25590            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25591$as_echo_n "checking Boot JDK version... " >&6; }
25592            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25594$as_echo "$BOOT_JDK_VERSION" >&6; }
25595          fi # end check jdk version
25596        fi # end check javac
25597      fi # end check java
25598    fi # end check boot jdk found
25599  fi
25600
25601
25602  if test "x$BOOT_JDK_FOUND" = xno; then
25603    # Now execute the test
25604
25605  if test -x /usr/libexec/java_home; then
25606    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25607    BOOT_JDK_FOUND=maybe
25608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25609$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25610  fi
25611
25612
25613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25615      # Do we have a bin/java?
25616      if test ! -x "$BOOT_JDK/bin/java"; then
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25619        BOOT_JDK_FOUND=no
25620      else
25621        # Do we have a bin/javac?
25622        if test ! -x "$BOOT_JDK/bin/javac"; then
25623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25627          BOOT_JDK_FOUND=no
25628        else
25629          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25630          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25631
25632          # Extra M4 quote needed to protect [] in grep expression.
25633          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25634          if test "x$FOUND_CORRECT_VERSION" = x; then
25635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25637            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25639            BOOT_JDK_FOUND=no
25640          else
25641            # We're done! :-)
25642            BOOT_JDK_FOUND=yes
25643
25644  # Only process if variable expands to non-empty
25645
25646  if test "x$BOOT_JDK" != x; then
25647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25648
25649  # Input might be given as Windows format, start by converting to
25650  # unix format.
25651  path="$BOOT_JDK"
25652  new_path=`$CYGPATH -u "$path"`
25653
25654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25657  # "foo.exe" is OK but "foo" is an error.
25658  #
25659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25660  # It is also a way to make sure we got the proper file name for the real test later on.
25661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25662  if test "x$test_shortpath" = x; then
25663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25666  fi
25667
25668  # Call helper function which possibly converts this using DOS-style short mode.
25669  # If so, the updated path is stored in $new_path.
25670
25671  input_path="$new_path"
25672  # Check if we need to convert this using DOS-style short mode. If the path
25673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25674  # take no chances and rewrite it.
25675  # Note: m4 eats our [], so we need to use [ and ] instead.
25676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25677  if test "x$has_forbidden_chars" != x; then
25678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25682      # Going to short mode and back again did indeed matter. Since short mode is
25683      # case insensitive, let's make it lowercase to improve readability.
25684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25685      # Now convert it back to Unix-style (cygpath)
25686      input_path=`$CYGPATH -u "$shortmode_path"`
25687      new_path="$input_path"
25688    fi
25689  fi
25690
25691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25692  if test "x$test_cygdrive_prefix" = x; then
25693    # As a simple fix, exclude /usr/bin since it's not a real path.
25694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25696      # a path prefixed by /cygdrive for fixpath to work.
25697      new_path="$CYGWIN_ROOT_PATH$input_path"
25698    fi
25699  fi
25700
25701
25702  if test "x$path" != "x$new_path"; then
25703    BOOT_JDK="$new_path"
25704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25706  fi
25707
25708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25709
25710  path="$BOOT_JDK"
25711  has_colon=`$ECHO $path | $GREP ^.:`
25712  new_path="$path"
25713  if test "x$has_colon" = x; then
25714    # Not in mixed or Windows style, start by that.
25715    new_path=`cmd //c echo $path`
25716  fi
25717
25718
25719  input_path="$new_path"
25720  # Check if we need to convert this using DOS-style short mode. If the path
25721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25722  # take no chances and rewrite it.
25723  # Note: m4 eats our [], so we need to use [ and ] instead.
25724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25725  if test "x$has_forbidden_chars" != x; then
25726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25728  fi
25729
25730
25731  windows_path="$new_path"
25732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733    unix_path=`$CYGPATH -u "$windows_path"`
25734    new_path="$unix_path"
25735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737    new_path="$unix_path"
25738  fi
25739
25740  if test "x$path" != "x$new_path"; then
25741    BOOT_JDK="$new_path"
25742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25744  fi
25745
25746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25748
25749    else
25750      # We're on a unix platform. Hooray! :)
25751      path="$BOOT_JDK"
25752      has_space=`$ECHO "$path" | $GREP " "`
25753      if test "x$has_space" != x; then
25754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25757      fi
25758
25759      # Use eval to expand a potential ~
25760      eval path="$path"
25761      if test ! -f "$path" && test ! -d "$path"; then
25762        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25763      fi
25764
25765      if test -d "$path"; then
25766        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25767      else
25768        dir="`$DIRNAME "$path"`"
25769        base="`$BASENAME "$path"`"
25770        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25771      fi
25772    fi
25773  fi
25774
25775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25776$as_echo_n "checking for Boot JDK... " >&6; }
25777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25778$as_echo "$BOOT_JDK" >&6; }
25779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25780$as_echo_n "checking Boot JDK version... " >&6; }
25781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25783$as_echo "$BOOT_JDK_VERSION" >&6; }
25784          fi # end check jdk version
25785        fi # end check javac
25786      fi # end check java
25787    fi # end check boot jdk found
25788  fi
25789
25790  fi
25791
25792
25793    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25794    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25795      # Do we have a bin/java?
25796      if test ! -x "$BOOT_JDK/bin/java"; then
25797        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25799        BOOT_JDK_FOUND=no
25800      else
25801        # Do we have a bin/javac?
25802        if test ! -x "$BOOT_JDK/bin/javac"; then
25803          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25805          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25806$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25807          BOOT_JDK_FOUND=no
25808        else
25809          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25810          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25811
25812          # Extra M4 quote needed to protect [] in grep expression.
25813          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25814          if test "x$FOUND_CORRECT_VERSION" = x; then
25815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25817            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25818$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25819            BOOT_JDK_FOUND=no
25820          else
25821            # We're done! :-)
25822            BOOT_JDK_FOUND=yes
25823
25824  # Only process if variable expands to non-empty
25825
25826  if test "x$BOOT_JDK" != x; then
25827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25828
25829  # Input might be given as Windows format, start by converting to
25830  # unix format.
25831  path="$BOOT_JDK"
25832  new_path=`$CYGPATH -u "$path"`
25833
25834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25837  # "foo.exe" is OK but "foo" is an error.
25838  #
25839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25840  # It is also a way to make sure we got the proper file name for the real test later on.
25841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25842  if test "x$test_shortpath" = x; then
25843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25845    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25846  fi
25847
25848  # Call helper function which possibly converts this using DOS-style short mode.
25849  # If so, the updated path is stored in $new_path.
25850
25851  input_path="$new_path"
25852  # Check if we need to convert this using DOS-style short mode. If the path
25853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25854  # take no chances and rewrite it.
25855  # Note: m4 eats our [], so we need to use [ and ] instead.
25856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25857  if test "x$has_forbidden_chars" != x; then
25858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25862      # Going to short mode and back again did indeed matter. Since short mode is
25863      # case insensitive, let's make it lowercase to improve readability.
25864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25865      # Now convert it back to Unix-style (cygpath)
25866      input_path=`$CYGPATH -u "$shortmode_path"`
25867      new_path="$input_path"
25868    fi
25869  fi
25870
25871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25872  if test "x$test_cygdrive_prefix" = x; then
25873    # As a simple fix, exclude /usr/bin since it's not a real path.
25874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25876      # a path prefixed by /cygdrive for fixpath to work.
25877      new_path="$CYGWIN_ROOT_PATH$input_path"
25878    fi
25879  fi
25880
25881
25882  if test "x$path" != "x$new_path"; then
25883    BOOT_JDK="$new_path"
25884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25886  fi
25887
25888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25889
25890  path="$BOOT_JDK"
25891  has_colon=`$ECHO $path | $GREP ^.:`
25892  new_path="$path"
25893  if test "x$has_colon" = x; then
25894    # Not in mixed or Windows style, start by that.
25895    new_path=`cmd //c echo $path`
25896  fi
25897
25898
25899  input_path="$new_path"
25900  # Check if we need to convert this using DOS-style short mode. If the path
25901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25902  # take no chances and rewrite it.
25903  # Note: m4 eats our [], so we need to use [ and ] instead.
25904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25905  if test "x$has_forbidden_chars" != x; then
25906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25908  fi
25909
25910
25911  windows_path="$new_path"
25912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25913    unix_path=`$CYGPATH -u "$windows_path"`
25914    new_path="$unix_path"
25915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25917    new_path="$unix_path"
25918  fi
25919
25920  if test "x$path" != "x$new_path"; then
25921    BOOT_JDK="$new_path"
25922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25924  fi
25925
25926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25928
25929    else
25930      # We're on a unix platform. Hooray! :)
25931      path="$BOOT_JDK"
25932      has_space=`$ECHO "$path" | $GREP " "`
25933      if test "x$has_space" != x; then
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25937      fi
25938
25939      # Use eval to expand a potential ~
25940      eval path="$path"
25941      if test ! -f "$path" && test ! -d "$path"; then
25942        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25943      fi
25944
25945      if test -d "$path"; then
25946        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25947      else
25948        dir="`$DIRNAME "$path"`"
25949        base="`$BASENAME "$path"`"
25950        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25951      fi
25952    fi
25953  fi
25954
25955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25956$as_echo_n "checking for Boot JDK... " >&6; }
25957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25958$as_echo "$BOOT_JDK" >&6; }
25959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25960$as_echo_n "checking Boot JDK version... " >&6; }
25961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25963$as_echo "$BOOT_JDK_VERSION" >&6; }
25964          fi # end check jdk version
25965        fi # end check javac
25966      fi # end check java
25967    fi # end check boot jdk found
25968  fi
25969
25970
25971  # Test: Is $JAVA_HOME set?
25972
25973  if test "x$BOOT_JDK_FOUND" = xno; then
25974    # Now execute the test
25975
25976  if test "x$JAVA_HOME" != x; then
25977    JAVA_HOME_PROCESSED="$JAVA_HOME"
25978
25979  # Only process if variable expands to non-empty
25980
25981  if test "x$JAVA_HOME_PROCESSED" != x; then
25982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983
25984  # Input might be given as Windows format, start by converting to
25985  # unix format.
25986  path="$JAVA_HOME_PROCESSED"
25987  new_path=`$CYGPATH -u "$path"`
25988
25989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25992  # "foo.exe" is OK but "foo" is an error.
25993  #
25994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25995  # It is also a way to make sure we got the proper file name for the real test later on.
25996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25997  if test "x$test_shortpath" = x; then
25998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25999$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26000    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26001  fi
26002
26003  # Call helper function which possibly converts this using DOS-style short mode.
26004  # If so, the updated path is stored in $new_path.
26005
26006  input_path="$new_path"
26007  # Check if we need to convert this using DOS-style short mode. If the path
26008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009  # take no chances and rewrite it.
26010  # Note: m4 eats our [], so we need to use [ and ] instead.
26011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26012  if test "x$has_forbidden_chars" != x; then
26013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26017      # Going to short mode and back again did indeed matter. Since short mode is
26018      # case insensitive, let's make it lowercase to improve readability.
26019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020      # Now convert it back to Unix-style (cygpath)
26021      input_path=`$CYGPATH -u "$shortmode_path"`
26022      new_path="$input_path"
26023    fi
26024  fi
26025
26026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26027  if test "x$test_cygdrive_prefix" = x; then
26028    # As a simple fix, exclude /usr/bin since it's not a real path.
26029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26031      # a path prefixed by /cygdrive for fixpath to work.
26032      new_path="$CYGWIN_ROOT_PATH$input_path"
26033    fi
26034  fi
26035
26036
26037  if test "x$path" != "x$new_path"; then
26038    JAVA_HOME_PROCESSED="$new_path"
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26040$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26041  fi
26042
26043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044
26045  path="$JAVA_HOME_PROCESSED"
26046  has_colon=`$ECHO $path | $GREP ^.:`
26047  new_path="$path"
26048  if test "x$has_colon" = x; then
26049    # Not in mixed or Windows style, start by that.
26050    new_path=`cmd //c echo $path`
26051  fi
26052
26053
26054  input_path="$new_path"
26055  # Check if we need to convert this using DOS-style short mode. If the path
26056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26057  # take no chances and rewrite it.
26058  # Note: m4 eats our [], so we need to use [ and ] instead.
26059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26060  if test "x$has_forbidden_chars" != x; then
26061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26063  fi
26064
26065
26066  windows_path="$new_path"
26067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068    unix_path=`$CYGPATH -u "$windows_path"`
26069    new_path="$unix_path"
26070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072    new_path="$unix_path"
26073  fi
26074
26075  if test "x$path" != "x$new_path"; then
26076    JAVA_HOME_PROCESSED="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26079  fi
26080
26081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26083
26084    else
26085      # We're on a unix platform. Hooray! :)
26086      path="$JAVA_HOME_PROCESSED"
26087      has_space=`$ECHO "$path" | $GREP " "`
26088      if test "x$has_space" != x; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26090$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26092      fi
26093
26094      # Use eval to expand a potential ~
26095      eval path="$path"
26096      if test ! -f "$path" && test ! -d "$path"; then
26097        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26098      fi
26099
26100      if test -d "$path"; then
26101        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26102      else
26103        dir="`$DIRNAME "$path"`"
26104        base="`$BASENAME "$path"`"
26105        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26106      fi
26107    fi
26108  fi
26109
26110    if test ! -d "$JAVA_HOME_PROCESSED"; then
26111      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26112$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26113    else
26114      # Aha, the user has set a JAVA_HOME
26115      # let us use that as the Boot JDK.
26116      BOOT_JDK="$JAVA_HOME_PROCESSED"
26117      BOOT_JDK_FOUND=maybe
26118      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26119$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26120    fi
26121  fi
26122
26123
26124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26126      # Do we have a bin/java?
26127      if test ! -x "$BOOT_JDK/bin/java"; then
26128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26130        BOOT_JDK_FOUND=no
26131      else
26132        # Do we have a bin/javac?
26133        if test ! -x "$BOOT_JDK/bin/javac"; then
26134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26138          BOOT_JDK_FOUND=no
26139        else
26140          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26141          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26142
26143          # Extra M4 quote needed to protect [] in grep expression.
26144          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26145          if test "x$FOUND_CORRECT_VERSION" = x; then
26146            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26148            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26149$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26150            BOOT_JDK_FOUND=no
26151          else
26152            # We're done! :-)
26153            BOOT_JDK_FOUND=yes
26154
26155  # Only process if variable expands to non-empty
26156
26157  if test "x$BOOT_JDK" != x; then
26158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26159
26160  # Input might be given as Windows format, start by converting to
26161  # unix format.
26162  path="$BOOT_JDK"
26163  new_path=`$CYGPATH -u "$path"`
26164
26165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26168  # "foo.exe" is OK but "foo" is an error.
26169  #
26170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26171  # It is also a way to make sure we got the proper file name for the real test later on.
26172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26173  if test "x$test_shortpath" = x; then
26174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26176    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26177  fi
26178
26179  # Call helper function which possibly converts this using DOS-style short mode.
26180  # If so, the updated path is stored in $new_path.
26181
26182  input_path="$new_path"
26183  # Check if we need to convert this using DOS-style short mode. If the path
26184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26185  # take no chances and rewrite it.
26186  # Note: m4 eats our [], so we need to use [ and ] instead.
26187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26188  if test "x$has_forbidden_chars" != x; then
26189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26193      # Going to short mode and back again did indeed matter. Since short mode is
26194      # case insensitive, let's make it lowercase to improve readability.
26195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26196      # Now convert it back to Unix-style (cygpath)
26197      input_path=`$CYGPATH -u "$shortmode_path"`
26198      new_path="$input_path"
26199    fi
26200  fi
26201
26202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26203  if test "x$test_cygdrive_prefix" = x; then
26204    # As a simple fix, exclude /usr/bin since it's not a real path.
26205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26207      # a path prefixed by /cygdrive for fixpath to work.
26208      new_path="$CYGWIN_ROOT_PATH$input_path"
26209    fi
26210  fi
26211
26212
26213  if test "x$path" != "x$new_path"; then
26214    BOOT_JDK="$new_path"
26215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26216$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26217  fi
26218
26219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26220
26221  path="$BOOT_JDK"
26222  has_colon=`$ECHO $path | $GREP ^.:`
26223  new_path="$path"
26224  if test "x$has_colon" = x; then
26225    # Not in mixed or Windows style, start by that.
26226    new_path=`cmd //c echo $path`
26227  fi
26228
26229
26230  input_path="$new_path"
26231  # Check if we need to convert this using DOS-style short mode. If the path
26232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26233  # take no chances and rewrite it.
26234  # Note: m4 eats our [], so we need to use [ and ] instead.
26235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26236  if test "x$has_forbidden_chars" != x; then
26237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26239  fi
26240
26241
26242  windows_path="$new_path"
26243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26244    unix_path=`$CYGPATH -u "$windows_path"`
26245    new_path="$unix_path"
26246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26248    new_path="$unix_path"
26249  fi
26250
26251  if test "x$path" != "x$new_path"; then
26252    BOOT_JDK="$new_path"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255  fi
26256
26257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26259
26260    else
26261      # We're on a unix platform. Hooray! :)
26262      path="$BOOT_JDK"
26263      has_space=`$ECHO "$path" | $GREP " "`
26264      if test "x$has_space" != x; then
26265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26267        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26268      fi
26269
26270      # Use eval to expand a potential ~
26271      eval path="$path"
26272      if test ! -f "$path" && test ! -d "$path"; then
26273        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26274      fi
26275
26276      if test -d "$path"; then
26277        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26278      else
26279        dir="`$DIRNAME "$path"`"
26280        base="`$BASENAME "$path"`"
26281        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26282      fi
26283    fi
26284  fi
26285
26286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26287$as_echo_n "checking for Boot JDK... " >&6; }
26288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26289$as_echo "$BOOT_JDK" >&6; }
26290            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26291$as_echo_n "checking Boot JDK version... " >&6; }
26292            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26294$as_echo "$BOOT_JDK_VERSION" >&6; }
26295          fi # end check jdk version
26296        fi # end check javac
26297      fi # end check java
26298    fi # end check boot jdk found
26299  fi
26300
26301
26302  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26303
26304  if test "x$BOOT_JDK_FOUND" = xno; then
26305    # Now execute the test
26306
26307  # Extract the first word of "javac", so it can be a program name with args.
26308set dummy javac; ac_word=$2
26309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26310$as_echo_n "checking for $ac_word... " >&6; }
26311if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26312  $as_echo_n "(cached) " >&6
26313else
26314  case $JAVAC_CHECK in
26315  [\\/]* | ?:[\\/]*)
26316  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26317  ;;
26318  *)
26319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26320for as_dir in $PATH
26321do
26322  IFS=$as_save_IFS
26323  test -z "$as_dir" && as_dir=.
26324    for ac_exec_ext in '' $ac_executable_extensions; do
26325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26326    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26328    break 2
26329  fi
26330done
26331  done
26332IFS=$as_save_IFS
26333
26334  ;;
26335esac
26336fi
26337JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26338if test -n "$JAVAC_CHECK"; then
26339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26340$as_echo "$JAVAC_CHECK" >&6; }
26341else
26342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26343$as_echo "no" >&6; }
26344fi
26345
26346
26347  # Extract the first word of "java", so it can be a program name with args.
26348set dummy java; ac_word=$2
26349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26350$as_echo_n "checking for $ac_word... " >&6; }
26351if ${ac_cv_path_JAVA_CHECK+:} false; then :
26352  $as_echo_n "(cached) " >&6
26353else
26354  case $JAVA_CHECK in
26355  [\\/]* | ?:[\\/]*)
26356  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26357  ;;
26358  *)
26359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26360for as_dir in $PATH
26361do
26362  IFS=$as_save_IFS
26363  test -z "$as_dir" && as_dir=.
26364    for ac_exec_ext in '' $ac_executable_extensions; do
26365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26366    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26368    break 2
26369  fi
26370done
26371  done
26372IFS=$as_save_IFS
26373
26374  ;;
26375esac
26376fi
26377JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26378if test -n "$JAVA_CHECK"; then
26379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26380$as_echo "$JAVA_CHECK" >&6; }
26381else
26382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26383$as_echo "no" >&6; }
26384fi
26385
26386
26387  BINARY="$JAVAC_CHECK"
26388  if test "x$JAVAC_CHECK" = x; then
26389    BINARY="$JAVA_CHECK"
26390  fi
26391  if test "x$BINARY" != x; then
26392    # So there is a java(c) binary, it might be part of a JDK.
26393    # Lets find the JDK/JRE directory by following symbolic links.
26394    # Linux/GNU systems often have links from /usr/bin/java to
26395    # /etc/alternatives/java to the real JDK binary.
26396
26397  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26398    # Follow a chain of symbolic links. Use readlink
26399    # where it exists, else fall back to horribly
26400    # complicated shell code.
26401    if test "x$READLINK_TESTED" != yes; then
26402      # On MacOSX there is a readlink tool with a different
26403      # purpose than the GNU readlink tool. Check the found readlink.
26404      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26405      if test "x$ISGNU" = x; then
26406        # A readlink that we do not know how to use.
26407        # Are there other non-GNU readlinks out there?
26408        READLINK_TESTED=yes
26409        READLINK=
26410      fi
26411    fi
26412
26413    if test "x$READLINK" != x; then
26414      BINARY=`$READLINK -f $BINARY`
26415    else
26416      # Save the current directory for restoring afterwards
26417      STARTDIR=$PWD
26418      COUNTER=0
26419      sym_link_dir=`$DIRNAME $BINARY`
26420      sym_link_file=`$BASENAME $BINARY`
26421      cd $sym_link_dir
26422      # Use -P flag to resolve symlinks in directories.
26423      cd `$THEPWDCMD -P`
26424      sym_link_dir=`$THEPWDCMD -P`
26425      # Resolve file symlinks
26426      while test $COUNTER -lt 20; do
26427        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26428        if test "x$ISLINK" == x; then
26429          # This is not a symbolic link! We are done!
26430          break
26431        fi
26432        # Again resolve directory symlinks since the target of the just found
26433        # link could be in a different directory
26434        cd `$DIRNAME $ISLINK`
26435        sym_link_dir=`$THEPWDCMD -P`
26436        sym_link_file=`$BASENAME $ISLINK`
26437        let COUNTER=COUNTER+1
26438      done
26439      cd $STARTDIR
26440      BINARY=$sym_link_dir/$sym_link_file
26441    fi
26442  fi
26443
26444    BOOT_JDK=`dirname "$BINARY"`
26445    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26446    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26447      # Looks like we found ourselves an JDK
26448      BOOT_JDK_FOUND=maybe
26449      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26450$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26451    fi
26452  fi
26453
26454
26455    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26456    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26457      # Do we have a bin/java?
26458      if test ! -x "$BOOT_JDK/bin/java"; then
26459        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26461        BOOT_JDK_FOUND=no
26462      else
26463        # Do we have a bin/javac?
26464        if test ! -x "$BOOT_JDK/bin/javac"; then
26465          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26467          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26468$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26469          BOOT_JDK_FOUND=no
26470        else
26471          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26472          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26473
26474          # Extra M4 quote needed to protect [] in grep expression.
26475          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26476          if test "x$FOUND_CORRECT_VERSION" = x; then
26477            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26479            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26480$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26481            BOOT_JDK_FOUND=no
26482          else
26483            # We're done! :-)
26484            BOOT_JDK_FOUND=yes
26485
26486  # Only process if variable expands to non-empty
26487
26488  if test "x$BOOT_JDK" != x; then
26489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26490
26491  # Input might be given as Windows format, start by converting to
26492  # unix format.
26493  path="$BOOT_JDK"
26494  new_path=`$CYGPATH -u "$path"`
26495
26496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26499  # "foo.exe" is OK but "foo" is an error.
26500  #
26501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26502  # It is also a way to make sure we got the proper file name for the real test later on.
26503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26504  if test "x$test_shortpath" = x; then
26505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26507    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26508  fi
26509
26510  # Call helper function which possibly converts this using DOS-style short mode.
26511  # If so, the updated path is stored in $new_path.
26512
26513  input_path="$new_path"
26514  # Check if we need to convert this using DOS-style short mode. If the path
26515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26516  # take no chances and rewrite it.
26517  # Note: m4 eats our [], so we need to use [ and ] instead.
26518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26519  if test "x$has_forbidden_chars" != x; then
26520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26524      # Going to short mode and back again did indeed matter. Since short mode is
26525      # case insensitive, let's make it lowercase to improve readability.
26526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26527      # Now convert it back to Unix-style (cygpath)
26528      input_path=`$CYGPATH -u "$shortmode_path"`
26529      new_path="$input_path"
26530    fi
26531  fi
26532
26533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26534  if test "x$test_cygdrive_prefix" = x; then
26535    # As a simple fix, exclude /usr/bin since it's not a real path.
26536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26538      # a path prefixed by /cygdrive for fixpath to work.
26539      new_path="$CYGWIN_ROOT_PATH$input_path"
26540    fi
26541  fi
26542
26543
26544  if test "x$path" != "x$new_path"; then
26545    BOOT_JDK="$new_path"
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26548  fi
26549
26550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26551
26552  path="$BOOT_JDK"
26553  has_colon=`$ECHO $path | $GREP ^.:`
26554  new_path="$path"
26555  if test "x$has_colon" = x; then
26556    # Not in mixed or Windows style, start by that.
26557    new_path=`cmd //c echo $path`
26558  fi
26559
26560
26561  input_path="$new_path"
26562  # Check if we need to convert this using DOS-style short mode. If the path
26563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26564  # take no chances and rewrite it.
26565  # Note: m4 eats our [], so we need to use [ and ] instead.
26566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26567  if test "x$has_forbidden_chars" != x; then
26568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26570  fi
26571
26572
26573  windows_path="$new_path"
26574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26575    unix_path=`$CYGPATH -u "$windows_path"`
26576    new_path="$unix_path"
26577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26579    new_path="$unix_path"
26580  fi
26581
26582  if test "x$path" != "x$new_path"; then
26583    BOOT_JDK="$new_path"
26584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26585$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26586  fi
26587
26588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26590
26591    else
26592      # We're on a unix platform. Hooray! :)
26593      path="$BOOT_JDK"
26594      has_space=`$ECHO "$path" | $GREP " "`
26595      if test "x$has_space" != x; then
26596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26599      fi
26600
26601      # Use eval to expand a potential ~
26602      eval path="$path"
26603      if test ! -f "$path" && test ! -d "$path"; then
26604        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26605      fi
26606
26607      if test -d "$path"; then
26608        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26609      else
26610        dir="`$DIRNAME "$path"`"
26611        base="`$BASENAME "$path"`"
26612        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26613      fi
26614    fi
26615  fi
26616
26617            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26618$as_echo_n "checking for Boot JDK... " >&6; }
26619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26620$as_echo "$BOOT_JDK" >&6; }
26621            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26622$as_echo_n "checking Boot JDK version... " >&6; }
26623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26625$as_echo "$BOOT_JDK_VERSION" >&6; }
26626          fi # end check jdk version
26627        fi # end check javac
26628      fi # end check java
26629    fi # end check boot jdk found
26630  fi
26631
26632
26633  # Test: Is there a JDK installed in default, well-known locations?
26634
26635  if test "x$BOOT_JDK_FOUND" = xno; then
26636    # Now execute the test
26637
26638  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26639
26640  if test "x$BOOT_JDK_FOUND" = xno; then
26641    # Now execute the test
26642
26643  if test "x$ProgramW6432" != x; then
26644    VIRTUAL_DIR="$ProgramW6432/Java"
26645
26646  windows_path="$VIRTUAL_DIR"
26647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648    unix_path=`$CYGPATH -u "$windows_path"`
26649    VIRTUAL_DIR="$unix_path"
26650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26652    VIRTUAL_DIR="$unix_path"
26653  fi
26654
26655
26656  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26657  BOOT_JDK_SUFFIX=""
26658  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26659  if test "x$ALL_JDKS_FOUND" != x; then
26660    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26661
26662  if test "x$BOOT_JDK_FOUND" = xno; then
26663    # Now execute the test
26664
26665        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26666        if test -d "$BOOT_JDK"; then
26667          BOOT_JDK_FOUND=maybe
26668          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26669$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26670        fi
26671
26672
26673    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26674    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26675      # Do we have a bin/java?
26676      if test ! -x "$BOOT_JDK/bin/java"; then
26677        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26679        BOOT_JDK_FOUND=no
26680      else
26681        # Do we have a bin/javac?
26682        if test ! -x "$BOOT_JDK/bin/javac"; then
26683          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26685          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26686$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26687          BOOT_JDK_FOUND=no
26688        else
26689          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26690          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26691
26692          # Extra M4 quote needed to protect [] in grep expression.
26693          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26694          if test "x$FOUND_CORRECT_VERSION" = x; then
26695            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26697            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26698$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26699            BOOT_JDK_FOUND=no
26700          else
26701            # We're done! :-)
26702            BOOT_JDK_FOUND=yes
26703
26704  # Only process if variable expands to non-empty
26705
26706  if test "x$BOOT_JDK" != x; then
26707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26708
26709  # Input might be given as Windows format, start by converting to
26710  # unix format.
26711  path="$BOOT_JDK"
26712  new_path=`$CYGPATH -u "$path"`
26713
26714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26717  # "foo.exe" is OK but "foo" is an error.
26718  #
26719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26720  # It is also a way to make sure we got the proper file name for the real test later on.
26721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26722  if test "x$test_shortpath" = x; then
26723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26725    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26726  fi
26727
26728  # Call helper function which possibly converts this using DOS-style short mode.
26729  # If so, the updated path is stored in $new_path.
26730
26731  input_path="$new_path"
26732  # Check if we need to convert this using DOS-style short mode. If the path
26733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26734  # take no chances and rewrite it.
26735  # Note: m4 eats our [], so we need to use [ and ] instead.
26736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26737  if test "x$has_forbidden_chars" != x; then
26738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26742      # Going to short mode and back again did indeed matter. Since short mode is
26743      # case insensitive, let's make it lowercase to improve readability.
26744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26745      # Now convert it back to Unix-style (cygpath)
26746      input_path=`$CYGPATH -u "$shortmode_path"`
26747      new_path="$input_path"
26748    fi
26749  fi
26750
26751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26752  if test "x$test_cygdrive_prefix" = x; then
26753    # As a simple fix, exclude /usr/bin since it's not a real path.
26754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26756      # a path prefixed by /cygdrive for fixpath to work.
26757      new_path="$CYGWIN_ROOT_PATH$input_path"
26758    fi
26759  fi
26760
26761
26762  if test "x$path" != "x$new_path"; then
26763    BOOT_JDK="$new_path"
26764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26766  fi
26767
26768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26769
26770  path="$BOOT_JDK"
26771  has_colon=`$ECHO $path | $GREP ^.:`
26772  new_path="$path"
26773  if test "x$has_colon" = x; then
26774    # Not in mixed or Windows style, start by that.
26775    new_path=`cmd //c echo $path`
26776  fi
26777
26778
26779  input_path="$new_path"
26780  # Check if we need to convert this using DOS-style short mode. If the path
26781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26782  # take no chances and rewrite it.
26783  # Note: m4 eats our [], so we need to use [ and ] instead.
26784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26785  if test "x$has_forbidden_chars" != x; then
26786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26788  fi
26789
26790
26791  windows_path="$new_path"
26792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26793    unix_path=`$CYGPATH -u "$windows_path"`
26794    new_path="$unix_path"
26795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26797    new_path="$unix_path"
26798  fi
26799
26800  if test "x$path" != "x$new_path"; then
26801    BOOT_JDK="$new_path"
26802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26804  fi
26805
26806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26808
26809    else
26810      # We're on a unix platform. Hooray! :)
26811      path="$BOOT_JDK"
26812      has_space=`$ECHO "$path" | $GREP " "`
26813      if test "x$has_space" != x; then
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26816        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26817      fi
26818
26819      # Use eval to expand a potential ~
26820      eval path="$path"
26821      if test ! -f "$path" && test ! -d "$path"; then
26822        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26823      fi
26824
26825      if test -d "$path"; then
26826        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26827      else
26828        dir="`$DIRNAME "$path"`"
26829        base="`$BASENAME "$path"`"
26830        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26831      fi
26832    fi
26833  fi
26834
26835            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26836$as_echo_n "checking for Boot JDK... " >&6; }
26837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26838$as_echo "$BOOT_JDK" >&6; }
26839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26840$as_echo_n "checking Boot JDK version... " >&6; }
26841            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26843$as_echo "$BOOT_JDK_VERSION" >&6; }
26844          fi # end check jdk version
26845        fi # end check javac
26846      fi # end check java
26847    fi # end check boot jdk found
26848  fi
26849
26850    done
26851  fi
26852
26853  fi
26854
26855
26856    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26857    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26858      # Do we have a bin/java?
26859      if test ! -x "$BOOT_JDK/bin/java"; then
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26862        BOOT_JDK_FOUND=no
26863      else
26864        # Do we have a bin/javac?
26865        if test ! -x "$BOOT_JDK/bin/javac"; then
26866          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26868          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26869$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26870          BOOT_JDK_FOUND=no
26871        else
26872          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26873          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26874
26875          # Extra M4 quote needed to protect [] in grep expression.
26876          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26877          if test "x$FOUND_CORRECT_VERSION" = x; then
26878            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26880            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26881$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26882            BOOT_JDK_FOUND=no
26883          else
26884            # We're done! :-)
26885            BOOT_JDK_FOUND=yes
26886
26887  # Only process if variable expands to non-empty
26888
26889  if test "x$BOOT_JDK" != x; then
26890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26891
26892  # Input might be given as Windows format, start by converting to
26893  # unix format.
26894  path="$BOOT_JDK"
26895  new_path=`$CYGPATH -u "$path"`
26896
26897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26900  # "foo.exe" is OK but "foo" is an error.
26901  #
26902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26903  # It is also a way to make sure we got the proper file name for the real test later on.
26904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26905  if test "x$test_shortpath" = x; then
26906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26908    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26909  fi
26910
26911  # Call helper function which possibly converts this using DOS-style short mode.
26912  # If so, the updated path is stored in $new_path.
26913
26914  input_path="$new_path"
26915  # Check if we need to convert this using DOS-style short mode. If the path
26916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26917  # take no chances and rewrite it.
26918  # Note: m4 eats our [], so we need to use [ and ] instead.
26919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26920  if test "x$has_forbidden_chars" != x; then
26921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26925      # Going to short mode and back again did indeed matter. Since short mode is
26926      # case insensitive, let's make it lowercase to improve readability.
26927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26928      # Now convert it back to Unix-style (cygpath)
26929      input_path=`$CYGPATH -u "$shortmode_path"`
26930      new_path="$input_path"
26931    fi
26932  fi
26933
26934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26935  if test "x$test_cygdrive_prefix" = x; then
26936    # As a simple fix, exclude /usr/bin since it's not a real path.
26937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26939      # a path prefixed by /cygdrive for fixpath to work.
26940      new_path="$CYGWIN_ROOT_PATH$input_path"
26941    fi
26942  fi
26943
26944
26945  if test "x$path" != "x$new_path"; then
26946    BOOT_JDK="$new_path"
26947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26949  fi
26950
26951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26952
26953  path="$BOOT_JDK"
26954  has_colon=`$ECHO $path | $GREP ^.:`
26955  new_path="$path"
26956  if test "x$has_colon" = x; then
26957    # Not in mixed or Windows style, start by that.
26958    new_path=`cmd //c echo $path`
26959  fi
26960
26961
26962  input_path="$new_path"
26963  # Check if we need to convert this using DOS-style short mode. If the path
26964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26965  # take no chances and rewrite it.
26966  # Note: m4 eats our [], so we need to use [ and ] instead.
26967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26968  if test "x$has_forbidden_chars" != x; then
26969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26971  fi
26972
26973
26974  windows_path="$new_path"
26975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976    unix_path=`$CYGPATH -u "$windows_path"`
26977    new_path="$unix_path"
26978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980    new_path="$unix_path"
26981  fi
26982
26983  if test "x$path" != "x$new_path"; then
26984    BOOT_JDK="$new_path"
26985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26987  fi
26988
26989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26991
26992    else
26993      # We're on a unix platform. Hooray! :)
26994      path="$BOOT_JDK"
26995      has_space=`$ECHO "$path" | $GREP " "`
26996      if test "x$has_space" != x; then
26997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27000      fi
27001
27002      # Use eval to expand a potential ~
27003      eval path="$path"
27004      if test ! -f "$path" && test ! -d "$path"; then
27005        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27006      fi
27007
27008      if test -d "$path"; then
27009        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27010      else
27011        dir="`$DIRNAME "$path"`"
27012        base="`$BASENAME "$path"`"
27013        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27014      fi
27015    fi
27016  fi
27017
27018            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27019$as_echo_n "checking for Boot JDK... " >&6; }
27020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27021$as_echo "$BOOT_JDK" >&6; }
27022            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27023$as_echo_n "checking Boot JDK version... " >&6; }
27024            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27026$as_echo "$BOOT_JDK_VERSION" >&6; }
27027          fi # end check jdk version
27028        fi # end check javac
27029      fi # end check java
27030    fi # end check boot jdk found
27031  fi
27032
27033
27034  if test "x$BOOT_JDK_FOUND" = xno; then
27035    # Now execute the test
27036
27037  if test "x$PROGRAMW6432" != x; then
27038    VIRTUAL_DIR="$PROGRAMW6432/Java"
27039
27040  windows_path="$VIRTUAL_DIR"
27041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042    unix_path=`$CYGPATH -u "$windows_path"`
27043    VIRTUAL_DIR="$unix_path"
27044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27046    VIRTUAL_DIR="$unix_path"
27047  fi
27048
27049
27050  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27051  BOOT_JDK_SUFFIX=""
27052  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27053  if test "x$ALL_JDKS_FOUND" != x; then
27054    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27055
27056  if test "x$BOOT_JDK_FOUND" = xno; then
27057    # Now execute the test
27058
27059        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27060        if test -d "$BOOT_JDK"; then
27061          BOOT_JDK_FOUND=maybe
27062          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27063$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27064        fi
27065
27066
27067    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27068    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27069      # Do we have a bin/java?
27070      if test ! -x "$BOOT_JDK/bin/java"; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27073        BOOT_JDK_FOUND=no
27074      else
27075        # Do we have a bin/javac?
27076        if test ! -x "$BOOT_JDK/bin/javac"; then
27077          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27079          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27080$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27081          BOOT_JDK_FOUND=no
27082        else
27083          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27084          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27085
27086          # Extra M4 quote needed to protect [] in grep expression.
27087          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27088          if test "x$FOUND_CORRECT_VERSION" = x; then
27089            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27091            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27092$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27093            BOOT_JDK_FOUND=no
27094          else
27095            # We're done! :-)
27096            BOOT_JDK_FOUND=yes
27097
27098  # Only process if variable expands to non-empty
27099
27100  if test "x$BOOT_JDK" != x; then
27101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102
27103  # Input might be given as Windows format, start by converting to
27104  # unix format.
27105  path="$BOOT_JDK"
27106  new_path=`$CYGPATH -u "$path"`
27107
27108  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27109  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27110  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27111  # "foo.exe" is OK but "foo" is an error.
27112  #
27113  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27114  # It is also a way to make sure we got the proper file name for the real test later on.
27115  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27116  if test "x$test_shortpath" = x; then
27117    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27119    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27120  fi
27121
27122  # Call helper function which possibly converts this using DOS-style short mode.
27123  # If so, the updated path is stored in $new_path.
27124
27125  input_path="$new_path"
27126  # Check if we need to convert this using DOS-style short mode. If the path
27127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27128  # take no chances and rewrite it.
27129  # Note: m4 eats our [], so we need to use [ and ] instead.
27130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27131  if test "x$has_forbidden_chars" != x; then
27132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27136      # Going to short mode and back again did indeed matter. Since short mode is
27137      # case insensitive, let's make it lowercase to improve readability.
27138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27139      # Now convert it back to Unix-style (cygpath)
27140      input_path=`$CYGPATH -u "$shortmode_path"`
27141      new_path="$input_path"
27142    fi
27143  fi
27144
27145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27146  if test "x$test_cygdrive_prefix" = x; then
27147    # As a simple fix, exclude /usr/bin since it's not a real path.
27148    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27150      # a path prefixed by /cygdrive for fixpath to work.
27151      new_path="$CYGWIN_ROOT_PATH$input_path"
27152    fi
27153  fi
27154
27155
27156  if test "x$path" != "x$new_path"; then
27157    BOOT_JDK="$new_path"
27158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27159$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27160  fi
27161
27162    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27163
27164  path="$BOOT_JDK"
27165  has_colon=`$ECHO $path | $GREP ^.:`
27166  new_path="$path"
27167  if test "x$has_colon" = x; then
27168    # Not in mixed or Windows style, start by that.
27169    new_path=`cmd //c echo $path`
27170  fi
27171
27172
27173  input_path="$new_path"
27174  # Check if we need to convert this using DOS-style short mode. If the path
27175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27176  # take no chances and rewrite it.
27177  # Note: m4 eats our [], so we need to use [ and ] instead.
27178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27179  if test "x$has_forbidden_chars" != x; then
27180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27182  fi
27183
27184
27185  windows_path="$new_path"
27186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27187    unix_path=`$CYGPATH -u "$windows_path"`
27188    new_path="$unix_path"
27189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27191    new_path="$unix_path"
27192  fi
27193
27194  if test "x$path" != "x$new_path"; then
27195    BOOT_JDK="$new_path"
27196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27198  fi
27199
27200  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27201  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27202
27203    else
27204      # We're on a unix platform. Hooray! :)
27205      path="$BOOT_JDK"
27206      has_space=`$ECHO "$path" | $GREP " "`
27207      if test "x$has_space" != x; then
27208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27210        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27211      fi
27212
27213      # Use eval to expand a potential ~
27214      eval path="$path"
27215      if test ! -f "$path" && test ! -d "$path"; then
27216        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27217      fi
27218
27219      if test -d "$path"; then
27220        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27221      else
27222        dir="`$DIRNAME "$path"`"
27223        base="`$BASENAME "$path"`"
27224        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27225      fi
27226    fi
27227  fi
27228
27229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27230$as_echo_n "checking for Boot JDK... " >&6; }
27231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27232$as_echo "$BOOT_JDK" >&6; }
27233            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27234$as_echo_n "checking Boot JDK version... " >&6; }
27235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27237$as_echo "$BOOT_JDK_VERSION" >&6; }
27238          fi # end check jdk version
27239        fi # end check javac
27240      fi # end check java
27241    fi # end check boot jdk found
27242  fi
27243
27244    done
27245  fi
27246
27247  fi
27248
27249
27250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27252      # Do we have a bin/java?
27253      if test ! -x "$BOOT_JDK/bin/java"; then
27254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27256        BOOT_JDK_FOUND=no
27257      else
27258        # Do we have a bin/javac?
27259        if test ! -x "$BOOT_JDK/bin/javac"; then
27260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27264          BOOT_JDK_FOUND=no
27265        else
27266          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27267          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27268
27269          # Extra M4 quote needed to protect [] in grep expression.
27270          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27271          if test "x$FOUND_CORRECT_VERSION" = x; then
27272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27274            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27275$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27276            BOOT_JDK_FOUND=no
27277          else
27278            # We're done! :-)
27279            BOOT_JDK_FOUND=yes
27280
27281  # Only process if variable expands to non-empty
27282
27283  if test "x$BOOT_JDK" != x; then
27284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27285
27286  # Input might be given as Windows format, start by converting to
27287  # unix format.
27288  path="$BOOT_JDK"
27289  new_path=`$CYGPATH -u "$path"`
27290
27291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27294  # "foo.exe" is OK but "foo" is an error.
27295  #
27296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27297  # It is also a way to make sure we got the proper file name for the real test later on.
27298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27299  if test "x$test_shortpath" = x; then
27300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27303  fi
27304
27305  # Call helper function which possibly converts this using DOS-style short mode.
27306  # If so, the updated path is stored in $new_path.
27307
27308  input_path="$new_path"
27309  # Check if we need to convert this using DOS-style short mode. If the path
27310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27311  # take no chances and rewrite it.
27312  # Note: m4 eats our [], so we need to use [ and ] instead.
27313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27314  if test "x$has_forbidden_chars" != x; then
27315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27319      # Going to short mode and back again did indeed matter. Since short mode is
27320      # case insensitive, let's make it lowercase to improve readability.
27321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27322      # Now convert it back to Unix-style (cygpath)
27323      input_path=`$CYGPATH -u "$shortmode_path"`
27324      new_path="$input_path"
27325    fi
27326  fi
27327
27328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27329  if test "x$test_cygdrive_prefix" = x; then
27330    # As a simple fix, exclude /usr/bin since it's not a real path.
27331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27333      # a path prefixed by /cygdrive for fixpath to work.
27334      new_path="$CYGWIN_ROOT_PATH$input_path"
27335    fi
27336  fi
27337
27338
27339  if test "x$path" != "x$new_path"; then
27340    BOOT_JDK="$new_path"
27341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27343  fi
27344
27345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27346
27347  path="$BOOT_JDK"
27348  has_colon=`$ECHO $path | $GREP ^.:`
27349  new_path="$path"
27350  if test "x$has_colon" = x; then
27351    # Not in mixed or Windows style, start by that.
27352    new_path=`cmd //c echo $path`
27353  fi
27354
27355
27356  input_path="$new_path"
27357  # Check if we need to convert this using DOS-style short mode. If the path
27358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27359  # take no chances and rewrite it.
27360  # Note: m4 eats our [], so we need to use [ and ] instead.
27361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27362  if test "x$has_forbidden_chars" != x; then
27363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27365  fi
27366
27367
27368  windows_path="$new_path"
27369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27370    unix_path=`$CYGPATH -u "$windows_path"`
27371    new_path="$unix_path"
27372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27374    new_path="$unix_path"
27375  fi
27376
27377  if test "x$path" != "x$new_path"; then
27378    BOOT_JDK="$new_path"
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27381  fi
27382
27383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27385
27386    else
27387      # We're on a unix platform. Hooray! :)
27388      path="$BOOT_JDK"
27389      has_space=`$ECHO "$path" | $GREP " "`
27390      if test "x$has_space" != x; then
27391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27394      fi
27395
27396      # Use eval to expand a potential ~
27397      eval path="$path"
27398      if test ! -f "$path" && test ! -d "$path"; then
27399        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27400      fi
27401
27402      if test -d "$path"; then
27403        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27404      else
27405        dir="`$DIRNAME "$path"`"
27406        base="`$BASENAME "$path"`"
27407        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27408      fi
27409    fi
27410  fi
27411
27412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27413$as_echo_n "checking for Boot JDK... " >&6; }
27414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27415$as_echo "$BOOT_JDK" >&6; }
27416            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27417$as_echo_n "checking Boot JDK version... " >&6; }
27418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27420$as_echo "$BOOT_JDK_VERSION" >&6; }
27421          fi # end check jdk version
27422        fi # end check javac
27423      fi # end check java
27424    fi # end check boot jdk found
27425  fi
27426
27427
27428  if test "x$BOOT_JDK_FOUND" = xno; then
27429    # Now execute the test
27430
27431  if test "x$PROGRAMFILES" != x; then
27432    VIRTUAL_DIR="$PROGRAMFILES/Java"
27433
27434  windows_path="$VIRTUAL_DIR"
27435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27436    unix_path=`$CYGPATH -u "$windows_path"`
27437    VIRTUAL_DIR="$unix_path"
27438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27440    VIRTUAL_DIR="$unix_path"
27441  fi
27442
27443
27444  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27445  BOOT_JDK_SUFFIX=""
27446  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27447  if test "x$ALL_JDKS_FOUND" != x; then
27448    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27449
27450  if test "x$BOOT_JDK_FOUND" = xno; then
27451    # Now execute the test
27452
27453        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27454        if test -d "$BOOT_JDK"; then
27455          BOOT_JDK_FOUND=maybe
27456          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27457$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27458        fi
27459
27460
27461    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27462    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27463      # Do we have a bin/java?
27464      if test ! -x "$BOOT_JDK/bin/java"; then
27465        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27467        BOOT_JDK_FOUND=no
27468      else
27469        # Do we have a bin/javac?
27470        if test ! -x "$BOOT_JDK/bin/javac"; then
27471          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27473          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27474$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27475          BOOT_JDK_FOUND=no
27476        else
27477          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27478          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27479
27480          # Extra M4 quote needed to protect [] in grep expression.
27481          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27482          if test "x$FOUND_CORRECT_VERSION" = x; then
27483            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27485            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27486$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27487            BOOT_JDK_FOUND=no
27488          else
27489            # We're done! :-)
27490            BOOT_JDK_FOUND=yes
27491
27492  # Only process if variable expands to non-empty
27493
27494  if test "x$BOOT_JDK" != x; then
27495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27496
27497  # Input might be given as Windows format, start by converting to
27498  # unix format.
27499  path="$BOOT_JDK"
27500  new_path=`$CYGPATH -u "$path"`
27501
27502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27505  # "foo.exe" is OK but "foo" is an error.
27506  #
27507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27508  # It is also a way to make sure we got the proper file name for the real test later on.
27509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27510  if test "x$test_shortpath" = x; then
27511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27512$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27513    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27514  fi
27515
27516  # Call helper function which possibly converts this using DOS-style short mode.
27517  # If so, the updated path is stored in $new_path.
27518
27519  input_path="$new_path"
27520  # Check if we need to convert this using DOS-style short mode. If the path
27521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27522  # take no chances and rewrite it.
27523  # Note: m4 eats our [], so we need to use [ and ] instead.
27524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27525  if test "x$has_forbidden_chars" != x; then
27526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27530      # Going to short mode and back again did indeed matter. Since short mode is
27531      # case insensitive, let's make it lowercase to improve readability.
27532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27533      # Now convert it back to Unix-style (cygpath)
27534      input_path=`$CYGPATH -u "$shortmode_path"`
27535      new_path="$input_path"
27536    fi
27537  fi
27538
27539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27540  if test "x$test_cygdrive_prefix" = x; then
27541    # As a simple fix, exclude /usr/bin since it's not a real path.
27542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27544      # a path prefixed by /cygdrive for fixpath to work.
27545      new_path="$CYGWIN_ROOT_PATH$input_path"
27546    fi
27547  fi
27548
27549
27550  if test "x$path" != "x$new_path"; then
27551    BOOT_JDK="$new_path"
27552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27554  fi
27555
27556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27557
27558  path="$BOOT_JDK"
27559  has_colon=`$ECHO $path | $GREP ^.:`
27560  new_path="$path"
27561  if test "x$has_colon" = x; then
27562    # Not in mixed or Windows style, start by that.
27563    new_path=`cmd //c echo $path`
27564  fi
27565
27566
27567  input_path="$new_path"
27568  # Check if we need to convert this using DOS-style short mode. If the path
27569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27570  # take no chances and rewrite it.
27571  # Note: m4 eats our [], so we need to use [ and ] instead.
27572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27573  if test "x$has_forbidden_chars" != x; then
27574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27576  fi
27577
27578
27579  windows_path="$new_path"
27580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27581    unix_path=`$CYGPATH -u "$windows_path"`
27582    new_path="$unix_path"
27583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27585    new_path="$unix_path"
27586  fi
27587
27588  if test "x$path" != "x$new_path"; then
27589    BOOT_JDK="$new_path"
27590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27592  fi
27593
27594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27596
27597    else
27598      # We're on a unix platform. Hooray! :)
27599      path="$BOOT_JDK"
27600      has_space=`$ECHO "$path" | $GREP " "`
27601      if test "x$has_space" != x; then
27602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27603$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27605      fi
27606
27607      # Use eval to expand a potential ~
27608      eval path="$path"
27609      if test ! -f "$path" && test ! -d "$path"; then
27610        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27611      fi
27612
27613      if test -d "$path"; then
27614        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27615      else
27616        dir="`$DIRNAME "$path"`"
27617        base="`$BASENAME "$path"`"
27618        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27619      fi
27620    fi
27621  fi
27622
27623            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27624$as_echo_n "checking for Boot JDK... " >&6; }
27625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27626$as_echo "$BOOT_JDK" >&6; }
27627            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27628$as_echo_n "checking Boot JDK version... " >&6; }
27629            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27631$as_echo "$BOOT_JDK_VERSION" >&6; }
27632          fi # end check jdk version
27633        fi # end check javac
27634      fi # end check java
27635    fi # end check boot jdk found
27636  fi
27637
27638    done
27639  fi
27640
27641  fi
27642
27643
27644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27646      # Do we have a bin/java?
27647      if test ! -x "$BOOT_JDK/bin/java"; then
27648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27650        BOOT_JDK_FOUND=no
27651      else
27652        # Do we have a bin/javac?
27653        if test ! -x "$BOOT_JDK/bin/javac"; then
27654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27658          BOOT_JDK_FOUND=no
27659        else
27660          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27661          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27662
27663          # Extra M4 quote needed to protect [] in grep expression.
27664          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27665          if test "x$FOUND_CORRECT_VERSION" = x; then
27666            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27668            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27669$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27670            BOOT_JDK_FOUND=no
27671          else
27672            # We're done! :-)
27673            BOOT_JDK_FOUND=yes
27674
27675  # Only process if variable expands to non-empty
27676
27677  if test "x$BOOT_JDK" != x; then
27678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27679
27680  # Input might be given as Windows format, start by converting to
27681  # unix format.
27682  path="$BOOT_JDK"
27683  new_path=`$CYGPATH -u "$path"`
27684
27685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27688  # "foo.exe" is OK but "foo" is an error.
27689  #
27690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27691  # It is also a way to make sure we got the proper file name for the real test later on.
27692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27693  if test "x$test_shortpath" = x; then
27694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27696    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27697  fi
27698
27699  # Call helper function which possibly converts this using DOS-style short mode.
27700  # If so, the updated path is stored in $new_path.
27701
27702  input_path="$new_path"
27703  # Check if we need to convert this using DOS-style short mode. If the path
27704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27705  # take no chances and rewrite it.
27706  # Note: m4 eats our [], so we need to use [ and ] instead.
27707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27708  if test "x$has_forbidden_chars" != x; then
27709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27713      # Going to short mode and back again did indeed matter. Since short mode is
27714      # case insensitive, let's make it lowercase to improve readability.
27715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27716      # Now convert it back to Unix-style (cygpath)
27717      input_path=`$CYGPATH -u "$shortmode_path"`
27718      new_path="$input_path"
27719    fi
27720  fi
27721
27722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27723  if test "x$test_cygdrive_prefix" = x; then
27724    # As a simple fix, exclude /usr/bin since it's not a real path.
27725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27727      # a path prefixed by /cygdrive for fixpath to work.
27728      new_path="$CYGWIN_ROOT_PATH$input_path"
27729    fi
27730  fi
27731
27732
27733  if test "x$path" != "x$new_path"; then
27734    BOOT_JDK="$new_path"
27735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27737  fi
27738
27739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27740
27741  path="$BOOT_JDK"
27742  has_colon=`$ECHO $path | $GREP ^.:`
27743  new_path="$path"
27744  if test "x$has_colon" = x; then
27745    # Not in mixed or Windows style, start by that.
27746    new_path=`cmd //c echo $path`
27747  fi
27748
27749
27750  input_path="$new_path"
27751  # Check if we need to convert this using DOS-style short mode. If the path
27752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27753  # take no chances and rewrite it.
27754  # Note: m4 eats our [], so we need to use [ and ] instead.
27755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27756  if test "x$has_forbidden_chars" != x; then
27757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27759  fi
27760
27761
27762  windows_path="$new_path"
27763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27764    unix_path=`$CYGPATH -u "$windows_path"`
27765    new_path="$unix_path"
27766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27768    new_path="$unix_path"
27769  fi
27770
27771  if test "x$path" != "x$new_path"; then
27772    BOOT_JDK="$new_path"
27773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27775  fi
27776
27777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27779
27780    else
27781      # We're on a unix platform. Hooray! :)
27782      path="$BOOT_JDK"
27783      has_space=`$ECHO "$path" | $GREP " "`
27784      if test "x$has_space" != x; then
27785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27788      fi
27789
27790      # Use eval to expand a potential ~
27791      eval path="$path"
27792      if test ! -f "$path" && test ! -d "$path"; then
27793        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27794      fi
27795
27796      if test -d "$path"; then
27797        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27798      else
27799        dir="`$DIRNAME "$path"`"
27800        base="`$BASENAME "$path"`"
27801        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27802      fi
27803    fi
27804  fi
27805
27806            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27807$as_echo_n "checking for Boot JDK... " >&6; }
27808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27809$as_echo "$BOOT_JDK" >&6; }
27810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27811$as_echo_n "checking Boot JDK version... " >&6; }
27812            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27814$as_echo "$BOOT_JDK_VERSION" >&6; }
27815          fi # end check jdk version
27816        fi # end check javac
27817      fi # end check java
27818    fi # end check boot jdk found
27819  fi
27820
27821
27822  if test "x$BOOT_JDK_FOUND" = xno; then
27823    # Now execute the test
27824
27825  if test "x$ProgramFiles" != x; then
27826    VIRTUAL_DIR="$ProgramFiles/Java"
27827
27828  windows_path="$VIRTUAL_DIR"
27829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830    unix_path=`$CYGPATH -u "$windows_path"`
27831    VIRTUAL_DIR="$unix_path"
27832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27834    VIRTUAL_DIR="$unix_path"
27835  fi
27836
27837
27838  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27839  BOOT_JDK_SUFFIX=""
27840  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27841  if test "x$ALL_JDKS_FOUND" != x; then
27842    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27843
27844  if test "x$BOOT_JDK_FOUND" = xno; then
27845    # Now execute the test
27846
27847        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27848        if test -d "$BOOT_JDK"; then
27849          BOOT_JDK_FOUND=maybe
27850          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27851$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27852        fi
27853
27854
27855    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27856    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27857      # Do we have a bin/java?
27858      if test ! -x "$BOOT_JDK/bin/java"; then
27859        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27861        BOOT_JDK_FOUND=no
27862      else
27863        # Do we have a bin/javac?
27864        if test ! -x "$BOOT_JDK/bin/javac"; then
27865          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27867          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27868$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27869          BOOT_JDK_FOUND=no
27870        else
27871          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27872          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27873
27874          # Extra M4 quote needed to protect [] in grep expression.
27875          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27876          if test "x$FOUND_CORRECT_VERSION" = x; then
27877            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27879            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27880$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27881            BOOT_JDK_FOUND=no
27882          else
27883            # We're done! :-)
27884            BOOT_JDK_FOUND=yes
27885
27886  # Only process if variable expands to non-empty
27887
27888  if test "x$BOOT_JDK" != x; then
27889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27890
27891  # Input might be given as Windows format, start by converting to
27892  # unix format.
27893  path="$BOOT_JDK"
27894  new_path=`$CYGPATH -u "$path"`
27895
27896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27899  # "foo.exe" is OK but "foo" is an error.
27900  #
27901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27902  # It is also a way to make sure we got the proper file name for the real test later on.
27903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27904  if test "x$test_shortpath" = x; then
27905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27908  fi
27909
27910  # Call helper function which possibly converts this using DOS-style short mode.
27911  # If so, the updated path is stored in $new_path.
27912
27913  input_path="$new_path"
27914  # Check if we need to convert this using DOS-style short mode. If the path
27915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27916  # take no chances and rewrite it.
27917  # Note: m4 eats our [], so we need to use [ and ] instead.
27918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27919  if test "x$has_forbidden_chars" != x; then
27920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27924      # Going to short mode and back again did indeed matter. Since short mode is
27925      # case insensitive, let's make it lowercase to improve readability.
27926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27927      # Now convert it back to Unix-style (cygpath)
27928      input_path=`$CYGPATH -u "$shortmode_path"`
27929      new_path="$input_path"
27930    fi
27931  fi
27932
27933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27934  if test "x$test_cygdrive_prefix" = x; then
27935    # As a simple fix, exclude /usr/bin since it's not a real path.
27936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27938      # a path prefixed by /cygdrive for fixpath to work.
27939      new_path="$CYGWIN_ROOT_PATH$input_path"
27940    fi
27941  fi
27942
27943
27944  if test "x$path" != "x$new_path"; then
27945    BOOT_JDK="$new_path"
27946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27948  fi
27949
27950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27951
27952  path="$BOOT_JDK"
27953  has_colon=`$ECHO $path | $GREP ^.:`
27954  new_path="$path"
27955  if test "x$has_colon" = x; then
27956    # Not in mixed or Windows style, start by that.
27957    new_path=`cmd //c echo $path`
27958  fi
27959
27960
27961  input_path="$new_path"
27962  # Check if we need to convert this using DOS-style short mode. If the path
27963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27964  # take no chances and rewrite it.
27965  # Note: m4 eats our [], so we need to use [ and ] instead.
27966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27967  if test "x$has_forbidden_chars" != x; then
27968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27970  fi
27971
27972
27973  windows_path="$new_path"
27974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27975    unix_path=`$CYGPATH -u "$windows_path"`
27976    new_path="$unix_path"
27977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27979    new_path="$unix_path"
27980  fi
27981
27982  if test "x$path" != "x$new_path"; then
27983    BOOT_JDK="$new_path"
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27986  fi
27987
27988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27990
27991    else
27992      # We're on a unix platform. Hooray! :)
27993      path="$BOOT_JDK"
27994      has_space=`$ECHO "$path" | $GREP " "`
27995      if test "x$has_space" != x; then
27996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27999      fi
28000
28001      # Use eval to expand a potential ~
28002      eval path="$path"
28003      if test ! -f "$path" && test ! -d "$path"; then
28004        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28005      fi
28006
28007      if test -d "$path"; then
28008        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28009      else
28010        dir="`$DIRNAME "$path"`"
28011        base="`$BASENAME "$path"`"
28012        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28013      fi
28014    fi
28015  fi
28016
28017            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28018$as_echo_n "checking for Boot JDK... " >&6; }
28019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28020$as_echo "$BOOT_JDK" >&6; }
28021            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28022$as_echo_n "checking Boot JDK version... " >&6; }
28023            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28025$as_echo "$BOOT_JDK_VERSION" >&6; }
28026          fi # end check jdk version
28027        fi # end check javac
28028      fi # end check java
28029    fi # end check boot jdk found
28030  fi
28031
28032    done
28033  fi
28034
28035  fi
28036
28037
28038    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28039    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28040      # Do we have a bin/java?
28041      if test ! -x "$BOOT_JDK/bin/java"; then
28042        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28044        BOOT_JDK_FOUND=no
28045      else
28046        # Do we have a bin/javac?
28047        if test ! -x "$BOOT_JDK/bin/javac"; then
28048          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28050          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28051$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28052          BOOT_JDK_FOUND=no
28053        else
28054          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28055          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28056
28057          # Extra M4 quote needed to protect [] in grep expression.
28058          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28059          if test "x$FOUND_CORRECT_VERSION" = x; then
28060            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28062            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28063$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28064            BOOT_JDK_FOUND=no
28065          else
28066            # We're done! :-)
28067            BOOT_JDK_FOUND=yes
28068
28069  # Only process if variable expands to non-empty
28070
28071  if test "x$BOOT_JDK" != x; then
28072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28073
28074  # Input might be given as Windows format, start by converting to
28075  # unix format.
28076  path="$BOOT_JDK"
28077  new_path=`$CYGPATH -u "$path"`
28078
28079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28082  # "foo.exe" is OK but "foo" is an error.
28083  #
28084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28085  # It is also a way to make sure we got the proper file name for the real test later on.
28086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28087  if test "x$test_shortpath" = x; then
28088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28089$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28090    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28091  fi
28092
28093  # Call helper function which possibly converts this using DOS-style short mode.
28094  # If so, the updated path is stored in $new_path.
28095
28096  input_path="$new_path"
28097  # Check if we need to convert this using DOS-style short mode. If the path
28098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28099  # take no chances and rewrite it.
28100  # Note: m4 eats our [], so we need to use [ and ] instead.
28101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28102  if test "x$has_forbidden_chars" != x; then
28103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28107      # Going to short mode and back again did indeed matter. Since short mode is
28108      # case insensitive, let's make it lowercase to improve readability.
28109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28110      # Now convert it back to Unix-style (cygpath)
28111      input_path=`$CYGPATH -u "$shortmode_path"`
28112      new_path="$input_path"
28113    fi
28114  fi
28115
28116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28117  if test "x$test_cygdrive_prefix" = x; then
28118    # As a simple fix, exclude /usr/bin since it's not a real path.
28119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28121      # a path prefixed by /cygdrive for fixpath to work.
28122      new_path="$CYGWIN_ROOT_PATH$input_path"
28123    fi
28124  fi
28125
28126
28127  if test "x$path" != "x$new_path"; then
28128    BOOT_JDK="$new_path"
28129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28130$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28131  fi
28132
28133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28134
28135  path="$BOOT_JDK"
28136  has_colon=`$ECHO $path | $GREP ^.:`
28137  new_path="$path"
28138  if test "x$has_colon" = x; then
28139    # Not in mixed or Windows style, start by that.
28140    new_path=`cmd //c echo $path`
28141  fi
28142
28143
28144  input_path="$new_path"
28145  # Check if we need to convert this using DOS-style short mode. If the path
28146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28147  # take no chances and rewrite it.
28148  # Note: m4 eats our [], so we need to use [ and ] instead.
28149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28150  if test "x$has_forbidden_chars" != x; then
28151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28153  fi
28154
28155
28156  windows_path="$new_path"
28157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28158    unix_path=`$CYGPATH -u "$windows_path"`
28159    new_path="$unix_path"
28160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28162    new_path="$unix_path"
28163  fi
28164
28165  if test "x$path" != "x$new_path"; then
28166    BOOT_JDK="$new_path"
28167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28169  fi
28170
28171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28173
28174    else
28175      # We're on a unix platform. Hooray! :)
28176      path="$BOOT_JDK"
28177      has_space=`$ECHO "$path" | $GREP " "`
28178      if test "x$has_space" != x; then
28179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28181        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28182      fi
28183
28184      # Use eval to expand a potential ~
28185      eval path="$path"
28186      if test ! -f "$path" && test ! -d "$path"; then
28187        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28188      fi
28189
28190      if test -d "$path"; then
28191        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28192      else
28193        dir="`$DIRNAME "$path"`"
28194        base="`$BASENAME "$path"`"
28195        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28196      fi
28197    fi
28198  fi
28199
28200            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28201$as_echo_n "checking for Boot JDK... " >&6; }
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28203$as_echo "$BOOT_JDK" >&6; }
28204            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28205$as_echo_n "checking Boot JDK version... " >&6; }
28206            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28208$as_echo "$BOOT_JDK_VERSION" >&6; }
28209          fi # end check jdk version
28210        fi # end check javac
28211      fi # end check java
28212    fi # end check boot jdk found
28213  fi
28214
28215
28216  if test "x$BOOT_JDK_FOUND" = xno; then
28217    # Now execute the test
28218
28219  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28220  BOOT_JDK_SUFFIX=""
28221  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28222  if test "x$ALL_JDKS_FOUND" != x; then
28223    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28224
28225  if test "x$BOOT_JDK_FOUND" = xno; then
28226    # Now execute the test
28227
28228        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28229        if test -d "$BOOT_JDK"; then
28230          BOOT_JDK_FOUND=maybe
28231          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28232$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28233        fi
28234
28235
28236    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28237    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28238      # Do we have a bin/java?
28239      if test ! -x "$BOOT_JDK/bin/java"; then
28240        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28242        BOOT_JDK_FOUND=no
28243      else
28244        # Do we have a bin/javac?
28245        if test ! -x "$BOOT_JDK/bin/javac"; then
28246          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28248          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28249$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28250          BOOT_JDK_FOUND=no
28251        else
28252          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28253          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28254
28255          # Extra M4 quote needed to protect [] in grep expression.
28256          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28257          if test "x$FOUND_CORRECT_VERSION" = x; then
28258            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28260            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28261$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28262            BOOT_JDK_FOUND=no
28263          else
28264            # We're done! :-)
28265            BOOT_JDK_FOUND=yes
28266
28267  # Only process if variable expands to non-empty
28268
28269  if test "x$BOOT_JDK" != x; then
28270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28271
28272  # Input might be given as Windows format, start by converting to
28273  # unix format.
28274  path="$BOOT_JDK"
28275  new_path=`$CYGPATH -u "$path"`
28276
28277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28280  # "foo.exe" is OK but "foo" is an error.
28281  #
28282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28283  # It is also a way to make sure we got the proper file name for the real test later on.
28284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28285  if test "x$test_shortpath" = x; then
28286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28287$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28288    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28289  fi
28290
28291  # Call helper function which possibly converts this using DOS-style short mode.
28292  # If so, the updated path is stored in $new_path.
28293
28294  input_path="$new_path"
28295  # Check if we need to convert this using DOS-style short mode. If the path
28296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28297  # take no chances and rewrite it.
28298  # Note: m4 eats our [], so we need to use [ and ] instead.
28299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28300  if test "x$has_forbidden_chars" != x; then
28301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28305      # Going to short mode and back again did indeed matter. Since short mode is
28306      # case insensitive, let's make it lowercase to improve readability.
28307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28308      # Now convert it back to Unix-style (cygpath)
28309      input_path=`$CYGPATH -u "$shortmode_path"`
28310      new_path="$input_path"
28311    fi
28312  fi
28313
28314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28315  if test "x$test_cygdrive_prefix" = x; then
28316    # As a simple fix, exclude /usr/bin since it's not a real path.
28317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28319      # a path prefixed by /cygdrive for fixpath to work.
28320      new_path="$CYGWIN_ROOT_PATH$input_path"
28321    fi
28322  fi
28323
28324
28325  if test "x$path" != "x$new_path"; then
28326    BOOT_JDK="$new_path"
28327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28329  fi
28330
28331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28332
28333  path="$BOOT_JDK"
28334  has_colon=`$ECHO $path | $GREP ^.:`
28335  new_path="$path"
28336  if test "x$has_colon" = x; then
28337    # Not in mixed or Windows style, start by that.
28338    new_path=`cmd //c echo $path`
28339  fi
28340
28341
28342  input_path="$new_path"
28343  # Check if we need to convert this using DOS-style short mode. If the path
28344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28345  # take no chances and rewrite it.
28346  # Note: m4 eats our [], so we need to use [ and ] instead.
28347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28348  if test "x$has_forbidden_chars" != x; then
28349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28351  fi
28352
28353
28354  windows_path="$new_path"
28355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28356    unix_path=`$CYGPATH -u "$windows_path"`
28357    new_path="$unix_path"
28358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28360    new_path="$unix_path"
28361  fi
28362
28363  if test "x$path" != "x$new_path"; then
28364    BOOT_JDK="$new_path"
28365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28367  fi
28368
28369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28371
28372    else
28373      # We're on a unix platform. Hooray! :)
28374      path="$BOOT_JDK"
28375      has_space=`$ECHO "$path" | $GREP " "`
28376      if test "x$has_space" != x; then
28377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28379        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28380      fi
28381
28382      # Use eval to expand a potential ~
28383      eval path="$path"
28384      if test ! -f "$path" && test ! -d "$path"; then
28385        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28386      fi
28387
28388      if test -d "$path"; then
28389        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28390      else
28391        dir="`$DIRNAME "$path"`"
28392        base="`$BASENAME "$path"`"
28393        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28394      fi
28395    fi
28396  fi
28397
28398            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28399$as_echo_n "checking for Boot JDK... " >&6; }
28400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28401$as_echo "$BOOT_JDK" >&6; }
28402            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28403$as_echo_n "checking Boot JDK version... " >&6; }
28404            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28406$as_echo "$BOOT_JDK_VERSION" >&6; }
28407          fi # end check jdk version
28408        fi # end check javac
28409      fi # end check java
28410    fi # end check boot jdk found
28411  fi
28412
28413    done
28414  fi
28415
28416
28417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28419      # Do we have a bin/java?
28420      if test ! -x "$BOOT_JDK/bin/java"; then
28421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28423        BOOT_JDK_FOUND=no
28424      else
28425        # Do we have a bin/javac?
28426        if test ! -x "$BOOT_JDK/bin/javac"; then
28427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28431          BOOT_JDK_FOUND=no
28432        else
28433          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28434          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28435
28436          # Extra M4 quote needed to protect [] in grep expression.
28437          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28438          if test "x$FOUND_CORRECT_VERSION" = x; then
28439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28441            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28442$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28443            BOOT_JDK_FOUND=no
28444          else
28445            # We're done! :-)
28446            BOOT_JDK_FOUND=yes
28447
28448  # Only process if variable expands to non-empty
28449
28450  if test "x$BOOT_JDK" != x; then
28451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28452
28453  # Input might be given as Windows format, start by converting to
28454  # unix format.
28455  path="$BOOT_JDK"
28456  new_path=`$CYGPATH -u "$path"`
28457
28458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28461  # "foo.exe" is OK but "foo" is an error.
28462  #
28463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28464  # It is also a way to make sure we got the proper file name for the real test later on.
28465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28466  if test "x$test_shortpath" = x; then
28467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28469    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28470  fi
28471
28472  # Call helper function which possibly converts this using DOS-style short mode.
28473  # If so, the updated path is stored in $new_path.
28474
28475  input_path="$new_path"
28476  # Check if we need to convert this using DOS-style short mode. If the path
28477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28478  # take no chances and rewrite it.
28479  # Note: m4 eats our [], so we need to use [ and ] instead.
28480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28481  if test "x$has_forbidden_chars" != x; then
28482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28486      # Going to short mode and back again did indeed matter. Since short mode is
28487      # case insensitive, let's make it lowercase to improve readability.
28488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28489      # Now convert it back to Unix-style (cygpath)
28490      input_path=`$CYGPATH -u "$shortmode_path"`
28491      new_path="$input_path"
28492    fi
28493  fi
28494
28495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28496  if test "x$test_cygdrive_prefix" = x; then
28497    # As a simple fix, exclude /usr/bin since it's not a real path.
28498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28500      # a path prefixed by /cygdrive for fixpath to work.
28501      new_path="$CYGWIN_ROOT_PATH$input_path"
28502    fi
28503  fi
28504
28505
28506  if test "x$path" != "x$new_path"; then
28507    BOOT_JDK="$new_path"
28508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28510  fi
28511
28512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28513
28514  path="$BOOT_JDK"
28515  has_colon=`$ECHO $path | $GREP ^.:`
28516  new_path="$path"
28517  if test "x$has_colon" = x; then
28518    # Not in mixed or Windows style, start by that.
28519    new_path=`cmd //c echo $path`
28520  fi
28521
28522
28523  input_path="$new_path"
28524  # Check if we need to convert this using DOS-style short mode. If the path
28525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28526  # take no chances and rewrite it.
28527  # Note: m4 eats our [], so we need to use [ and ] instead.
28528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28529  if test "x$has_forbidden_chars" != x; then
28530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28532  fi
28533
28534
28535  windows_path="$new_path"
28536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28537    unix_path=`$CYGPATH -u "$windows_path"`
28538    new_path="$unix_path"
28539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28541    new_path="$unix_path"
28542  fi
28543
28544  if test "x$path" != "x$new_path"; then
28545    BOOT_JDK="$new_path"
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28548  fi
28549
28550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28552
28553    else
28554      # We're on a unix platform. Hooray! :)
28555      path="$BOOT_JDK"
28556      has_space=`$ECHO "$path" | $GREP " "`
28557      if test "x$has_space" != x; then
28558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28561      fi
28562
28563      # Use eval to expand a potential ~
28564      eval path="$path"
28565      if test ! -f "$path" && test ! -d "$path"; then
28566        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28567      fi
28568
28569      if test -d "$path"; then
28570        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28571      else
28572        dir="`$DIRNAME "$path"`"
28573        base="`$BASENAME "$path"`"
28574        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28575      fi
28576    fi
28577  fi
28578
28579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28580$as_echo_n "checking for Boot JDK... " >&6; }
28581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28582$as_echo "$BOOT_JDK" >&6; }
28583            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28584$as_echo_n "checking Boot JDK version... " >&6; }
28585            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28587$as_echo "$BOOT_JDK_VERSION" >&6; }
28588          fi # end check jdk version
28589        fi # end check javac
28590      fi # end check java
28591    fi # end check boot jdk found
28592  fi
28593
28594  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28595
28596  if test "x$BOOT_JDK_FOUND" = xno; then
28597    # Now execute the test
28598
28599  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28600  BOOT_JDK_SUFFIX="/Contents/Home"
28601  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28602  if test "x$ALL_JDKS_FOUND" != x; then
28603    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28604
28605  if test "x$BOOT_JDK_FOUND" = xno; then
28606    # Now execute the test
28607
28608        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28609        if test -d "$BOOT_JDK"; then
28610          BOOT_JDK_FOUND=maybe
28611          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28612$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28613        fi
28614
28615
28616    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28617    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28618      # Do we have a bin/java?
28619      if test ! -x "$BOOT_JDK/bin/java"; then
28620        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28622        BOOT_JDK_FOUND=no
28623      else
28624        # Do we have a bin/javac?
28625        if test ! -x "$BOOT_JDK/bin/javac"; then
28626          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28628          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28629$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28630          BOOT_JDK_FOUND=no
28631        else
28632          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28633          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28634
28635          # Extra M4 quote needed to protect [] in grep expression.
28636          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28637          if test "x$FOUND_CORRECT_VERSION" = x; then
28638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28640            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28641$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28642            BOOT_JDK_FOUND=no
28643          else
28644            # We're done! :-)
28645            BOOT_JDK_FOUND=yes
28646
28647  # Only process if variable expands to non-empty
28648
28649  if test "x$BOOT_JDK" != x; then
28650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28651
28652  # Input might be given as Windows format, start by converting to
28653  # unix format.
28654  path="$BOOT_JDK"
28655  new_path=`$CYGPATH -u "$path"`
28656
28657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28660  # "foo.exe" is OK but "foo" is an error.
28661  #
28662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28663  # It is also a way to make sure we got the proper file name for the real test later on.
28664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28665  if test "x$test_shortpath" = x; then
28666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28667$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28668    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28669  fi
28670
28671  # Call helper function which possibly converts this using DOS-style short mode.
28672  # If so, the updated path is stored in $new_path.
28673
28674  input_path="$new_path"
28675  # Check if we need to convert this using DOS-style short mode. If the path
28676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28677  # take no chances and rewrite it.
28678  # Note: m4 eats our [], so we need to use [ and ] instead.
28679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28680  if test "x$has_forbidden_chars" != x; then
28681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28685      # Going to short mode and back again did indeed matter. Since short mode is
28686      # case insensitive, let's make it lowercase to improve readability.
28687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28688      # Now convert it back to Unix-style (cygpath)
28689      input_path=`$CYGPATH -u "$shortmode_path"`
28690      new_path="$input_path"
28691    fi
28692  fi
28693
28694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28695  if test "x$test_cygdrive_prefix" = x; then
28696    # As a simple fix, exclude /usr/bin since it's not a real path.
28697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28699      # a path prefixed by /cygdrive for fixpath to work.
28700      new_path="$CYGWIN_ROOT_PATH$input_path"
28701    fi
28702  fi
28703
28704
28705  if test "x$path" != "x$new_path"; then
28706    BOOT_JDK="$new_path"
28707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28709  fi
28710
28711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28712
28713  path="$BOOT_JDK"
28714  has_colon=`$ECHO $path | $GREP ^.:`
28715  new_path="$path"
28716  if test "x$has_colon" = x; then
28717    # Not in mixed or Windows style, start by that.
28718    new_path=`cmd //c echo $path`
28719  fi
28720
28721
28722  input_path="$new_path"
28723  # Check if we need to convert this using DOS-style short mode. If the path
28724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28725  # take no chances and rewrite it.
28726  # Note: m4 eats our [], so we need to use [ and ] instead.
28727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28728  if test "x$has_forbidden_chars" != x; then
28729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28731  fi
28732
28733
28734  windows_path="$new_path"
28735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28736    unix_path=`$CYGPATH -u "$windows_path"`
28737    new_path="$unix_path"
28738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28740    new_path="$unix_path"
28741  fi
28742
28743  if test "x$path" != "x$new_path"; then
28744    BOOT_JDK="$new_path"
28745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28747  fi
28748
28749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28751
28752    else
28753      # We're on a unix platform. Hooray! :)
28754      path="$BOOT_JDK"
28755      has_space=`$ECHO "$path" | $GREP " "`
28756      if test "x$has_space" != x; then
28757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28760      fi
28761
28762      # Use eval to expand a potential ~
28763      eval path="$path"
28764      if test ! -f "$path" && test ! -d "$path"; then
28765        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28766      fi
28767
28768      if test -d "$path"; then
28769        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28770      else
28771        dir="`$DIRNAME "$path"`"
28772        base="`$BASENAME "$path"`"
28773        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28774      fi
28775    fi
28776  fi
28777
28778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28779$as_echo_n "checking for Boot JDK... " >&6; }
28780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28781$as_echo "$BOOT_JDK" >&6; }
28782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28783$as_echo_n "checking Boot JDK version... " >&6; }
28784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28786$as_echo "$BOOT_JDK_VERSION" >&6; }
28787          fi # end check jdk version
28788        fi # end check javac
28789      fi # end check java
28790    fi # end check boot jdk found
28791  fi
28792
28793    done
28794  fi
28795
28796
28797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28799      # Do we have a bin/java?
28800      if test ! -x "$BOOT_JDK/bin/java"; then
28801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28803        BOOT_JDK_FOUND=no
28804      else
28805        # Do we have a bin/javac?
28806        if test ! -x "$BOOT_JDK/bin/javac"; then
28807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28811          BOOT_JDK_FOUND=no
28812        else
28813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28815
28816          # Extra M4 quote needed to protect [] in grep expression.
28817          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28818          if test "x$FOUND_CORRECT_VERSION" = x; then
28819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28823            BOOT_JDK_FOUND=no
28824          else
28825            # We're done! :-)
28826            BOOT_JDK_FOUND=yes
28827
28828  # Only process if variable expands to non-empty
28829
28830  if test "x$BOOT_JDK" != x; then
28831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28832
28833  # Input might be given as Windows format, start by converting to
28834  # unix format.
28835  path="$BOOT_JDK"
28836  new_path=`$CYGPATH -u "$path"`
28837
28838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28841  # "foo.exe" is OK but "foo" is an error.
28842  #
28843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28844  # It is also a way to make sure we got the proper file name for the real test later on.
28845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28846  if test "x$test_shortpath" = x; then
28847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28850  fi
28851
28852  # Call helper function which possibly converts this using DOS-style short mode.
28853  # If so, the updated path is stored in $new_path.
28854
28855  input_path="$new_path"
28856  # Check if we need to convert this using DOS-style short mode. If the path
28857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28858  # take no chances and rewrite it.
28859  # Note: m4 eats our [], so we need to use [ and ] instead.
28860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28861  if test "x$has_forbidden_chars" != x; then
28862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28866      # Going to short mode and back again did indeed matter. Since short mode is
28867      # case insensitive, let's make it lowercase to improve readability.
28868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28869      # Now convert it back to Unix-style (cygpath)
28870      input_path=`$CYGPATH -u "$shortmode_path"`
28871      new_path="$input_path"
28872    fi
28873  fi
28874
28875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28876  if test "x$test_cygdrive_prefix" = x; then
28877    # As a simple fix, exclude /usr/bin since it's not a real path.
28878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28880      # a path prefixed by /cygdrive for fixpath to work.
28881      new_path="$CYGWIN_ROOT_PATH$input_path"
28882    fi
28883  fi
28884
28885
28886  if test "x$path" != "x$new_path"; then
28887    BOOT_JDK="$new_path"
28888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28890  fi
28891
28892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28893
28894  path="$BOOT_JDK"
28895  has_colon=`$ECHO $path | $GREP ^.:`
28896  new_path="$path"
28897  if test "x$has_colon" = x; then
28898    # Not in mixed or Windows style, start by that.
28899    new_path=`cmd //c echo $path`
28900  fi
28901
28902
28903  input_path="$new_path"
28904  # Check if we need to convert this using DOS-style short mode. If the path
28905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28906  # take no chances and rewrite it.
28907  # Note: m4 eats our [], so we need to use [ and ] instead.
28908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28909  if test "x$has_forbidden_chars" != x; then
28910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28912  fi
28913
28914
28915  windows_path="$new_path"
28916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28917    unix_path=`$CYGPATH -u "$windows_path"`
28918    new_path="$unix_path"
28919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28921    new_path="$unix_path"
28922  fi
28923
28924  if test "x$path" != "x$new_path"; then
28925    BOOT_JDK="$new_path"
28926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28928  fi
28929
28930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28932
28933    else
28934      # We're on a unix platform. Hooray! :)
28935      path="$BOOT_JDK"
28936      has_space=`$ECHO "$path" | $GREP " "`
28937      if test "x$has_space" != x; then
28938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28941      fi
28942
28943      # Use eval to expand a potential ~
28944      eval path="$path"
28945      if test ! -f "$path" && test ! -d "$path"; then
28946        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28947      fi
28948
28949      if test -d "$path"; then
28950        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28951      else
28952        dir="`$DIRNAME "$path"`"
28953        base="`$BASENAME "$path"`"
28954        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28955      fi
28956    fi
28957  fi
28958
28959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28960$as_echo_n "checking for Boot JDK... " >&6; }
28961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28962$as_echo "$BOOT_JDK" >&6; }
28963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28964$as_echo_n "checking Boot JDK version... " >&6; }
28965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28967$as_echo "$BOOT_JDK_VERSION" >&6; }
28968          fi # end check jdk version
28969        fi # end check javac
28970      fi # end check java
28971    fi # end check boot jdk found
28972  fi
28973
28974
28975  if test "x$BOOT_JDK_FOUND" = xno; then
28976    # Now execute the test
28977
28978  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28979  BOOT_JDK_SUFFIX="/Contents/Home"
28980  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28981  if test "x$ALL_JDKS_FOUND" != x; then
28982    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28983
28984  if test "x$BOOT_JDK_FOUND" = xno; then
28985    # Now execute the test
28986
28987        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28988        if test -d "$BOOT_JDK"; then
28989          BOOT_JDK_FOUND=maybe
28990          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28991$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28992        fi
28993
28994
28995    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28996    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28997      # Do we have a bin/java?
28998      if test ! -x "$BOOT_JDK/bin/java"; then
28999        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29001        BOOT_JDK_FOUND=no
29002      else
29003        # Do we have a bin/javac?
29004        if test ! -x "$BOOT_JDK/bin/javac"; then
29005          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29007          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29008$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29009          BOOT_JDK_FOUND=no
29010        else
29011          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29012          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29013
29014          # Extra M4 quote needed to protect [] in grep expression.
29015          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29016          if test "x$FOUND_CORRECT_VERSION" = x; then
29017            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29019            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29020$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29021            BOOT_JDK_FOUND=no
29022          else
29023            # We're done! :-)
29024            BOOT_JDK_FOUND=yes
29025
29026  # Only process if variable expands to non-empty
29027
29028  if test "x$BOOT_JDK" != x; then
29029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29030
29031  # Input might be given as Windows format, start by converting to
29032  # unix format.
29033  path="$BOOT_JDK"
29034  new_path=`$CYGPATH -u "$path"`
29035
29036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29039  # "foo.exe" is OK but "foo" is an error.
29040  #
29041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29042  # It is also a way to make sure we got the proper file name for the real test later on.
29043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29044  if test "x$test_shortpath" = x; then
29045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29047    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29048  fi
29049
29050  # Call helper function which possibly converts this using DOS-style short mode.
29051  # If so, the updated path is stored in $new_path.
29052
29053  input_path="$new_path"
29054  # Check if we need to convert this using DOS-style short mode. If the path
29055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29056  # take no chances and rewrite it.
29057  # Note: m4 eats our [], so we need to use [ and ] instead.
29058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29059  if test "x$has_forbidden_chars" != x; then
29060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29064      # Going to short mode and back again did indeed matter. Since short mode is
29065      # case insensitive, let's make it lowercase to improve readability.
29066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29067      # Now convert it back to Unix-style (cygpath)
29068      input_path=`$CYGPATH -u "$shortmode_path"`
29069      new_path="$input_path"
29070    fi
29071  fi
29072
29073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29074  if test "x$test_cygdrive_prefix" = x; then
29075    # As a simple fix, exclude /usr/bin since it's not a real path.
29076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29078      # a path prefixed by /cygdrive for fixpath to work.
29079      new_path="$CYGWIN_ROOT_PATH$input_path"
29080    fi
29081  fi
29082
29083
29084  if test "x$path" != "x$new_path"; then
29085    BOOT_JDK="$new_path"
29086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29088  fi
29089
29090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29091
29092  path="$BOOT_JDK"
29093  has_colon=`$ECHO $path | $GREP ^.:`
29094  new_path="$path"
29095  if test "x$has_colon" = x; then
29096    # Not in mixed or Windows style, start by that.
29097    new_path=`cmd //c echo $path`
29098  fi
29099
29100
29101  input_path="$new_path"
29102  # Check if we need to convert this using DOS-style short mode. If the path
29103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29104  # take no chances and rewrite it.
29105  # Note: m4 eats our [], so we need to use [ and ] instead.
29106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29107  if test "x$has_forbidden_chars" != x; then
29108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29110  fi
29111
29112
29113  windows_path="$new_path"
29114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29115    unix_path=`$CYGPATH -u "$windows_path"`
29116    new_path="$unix_path"
29117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29119    new_path="$unix_path"
29120  fi
29121
29122  if test "x$path" != "x$new_path"; then
29123    BOOT_JDK="$new_path"
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29126  fi
29127
29128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29130
29131    else
29132      # We're on a unix platform. Hooray! :)
29133      path="$BOOT_JDK"
29134      has_space=`$ECHO "$path" | $GREP " "`
29135      if test "x$has_space" != x; then
29136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29137$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29139      fi
29140
29141      # Use eval to expand a potential ~
29142      eval path="$path"
29143      if test ! -f "$path" && test ! -d "$path"; then
29144        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29145      fi
29146
29147      if test -d "$path"; then
29148        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29149      else
29150        dir="`$DIRNAME "$path"`"
29151        base="`$BASENAME "$path"`"
29152        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29153      fi
29154    fi
29155  fi
29156
29157            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29158$as_echo_n "checking for Boot JDK... " >&6; }
29159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29160$as_echo "$BOOT_JDK" >&6; }
29161            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29162$as_echo_n "checking Boot JDK version... " >&6; }
29163            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29165$as_echo "$BOOT_JDK_VERSION" >&6; }
29166          fi # end check jdk version
29167        fi # end check javac
29168      fi # end check java
29169    fi # end check boot jdk found
29170  fi
29171
29172    done
29173  fi
29174
29175
29176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29178      # Do we have a bin/java?
29179      if test ! -x "$BOOT_JDK/bin/java"; then
29180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29182        BOOT_JDK_FOUND=no
29183      else
29184        # Do we have a bin/javac?
29185        if test ! -x "$BOOT_JDK/bin/javac"; then
29186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29190          BOOT_JDK_FOUND=no
29191        else
29192          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29193          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29194
29195          # Extra M4 quote needed to protect [] in grep expression.
29196          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29197          if test "x$FOUND_CORRECT_VERSION" = x; then
29198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29200            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29201$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29202            BOOT_JDK_FOUND=no
29203          else
29204            # We're done! :-)
29205            BOOT_JDK_FOUND=yes
29206
29207  # Only process if variable expands to non-empty
29208
29209  if test "x$BOOT_JDK" != x; then
29210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29211
29212  # Input might be given as Windows format, start by converting to
29213  # unix format.
29214  path="$BOOT_JDK"
29215  new_path=`$CYGPATH -u "$path"`
29216
29217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29220  # "foo.exe" is OK but "foo" is an error.
29221  #
29222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29223  # It is also a way to make sure we got the proper file name for the real test later on.
29224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29225  if test "x$test_shortpath" = x; then
29226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29229  fi
29230
29231  # Call helper function which possibly converts this using DOS-style short mode.
29232  # If so, the updated path is stored in $new_path.
29233
29234  input_path="$new_path"
29235  # Check if we need to convert this using DOS-style short mode. If the path
29236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29237  # take no chances and rewrite it.
29238  # Note: m4 eats our [], so we need to use [ and ] instead.
29239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29240  if test "x$has_forbidden_chars" != x; then
29241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29245      # Going to short mode and back again did indeed matter. Since short mode is
29246      # case insensitive, let's make it lowercase to improve readability.
29247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29248      # Now convert it back to Unix-style (cygpath)
29249      input_path=`$CYGPATH -u "$shortmode_path"`
29250      new_path="$input_path"
29251    fi
29252  fi
29253
29254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29255  if test "x$test_cygdrive_prefix" = x; then
29256    # As a simple fix, exclude /usr/bin since it's not a real path.
29257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29259      # a path prefixed by /cygdrive for fixpath to work.
29260      new_path="$CYGWIN_ROOT_PATH$input_path"
29261    fi
29262  fi
29263
29264
29265  if test "x$path" != "x$new_path"; then
29266    BOOT_JDK="$new_path"
29267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29269  fi
29270
29271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29272
29273  path="$BOOT_JDK"
29274  has_colon=`$ECHO $path | $GREP ^.:`
29275  new_path="$path"
29276  if test "x$has_colon" = x; then
29277    # Not in mixed or Windows style, start by that.
29278    new_path=`cmd //c echo $path`
29279  fi
29280
29281
29282  input_path="$new_path"
29283  # Check if we need to convert this using DOS-style short mode. If the path
29284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29285  # take no chances and rewrite it.
29286  # Note: m4 eats our [], so we need to use [ and ] instead.
29287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29288  if test "x$has_forbidden_chars" != x; then
29289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29291  fi
29292
29293
29294  windows_path="$new_path"
29295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29296    unix_path=`$CYGPATH -u "$windows_path"`
29297    new_path="$unix_path"
29298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29300    new_path="$unix_path"
29301  fi
29302
29303  if test "x$path" != "x$new_path"; then
29304    BOOT_JDK="$new_path"
29305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29307  fi
29308
29309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29311
29312    else
29313      # We're on a unix platform. Hooray! :)
29314      path="$BOOT_JDK"
29315      has_space=`$ECHO "$path" | $GREP " "`
29316      if test "x$has_space" != x; then
29317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29320      fi
29321
29322      # Use eval to expand a potential ~
29323      eval path="$path"
29324      if test ! -f "$path" && test ! -d "$path"; then
29325        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29326      fi
29327
29328      if test -d "$path"; then
29329        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29330      else
29331        dir="`$DIRNAME "$path"`"
29332        base="`$BASENAME "$path"`"
29333        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29334      fi
29335    fi
29336  fi
29337
29338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29339$as_echo_n "checking for Boot JDK... " >&6; }
29340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29341$as_echo "$BOOT_JDK" >&6; }
29342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29343$as_echo_n "checking Boot JDK version... " >&6; }
29344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29346$as_echo "$BOOT_JDK_VERSION" >&6; }
29347          fi # end check jdk version
29348        fi # end check javac
29349      fi # end check java
29350    fi # end check boot jdk found
29351  fi
29352
29353  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29354
29355  if test "x$BOOT_JDK_FOUND" = xno; then
29356    # Now execute the test
29357
29358  BOOT_JDK_PREFIX="/usr/lib/jvm"
29359  BOOT_JDK_SUFFIX=""
29360  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29361  if test "x$ALL_JDKS_FOUND" != x; then
29362    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29363
29364  if test "x$BOOT_JDK_FOUND" = xno; then
29365    # Now execute the test
29366
29367        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29368        if test -d "$BOOT_JDK"; then
29369          BOOT_JDK_FOUND=maybe
29370          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29371$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29372        fi
29373
29374
29375    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29376    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29377      # Do we have a bin/java?
29378      if test ! -x "$BOOT_JDK/bin/java"; then
29379        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29381        BOOT_JDK_FOUND=no
29382      else
29383        # Do we have a bin/javac?
29384        if test ! -x "$BOOT_JDK/bin/javac"; then
29385          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29387          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29388$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29389          BOOT_JDK_FOUND=no
29390        else
29391          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29392          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29393
29394          # Extra M4 quote needed to protect [] in grep expression.
29395          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29396          if test "x$FOUND_CORRECT_VERSION" = x; then
29397            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29399            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29400$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29401            BOOT_JDK_FOUND=no
29402          else
29403            # We're done! :-)
29404            BOOT_JDK_FOUND=yes
29405
29406  # Only process if variable expands to non-empty
29407
29408  if test "x$BOOT_JDK" != x; then
29409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29410
29411  # Input might be given as Windows format, start by converting to
29412  # unix format.
29413  path="$BOOT_JDK"
29414  new_path=`$CYGPATH -u "$path"`
29415
29416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29419  # "foo.exe" is OK but "foo" is an error.
29420  #
29421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29422  # It is also a way to make sure we got the proper file name for the real test later on.
29423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29424  if test "x$test_shortpath" = x; then
29425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29428  fi
29429
29430  # Call helper function which possibly converts this using DOS-style short mode.
29431  # If so, the updated path is stored in $new_path.
29432
29433  input_path="$new_path"
29434  # Check if we need to convert this using DOS-style short mode. If the path
29435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29436  # take no chances and rewrite it.
29437  # Note: m4 eats our [], so we need to use [ and ] instead.
29438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29439  if test "x$has_forbidden_chars" != x; then
29440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29444      # Going to short mode and back again did indeed matter. Since short mode is
29445      # case insensitive, let's make it lowercase to improve readability.
29446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29447      # Now convert it back to Unix-style (cygpath)
29448      input_path=`$CYGPATH -u "$shortmode_path"`
29449      new_path="$input_path"
29450    fi
29451  fi
29452
29453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29454  if test "x$test_cygdrive_prefix" = x; then
29455    # As a simple fix, exclude /usr/bin since it's not a real path.
29456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29458      # a path prefixed by /cygdrive for fixpath to work.
29459      new_path="$CYGWIN_ROOT_PATH$input_path"
29460    fi
29461  fi
29462
29463
29464  if test "x$path" != "x$new_path"; then
29465    BOOT_JDK="$new_path"
29466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29468  fi
29469
29470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29471
29472  path="$BOOT_JDK"
29473  has_colon=`$ECHO $path | $GREP ^.:`
29474  new_path="$path"
29475  if test "x$has_colon" = x; then
29476    # Not in mixed or Windows style, start by that.
29477    new_path=`cmd //c echo $path`
29478  fi
29479
29480
29481  input_path="$new_path"
29482  # Check if we need to convert this using DOS-style short mode. If the path
29483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29484  # take no chances and rewrite it.
29485  # Note: m4 eats our [], so we need to use [ and ] instead.
29486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29487  if test "x$has_forbidden_chars" != x; then
29488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29490  fi
29491
29492
29493  windows_path="$new_path"
29494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29495    unix_path=`$CYGPATH -u "$windows_path"`
29496    new_path="$unix_path"
29497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29499    new_path="$unix_path"
29500  fi
29501
29502  if test "x$path" != "x$new_path"; then
29503    BOOT_JDK="$new_path"
29504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29506  fi
29507
29508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29510
29511    else
29512      # We're on a unix platform. Hooray! :)
29513      path="$BOOT_JDK"
29514      has_space=`$ECHO "$path" | $GREP " "`
29515      if test "x$has_space" != x; then
29516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29519      fi
29520
29521      # Use eval to expand a potential ~
29522      eval path="$path"
29523      if test ! -f "$path" && test ! -d "$path"; then
29524        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29525      fi
29526
29527      if test -d "$path"; then
29528        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29529      else
29530        dir="`$DIRNAME "$path"`"
29531        base="`$BASENAME "$path"`"
29532        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29533      fi
29534    fi
29535  fi
29536
29537            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29538$as_echo_n "checking for Boot JDK... " >&6; }
29539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29540$as_echo "$BOOT_JDK" >&6; }
29541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29542$as_echo_n "checking Boot JDK version... " >&6; }
29543            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29545$as_echo "$BOOT_JDK_VERSION" >&6; }
29546          fi # end check jdk version
29547        fi # end check javac
29548      fi # end check java
29549    fi # end check boot jdk found
29550  fi
29551
29552    done
29553  fi
29554
29555
29556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29558      # Do we have a bin/java?
29559      if test ! -x "$BOOT_JDK/bin/java"; then
29560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29562        BOOT_JDK_FOUND=no
29563      else
29564        # Do we have a bin/javac?
29565        if test ! -x "$BOOT_JDK/bin/javac"; then
29566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29570          BOOT_JDK_FOUND=no
29571        else
29572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29574
29575          # Extra M4 quote needed to protect [] in grep expression.
29576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29577          if test "x$FOUND_CORRECT_VERSION" = x; then
29578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29582            BOOT_JDK_FOUND=no
29583          else
29584            # We're done! :-)
29585            BOOT_JDK_FOUND=yes
29586
29587  # Only process if variable expands to non-empty
29588
29589  if test "x$BOOT_JDK" != x; then
29590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29591
29592  # Input might be given as Windows format, start by converting to
29593  # unix format.
29594  path="$BOOT_JDK"
29595  new_path=`$CYGPATH -u "$path"`
29596
29597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29600  # "foo.exe" is OK but "foo" is an error.
29601  #
29602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29603  # It is also a way to make sure we got the proper file name for the real test later on.
29604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29605  if test "x$test_shortpath" = x; then
29606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29609  fi
29610
29611  # Call helper function which possibly converts this using DOS-style short mode.
29612  # If so, the updated path is stored in $new_path.
29613
29614  input_path="$new_path"
29615  # Check if we need to convert this using DOS-style short mode. If the path
29616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29617  # take no chances and rewrite it.
29618  # Note: m4 eats our [], so we need to use [ and ] instead.
29619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29620  if test "x$has_forbidden_chars" != x; then
29621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29625      # Going to short mode and back again did indeed matter. Since short mode is
29626      # case insensitive, let's make it lowercase to improve readability.
29627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29628      # Now convert it back to Unix-style (cygpath)
29629      input_path=`$CYGPATH -u "$shortmode_path"`
29630      new_path="$input_path"
29631    fi
29632  fi
29633
29634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29635  if test "x$test_cygdrive_prefix" = x; then
29636    # As a simple fix, exclude /usr/bin since it's not a real path.
29637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29639      # a path prefixed by /cygdrive for fixpath to work.
29640      new_path="$CYGWIN_ROOT_PATH$input_path"
29641    fi
29642  fi
29643
29644
29645  if test "x$path" != "x$new_path"; then
29646    BOOT_JDK="$new_path"
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29649  fi
29650
29651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29652
29653  path="$BOOT_JDK"
29654  has_colon=`$ECHO $path | $GREP ^.:`
29655  new_path="$path"
29656  if test "x$has_colon" = x; then
29657    # Not in mixed or Windows style, start by that.
29658    new_path=`cmd //c echo $path`
29659  fi
29660
29661
29662  input_path="$new_path"
29663  # Check if we need to convert this using DOS-style short mode. If the path
29664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29665  # take no chances and rewrite it.
29666  # Note: m4 eats our [], so we need to use [ and ] instead.
29667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29668  if test "x$has_forbidden_chars" != x; then
29669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29671  fi
29672
29673
29674  windows_path="$new_path"
29675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29676    unix_path=`$CYGPATH -u "$windows_path"`
29677    new_path="$unix_path"
29678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29680    new_path="$unix_path"
29681  fi
29682
29683  if test "x$path" != "x$new_path"; then
29684    BOOT_JDK="$new_path"
29685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29687  fi
29688
29689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29691
29692    else
29693      # We're on a unix platform. Hooray! :)
29694      path="$BOOT_JDK"
29695      has_space=`$ECHO "$path" | $GREP " "`
29696      if test "x$has_space" != x; then
29697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29700      fi
29701
29702      # Use eval to expand a potential ~
29703      eval path="$path"
29704      if test ! -f "$path" && test ! -d "$path"; then
29705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29706      fi
29707
29708      if test -d "$path"; then
29709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29710      else
29711        dir="`$DIRNAME "$path"`"
29712        base="`$BASENAME "$path"`"
29713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29714      fi
29715    fi
29716  fi
29717
29718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29719$as_echo_n "checking for Boot JDK... " >&6; }
29720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29721$as_echo "$BOOT_JDK" >&6; }
29722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29723$as_echo_n "checking Boot JDK version... " >&6; }
29724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29726$as_echo "$BOOT_JDK_VERSION" >&6; }
29727          fi # end check jdk version
29728        fi # end check javac
29729      fi # end check java
29730    fi # end check boot jdk found
29731  fi
29732
29733  fi
29734
29735
29736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29738      # Do we have a bin/java?
29739      if test ! -x "$BOOT_JDK/bin/java"; then
29740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29742        BOOT_JDK_FOUND=no
29743      else
29744        # Do we have a bin/javac?
29745        if test ! -x "$BOOT_JDK/bin/javac"; then
29746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29750          BOOT_JDK_FOUND=no
29751        else
29752          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29753          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29754
29755          # Extra M4 quote needed to protect [] in grep expression.
29756          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29757          if test "x$FOUND_CORRECT_VERSION" = x; then
29758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29760            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29761$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29762            BOOT_JDK_FOUND=no
29763          else
29764            # We're done! :-)
29765            BOOT_JDK_FOUND=yes
29766
29767  # Only process if variable expands to non-empty
29768
29769  if test "x$BOOT_JDK" != x; then
29770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29771
29772  # Input might be given as Windows format, start by converting to
29773  # unix format.
29774  path="$BOOT_JDK"
29775  new_path=`$CYGPATH -u "$path"`
29776
29777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29780  # "foo.exe" is OK but "foo" is an error.
29781  #
29782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29783  # It is also a way to make sure we got the proper file name for the real test later on.
29784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29785  if test "x$test_shortpath" = x; then
29786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29789  fi
29790
29791  # Call helper function which possibly converts this using DOS-style short mode.
29792  # If so, the updated path is stored in $new_path.
29793
29794  input_path="$new_path"
29795  # Check if we need to convert this using DOS-style short mode. If the path
29796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29797  # take no chances and rewrite it.
29798  # Note: m4 eats our [], so we need to use [ and ] instead.
29799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29800  if test "x$has_forbidden_chars" != x; then
29801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29805      # Going to short mode and back again did indeed matter. Since short mode is
29806      # case insensitive, let's make it lowercase to improve readability.
29807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29808      # Now convert it back to Unix-style (cygpath)
29809      input_path=`$CYGPATH -u "$shortmode_path"`
29810      new_path="$input_path"
29811    fi
29812  fi
29813
29814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29815  if test "x$test_cygdrive_prefix" = x; then
29816    # As a simple fix, exclude /usr/bin since it's not a real path.
29817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29819      # a path prefixed by /cygdrive for fixpath to work.
29820      new_path="$CYGWIN_ROOT_PATH$input_path"
29821    fi
29822  fi
29823
29824
29825  if test "x$path" != "x$new_path"; then
29826    BOOT_JDK="$new_path"
29827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29829  fi
29830
29831    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29832
29833  path="$BOOT_JDK"
29834  has_colon=`$ECHO $path | $GREP ^.:`
29835  new_path="$path"
29836  if test "x$has_colon" = x; then
29837    # Not in mixed or Windows style, start by that.
29838    new_path=`cmd //c echo $path`
29839  fi
29840
29841
29842  input_path="$new_path"
29843  # Check if we need to convert this using DOS-style short mode. If the path
29844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29845  # take no chances and rewrite it.
29846  # Note: m4 eats our [], so we need to use [ and ] instead.
29847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29848  if test "x$has_forbidden_chars" != x; then
29849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29851  fi
29852
29853
29854  windows_path="$new_path"
29855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29856    unix_path=`$CYGPATH -u "$windows_path"`
29857    new_path="$unix_path"
29858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29860    new_path="$unix_path"
29861  fi
29862
29863  if test "x$path" != "x$new_path"; then
29864    BOOT_JDK="$new_path"
29865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29867  fi
29868
29869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29871
29872    else
29873      # We're on a unix platform. Hooray! :)
29874      path="$BOOT_JDK"
29875      has_space=`$ECHO "$path" | $GREP " "`
29876      if test "x$has_space" != x; then
29877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29879        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29880      fi
29881
29882      # Use eval to expand a potential ~
29883      eval path="$path"
29884      if test ! -f "$path" && test ! -d "$path"; then
29885        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29886      fi
29887
29888      if test -d "$path"; then
29889        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29890      else
29891        dir="`$DIRNAME "$path"`"
29892        base="`$BASENAME "$path"`"
29893        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29894      fi
29895    fi
29896  fi
29897
29898            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29899$as_echo_n "checking for Boot JDK... " >&6; }
29900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29901$as_echo "$BOOT_JDK" >&6; }
29902            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29903$as_echo_n "checking Boot JDK version... " >&6; }
29904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29906$as_echo "$BOOT_JDK_VERSION" >&6; }
29907          fi # end check jdk version
29908        fi # end check javac
29909      fi # end check java
29910    fi # end check boot jdk found
29911  fi
29912
29913
29914  # If we haven't found anything yet, we've truly lost. Give up.
29915  if test "x$BOOT_JDK_FOUND" = xno; then
29916
29917  # Print a helpful message on how to acquire the necessary build dependency.
29918  # openjdk is the help tag: freetype, cups, alsa etc
29919  MISSING_DEPENDENCY=openjdk
29920
29921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29922    cygwin_help $MISSING_DEPENDENCY
29923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29924    msys_help $MISSING_DEPENDENCY
29925  else
29926    PKGHANDLER_COMMAND=
29927
29928    case $PKGHANDLER in
29929      apt-get)
29930        apt_help     $MISSING_DEPENDENCY ;;
29931      yum)
29932        yum_help     $MISSING_DEPENDENCY ;;
29933      brew)
29934        brew_help    $MISSING_DEPENDENCY ;;
29935      port)
29936        port_help    $MISSING_DEPENDENCY ;;
29937      pkgutil)
29938        pkgutil_help $MISSING_DEPENDENCY ;;
29939      pkgadd)
29940        pkgadd_help  $MISSING_DEPENDENCY ;;
29941    esac
29942
29943    if test "x$PKGHANDLER_COMMAND" != x; then
29944      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29945    fi
29946  fi
29947
29948    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29949$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29950    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29951$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29952    as_fn_error $? "Cannot continue" "$LINENO" 5
29953  fi
29954
29955
29956
29957  # Setup tools from the Boot JDK.
29958
29959  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29960
29961  # Publish this variable in the help.
29962
29963
29964  if [ -z "${JAVA+x}" ]; then
29965    # The variable is not set by user, try to locate tool using the code snippet
29966
29967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29968$as_echo_n "checking for java in Boot JDK... " >&6; }
29969      JAVA=$BOOT_JDK/bin/java
29970      if test ! -x $JAVA; then
29971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29972$as_echo "not found" >&6; }
29973        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29974$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29975        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29976      fi
29977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29978$as_echo "ok" >&6; }
29979
29980
29981  else
29982    # The variable is set, but is it from the command line or the environment?
29983
29984    # Try to remove the string !JAVA! from our list.
29985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29987      # If it failed, the variable was not from the command line. Ignore it,
29988      # but warn the user (except for BASH, which is always set by the calling BASH).
29989      if test "xJAVA" != xBASH; then
29990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29991$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29992      fi
29993      # Try to locate tool using the code snippet
29994
29995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29996$as_echo_n "checking for java in Boot JDK... " >&6; }
29997      JAVA=$BOOT_JDK/bin/java
29998      if test ! -x $JAVA; then
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30000$as_echo "not found" >&6; }
30001        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30002$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30003        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30004      fi
30005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30006$as_echo "ok" >&6; }
30007
30008
30009    else
30010      # If it succeeded, then it was overridden by the user. We will use it
30011      # for the tool.
30012
30013      # First remove it from the list of overridden variables, so we can test
30014      # for unknown variables in the end.
30015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30016
30017      # Check if we try to supply an empty value
30018      if test "x$JAVA" = x; then
30019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30020$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30022$as_echo_n "checking for JAVA... " >&6; }
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30024$as_echo "disabled" >&6; }
30025      else
30026        # Check if the provided tool contains a complete path.
30027        tool_specified="$JAVA"
30028        tool_basename="${tool_specified##*/}"
30029        if test "x$tool_basename" = "x$tool_specified"; then
30030          # A command without a complete path is provided, search $PATH.
30031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30032$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30033          # Extract the first word of "$tool_basename", so it can be a program name with args.
30034set dummy $tool_basename; ac_word=$2
30035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30036$as_echo_n "checking for $ac_word... " >&6; }
30037if ${ac_cv_path_JAVA+:} false; then :
30038  $as_echo_n "(cached) " >&6
30039else
30040  case $JAVA in
30041  [\\/]* | ?:[\\/]*)
30042  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30043  ;;
30044  *)
30045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30046for as_dir in $PATH
30047do
30048  IFS=$as_save_IFS
30049  test -z "$as_dir" && as_dir=.
30050    for ac_exec_ext in '' $ac_executable_extensions; do
30051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30052    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30054    break 2
30055  fi
30056done
30057  done
30058IFS=$as_save_IFS
30059
30060  ;;
30061esac
30062fi
30063JAVA=$ac_cv_path_JAVA
30064if test -n "$JAVA"; then
30065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30066$as_echo "$JAVA" >&6; }
30067else
30068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30069$as_echo "no" >&6; }
30070fi
30071
30072
30073          if test "x$JAVA" = x; then
30074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30075          fi
30076        else
30077          # Otherwise we believe it is a complete path. Use it as it is.
30078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30079$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30081$as_echo_n "checking for JAVA... " >&6; }
30082          if test ! -x "$tool_specified"; then
30083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30084$as_echo "not found" >&6; }
30085            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30086          fi
30087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30088$as_echo "$tool_specified" >&6; }
30089        fi
30090      fi
30091    fi
30092
30093  fi
30094
30095
30096
30097  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30098
30099  # Publish this variable in the help.
30100
30101
30102  if [ -z "${JAVAC+x}" ]; then
30103    # The variable is not set by user, try to locate tool using the code snippet
30104
30105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30106$as_echo_n "checking for javac in Boot JDK... " >&6; }
30107      JAVAC=$BOOT_JDK/bin/javac
30108      if test ! -x $JAVAC; then
30109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30110$as_echo "not found" >&6; }
30111        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30112$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30113        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30114      fi
30115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30116$as_echo "ok" >&6; }
30117
30118
30119  else
30120    # The variable is set, but is it from the command line or the environment?
30121
30122    # Try to remove the string !JAVAC! from our list.
30123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30125      # If it failed, the variable was not from the command line. Ignore it,
30126      # but warn the user (except for BASH, which is always set by the calling BASH).
30127      if test "xJAVAC" != xBASH; then
30128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30129$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30130      fi
30131      # Try to locate tool using the code snippet
30132
30133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30134$as_echo_n "checking for javac in Boot JDK... " >&6; }
30135      JAVAC=$BOOT_JDK/bin/javac
30136      if test ! -x $JAVAC; then
30137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30138$as_echo "not found" >&6; }
30139        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30140$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30141        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30142      fi
30143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30144$as_echo "ok" >&6; }
30145
30146
30147    else
30148      # If it succeeded, then it was overridden by the user. We will use it
30149      # for the tool.
30150
30151      # First remove it from the list of overridden variables, so we can test
30152      # for unknown variables in the end.
30153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30154
30155      # Check if we try to supply an empty value
30156      if test "x$JAVAC" = x; then
30157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30158$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30160$as_echo_n "checking for JAVAC... " >&6; }
30161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30162$as_echo "disabled" >&6; }
30163      else
30164        # Check if the provided tool contains a complete path.
30165        tool_specified="$JAVAC"
30166        tool_basename="${tool_specified##*/}"
30167        if test "x$tool_basename" = "x$tool_specified"; then
30168          # A command without a complete path is provided, search $PATH.
30169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30170$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30171          # Extract the first word of "$tool_basename", so it can be a program name with args.
30172set dummy $tool_basename; ac_word=$2
30173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30174$as_echo_n "checking for $ac_word... " >&6; }
30175if ${ac_cv_path_JAVAC+:} false; then :
30176  $as_echo_n "(cached) " >&6
30177else
30178  case $JAVAC in
30179  [\\/]* | ?:[\\/]*)
30180  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30181  ;;
30182  *)
30183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30184for as_dir in $PATH
30185do
30186  IFS=$as_save_IFS
30187  test -z "$as_dir" && as_dir=.
30188    for ac_exec_ext in '' $ac_executable_extensions; do
30189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30190    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30192    break 2
30193  fi
30194done
30195  done
30196IFS=$as_save_IFS
30197
30198  ;;
30199esac
30200fi
30201JAVAC=$ac_cv_path_JAVAC
30202if test -n "$JAVAC"; then
30203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30204$as_echo "$JAVAC" >&6; }
30205else
30206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30207$as_echo "no" >&6; }
30208fi
30209
30210
30211          if test "x$JAVAC" = x; then
30212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30213          fi
30214        else
30215          # Otherwise we believe it is a complete path. Use it as it is.
30216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30217$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30219$as_echo_n "checking for JAVAC... " >&6; }
30220          if test ! -x "$tool_specified"; then
30221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30222$as_echo "not found" >&6; }
30223            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30224          fi
30225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30226$as_echo "$tool_specified" >&6; }
30227        fi
30228      fi
30229    fi
30230
30231  fi
30232
30233
30234
30235  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30236
30237  # Publish this variable in the help.
30238
30239
30240  if [ -z "${JAVAH+x}" ]; then
30241    # The variable is not set by user, try to locate tool using the code snippet
30242
30243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30244$as_echo_n "checking for javah in Boot JDK... " >&6; }
30245      JAVAH=$BOOT_JDK/bin/javah
30246      if test ! -x $JAVAH; then
30247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30248$as_echo "not found" >&6; }
30249        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30250$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30251        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30252      fi
30253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30254$as_echo "ok" >&6; }
30255
30256
30257  else
30258    # The variable is set, but is it from the command line or the environment?
30259
30260    # Try to remove the string !JAVAH! from our list.
30261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30263      # If it failed, the variable was not from the command line. Ignore it,
30264      # but warn the user (except for BASH, which is always set by the calling BASH).
30265      if test "xJAVAH" != xBASH; then
30266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30267$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30268      fi
30269      # Try to locate tool using the code snippet
30270
30271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30272$as_echo_n "checking for javah in Boot JDK... " >&6; }
30273      JAVAH=$BOOT_JDK/bin/javah
30274      if test ! -x $JAVAH; then
30275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30276$as_echo "not found" >&6; }
30277        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30278$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30279        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30280      fi
30281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30282$as_echo "ok" >&6; }
30283
30284
30285    else
30286      # If it succeeded, then it was overridden by the user. We will use it
30287      # for the tool.
30288
30289      # First remove it from the list of overridden variables, so we can test
30290      # for unknown variables in the end.
30291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30292
30293      # Check if we try to supply an empty value
30294      if test "x$JAVAH" = x; then
30295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30296$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30298$as_echo_n "checking for JAVAH... " >&6; }
30299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30300$as_echo "disabled" >&6; }
30301      else
30302        # Check if the provided tool contains a complete path.
30303        tool_specified="$JAVAH"
30304        tool_basename="${tool_specified##*/}"
30305        if test "x$tool_basename" = "x$tool_specified"; then
30306          # A command without a complete path is provided, search $PATH.
30307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30308$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30309          # Extract the first word of "$tool_basename", so it can be a program name with args.
30310set dummy $tool_basename; ac_word=$2
30311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30312$as_echo_n "checking for $ac_word... " >&6; }
30313if ${ac_cv_path_JAVAH+:} false; then :
30314  $as_echo_n "(cached) " >&6
30315else
30316  case $JAVAH in
30317  [\\/]* | ?:[\\/]*)
30318  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30319  ;;
30320  *)
30321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30322for as_dir in $PATH
30323do
30324  IFS=$as_save_IFS
30325  test -z "$as_dir" && as_dir=.
30326    for ac_exec_ext in '' $ac_executable_extensions; do
30327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30328    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30330    break 2
30331  fi
30332done
30333  done
30334IFS=$as_save_IFS
30335
30336  ;;
30337esac
30338fi
30339JAVAH=$ac_cv_path_JAVAH
30340if test -n "$JAVAH"; then
30341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30342$as_echo "$JAVAH" >&6; }
30343else
30344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30345$as_echo "no" >&6; }
30346fi
30347
30348
30349          if test "x$JAVAH" = x; then
30350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30351          fi
30352        else
30353          # Otherwise we believe it is a complete path. Use it as it is.
30354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30355$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30357$as_echo_n "checking for JAVAH... " >&6; }
30358          if test ! -x "$tool_specified"; then
30359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30360$as_echo "not found" >&6; }
30361            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30362          fi
30363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30364$as_echo "$tool_specified" >&6; }
30365        fi
30366      fi
30367    fi
30368
30369  fi
30370
30371
30372
30373  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30374
30375  # Publish this variable in the help.
30376
30377
30378  if [ -z "${JAR+x}" ]; then
30379    # The variable is not set by user, try to locate tool using the code snippet
30380
30381      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30382$as_echo_n "checking for jar in Boot JDK... " >&6; }
30383      JAR=$BOOT_JDK/bin/jar
30384      if test ! -x $JAR; then
30385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30386$as_echo "not found" >&6; }
30387        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30388$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30389        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30390      fi
30391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30392$as_echo "ok" >&6; }
30393
30394
30395  else
30396    # The variable is set, but is it from the command line or the environment?
30397
30398    # Try to remove the string !JAR! from our list.
30399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30401      # If it failed, the variable was not from the command line. Ignore it,
30402      # but warn the user (except for BASH, which is always set by the calling BASH).
30403      if test "xJAR" != xBASH; then
30404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30405$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30406      fi
30407      # Try to locate tool using the code snippet
30408
30409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30410$as_echo_n "checking for jar in Boot JDK... " >&6; }
30411      JAR=$BOOT_JDK/bin/jar
30412      if test ! -x $JAR; then
30413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30414$as_echo "not found" >&6; }
30415        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30416$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30417        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30418      fi
30419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30420$as_echo "ok" >&6; }
30421
30422
30423    else
30424      # If it succeeded, then it was overridden by the user. We will use it
30425      # for the tool.
30426
30427      # First remove it from the list of overridden variables, so we can test
30428      # for unknown variables in the end.
30429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30430
30431      # Check if we try to supply an empty value
30432      if test "x$JAR" = x; then
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30434$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30436$as_echo_n "checking for JAR... " >&6; }
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30438$as_echo "disabled" >&6; }
30439      else
30440        # Check if the provided tool contains a complete path.
30441        tool_specified="$JAR"
30442        tool_basename="${tool_specified##*/}"
30443        if test "x$tool_basename" = "x$tool_specified"; then
30444          # A command without a complete path is provided, search $PATH.
30445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30446$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30447          # Extract the first word of "$tool_basename", so it can be a program name with args.
30448set dummy $tool_basename; ac_word=$2
30449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30450$as_echo_n "checking for $ac_word... " >&6; }
30451if ${ac_cv_path_JAR+:} false; then :
30452  $as_echo_n "(cached) " >&6
30453else
30454  case $JAR in
30455  [\\/]* | ?:[\\/]*)
30456  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30457  ;;
30458  *)
30459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30460for as_dir in $PATH
30461do
30462  IFS=$as_save_IFS
30463  test -z "$as_dir" && as_dir=.
30464    for ac_exec_ext in '' $ac_executable_extensions; do
30465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30466    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30468    break 2
30469  fi
30470done
30471  done
30472IFS=$as_save_IFS
30473
30474  ;;
30475esac
30476fi
30477JAR=$ac_cv_path_JAR
30478if test -n "$JAR"; then
30479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30480$as_echo "$JAR" >&6; }
30481else
30482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30483$as_echo "no" >&6; }
30484fi
30485
30486
30487          if test "x$JAR" = x; then
30488            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30489          fi
30490        else
30491          # Otherwise we believe it is a complete path. Use it as it is.
30492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30493$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30494          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30495$as_echo_n "checking for JAR... " >&6; }
30496          if test ! -x "$tool_specified"; then
30497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30498$as_echo "not found" >&6; }
30499            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30500          fi
30501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30502$as_echo "$tool_specified" >&6; }
30503        fi
30504      fi
30505    fi
30506
30507  fi
30508
30509
30510
30511  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30512
30513  # Publish this variable in the help.
30514
30515
30516  if [ -z "${JARSIGNER+x}" ]; then
30517    # The variable is not set by user, try to locate tool using the code snippet
30518
30519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30520$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30521      JARSIGNER=$BOOT_JDK/bin/jarsigner
30522      if test ! -x $JARSIGNER; then
30523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30524$as_echo "not found" >&6; }
30525        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30526$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30527        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30528      fi
30529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30530$as_echo "ok" >&6; }
30531
30532
30533  else
30534    # The variable is set, but is it from the command line or the environment?
30535
30536    # Try to remove the string !JARSIGNER! from our list.
30537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30539      # If it failed, the variable was not from the command line. Ignore it,
30540      # but warn the user (except for BASH, which is always set by the calling BASH).
30541      if test "xJARSIGNER" != xBASH; then
30542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30543$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30544      fi
30545      # Try to locate tool using the code snippet
30546
30547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30548$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30549      JARSIGNER=$BOOT_JDK/bin/jarsigner
30550      if test ! -x $JARSIGNER; then
30551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30552$as_echo "not found" >&6; }
30553        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30554$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30555        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30556      fi
30557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30558$as_echo "ok" >&6; }
30559
30560
30561    else
30562      # If it succeeded, then it was overridden by the user. We will use it
30563      # for the tool.
30564
30565      # First remove it from the list of overridden variables, so we can test
30566      # for unknown variables in the end.
30567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30568
30569      # Check if we try to supply an empty value
30570      if test "x$JARSIGNER" = x; then
30571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30572$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30574$as_echo_n "checking for JARSIGNER... " >&6; }
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30576$as_echo "disabled" >&6; }
30577      else
30578        # Check if the provided tool contains a complete path.
30579        tool_specified="$JARSIGNER"
30580        tool_basename="${tool_specified##*/}"
30581        if test "x$tool_basename" = "x$tool_specified"; then
30582          # A command without a complete path is provided, search $PATH.
30583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30584$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30585          # Extract the first word of "$tool_basename", so it can be a program name with args.
30586set dummy $tool_basename; ac_word=$2
30587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30588$as_echo_n "checking for $ac_word... " >&6; }
30589if ${ac_cv_path_JARSIGNER+:} false; then :
30590  $as_echo_n "(cached) " >&6
30591else
30592  case $JARSIGNER in
30593  [\\/]* | ?:[\\/]*)
30594  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30595  ;;
30596  *)
30597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30598for as_dir in $PATH
30599do
30600  IFS=$as_save_IFS
30601  test -z "$as_dir" && as_dir=.
30602    for ac_exec_ext in '' $ac_executable_extensions; do
30603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30604    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30606    break 2
30607  fi
30608done
30609  done
30610IFS=$as_save_IFS
30611
30612  ;;
30613esac
30614fi
30615JARSIGNER=$ac_cv_path_JARSIGNER
30616if test -n "$JARSIGNER"; then
30617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30618$as_echo "$JARSIGNER" >&6; }
30619else
30620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30621$as_echo "no" >&6; }
30622fi
30623
30624
30625          if test "x$JARSIGNER" = x; then
30626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30627          fi
30628        else
30629          # Otherwise we believe it is a complete path. Use it as it is.
30630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30631$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30633$as_echo_n "checking for JARSIGNER... " >&6; }
30634          if test ! -x "$tool_specified"; then
30635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30636$as_echo "not found" >&6; }
30637            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30638          fi
30639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30640$as_echo "$tool_specified" >&6; }
30641        fi
30642      fi
30643    fi
30644
30645  fi
30646
30647
30648
30649  # Finally, set some other options...
30650
30651  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30652  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30653
30654
30655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30656$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30657  if "$JAVA" --list-modules > /dev/null 2>&1; then
30658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30659$as_echo "yes" >&6; }
30660    BOOT_JDK_MODULAR="true"
30661  else
30662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30663$as_echo "no" >&6; }
30664    BOOT_JDK_MODULAR="false"
30665  fi
30666
30667
30668
30669
30670  # Check if the boot jdk is 32 or 64 bit
30671  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30672    BOOT_JDK_BITS="64"
30673  else
30674    BOOT_JDK_BITS="32"
30675  fi
30676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30677$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30679$as_echo "$BOOT_JDK_BITS" >&6; }
30680
30681
30682
30683# Check whether --with-build-jdk was given.
30684if test "${with_build_jdk+set}" = set; then :
30685  withval=$with_build_jdk;
30686fi
30687
30688
30689  CREATE_BUILDJDK=false
30690  EXTERNAL_BUILDJDK=false
30691  BUILD_JDK_FOUND="no"
30692  if test "x$with_build_jdk" != "x"; then
30693
30694  if test "x$BUILD_JDK_FOUND" = xno; then
30695    # Execute the test
30696
30697       if test "x$with_build_jdk" != x; then
30698         BUILD_JDK=$with_build_jdk
30699         BUILD_JDK_FOUND=maybe
30700         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30701$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30702       fi
30703
30704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30705    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30706      # Do we have a bin/java?
30707      if test ! -x "$BUILD_JDK/bin/java"; then
30708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30709$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30710        BUILD_JDK_FOUND=no
30711      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30713$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30714        BUILD_JDK_FOUND=no
30715      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30716        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30717$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30718        BUILD_JDK_FOUND=no
30719      elif test ! -x "$BUILD_JDK/bin/javac"; then
30720        # Do we have a bin/javac?
30721        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30722$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30723        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30724$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30725        BUILD_JDK_FOUND=no
30726      else
30727        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30728        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30729
30730        # Extra M4 quote needed to protect [] in grep expression.
30731        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30732        if test "x$FOUND_CORRECT_VERSION" = x; then
30733          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30734$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30735          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30736$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30737          BUILD_JDK_FOUND=no
30738        else
30739          # We're done!
30740          BUILD_JDK_FOUND=yes
30741
30742  # Only process if variable expands to non-empty
30743
30744  if test "x$BUILD_JDK" != x; then
30745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30746
30747  # Input might be given as Windows format, start by converting to
30748  # unix format.
30749  path="$BUILD_JDK"
30750  new_path=`$CYGPATH -u "$path"`
30751
30752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30755  # "foo.exe" is OK but "foo" is an error.
30756  #
30757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30758  # It is also a way to make sure we got the proper file name for the real test later on.
30759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30760  if test "x$test_shortpath" = x; then
30761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30762$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30763    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30764  fi
30765
30766  # Call helper function which possibly converts this using DOS-style short mode.
30767  # If so, the updated path is stored in $new_path.
30768
30769  input_path="$new_path"
30770  # Check if we need to convert this using DOS-style short mode. If the path
30771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30772  # take no chances and rewrite it.
30773  # Note: m4 eats our [], so we need to use [ and ] instead.
30774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30775  if test "x$has_forbidden_chars" != x; then
30776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30780      # Going to short mode and back again did indeed matter. Since short mode is
30781      # case insensitive, let's make it lowercase to improve readability.
30782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30783      # Now convert it back to Unix-style (cygpath)
30784      input_path=`$CYGPATH -u "$shortmode_path"`
30785      new_path="$input_path"
30786    fi
30787  fi
30788
30789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30790  if test "x$test_cygdrive_prefix" = x; then
30791    # As a simple fix, exclude /usr/bin since it's not a real path.
30792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30794      # a path prefixed by /cygdrive for fixpath to work.
30795      new_path="$CYGWIN_ROOT_PATH$input_path"
30796    fi
30797  fi
30798
30799
30800  if test "x$path" != "x$new_path"; then
30801    BUILD_JDK="$new_path"
30802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30803$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30804  fi
30805
30806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30807
30808  path="$BUILD_JDK"
30809  has_colon=`$ECHO $path | $GREP ^.:`
30810  new_path="$path"
30811  if test "x$has_colon" = x; then
30812    # Not in mixed or Windows style, start by that.
30813    new_path=`cmd //c echo $path`
30814  fi
30815
30816
30817  input_path="$new_path"
30818  # Check if we need to convert this using DOS-style short mode. If the path
30819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30820  # take no chances and rewrite it.
30821  # Note: m4 eats our [], so we need to use [ and ] instead.
30822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30823  if test "x$has_forbidden_chars" != x; then
30824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30826  fi
30827
30828
30829  windows_path="$new_path"
30830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30831    unix_path=`$CYGPATH -u "$windows_path"`
30832    new_path="$unix_path"
30833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30835    new_path="$unix_path"
30836  fi
30837
30838  if test "x$path" != "x$new_path"; then
30839    BUILD_JDK="$new_path"
30840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30841$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30842  fi
30843
30844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30846
30847    else
30848      # We're on a unix platform. Hooray! :)
30849      path="$BUILD_JDK"
30850      has_space=`$ECHO "$path" | $GREP " "`
30851      if test "x$has_space" != x; then
30852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30853$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30854        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30855      fi
30856
30857      # Use eval to expand a potential ~
30858      eval path="$path"
30859      if test ! -f "$path" && test ! -d "$path"; then
30860        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30861      fi
30862
30863      if test -d "$path"; then
30864        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30865      else
30866        dir="`$DIRNAME "$path"`"
30867        base="`$BASENAME "$path"`"
30868        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30869      fi
30870    fi
30871  fi
30872
30873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30874$as_echo_n "checking for Build JDK... " >&6; }
30875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30876$as_echo "$BUILD_JDK" >&6; }
30877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30878$as_echo_n "checking Build JDK version... " >&6; }
30879          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30881$as_echo "$BUILD_JDK_VERSION" >&6; }
30882        fi # end check jdk version
30883      fi # end check java
30884    fi # end check build jdk found
30885  fi
30886
30887    EXTERNAL_BUILDJDK=true
30888  else
30889    if test "x$COMPILE_TYPE" = "xcross"; then
30890      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30891      BUILD_JDK_FOUND=yes
30892      CREATE_BUILDJDK=true
30893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30894$as_echo_n "checking for Build JDK... " >&6; }
30895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30896$as_echo "yes, will build it for the host platform" >&6; }
30897    else
30898      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30899      BUILD_JDK_FOUND=yes
30900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30901$as_echo_n "checking for Build JDK... " >&6; }
30902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30903$as_echo "yes, will use output dir" >&6; }
30904    fi
30905  fi
30906
30907  JMOD="$BUILD_JDK/bin/jmod"
30908  JLINK="$BUILD_JDK/bin/jlink"
30909
30910
30911
30912  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30914$as_echo_n "checking for Build JDK... " >&6; }
30915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30916$as_echo "no" >&6; }
30917    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30918  fi
30919
30920
30921
30922
30923
30924
30925###############################################################################
30926#
30927# Configure the sources to use. We can add or override individual directories.
30928#
30929###############################################################################
30930
30931
30932  # Where are the sources.
30933  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30934  CORBA_TOPDIR="$SRC_ROOT/corba"
30935  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30936  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30937  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30938  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30939  JDK_TOPDIR="$SRC_ROOT/jdk"
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949  # This feature is no longer supported.
30950
30951
30952
30953# Check whether --with-add-source-root was given.
30954if test "${with_add_source_root+set}" = set; then :
30955  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
30956$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30957fi
30958
30959
30960
30961
30962# Check whether --with-override-source-root was given.
30963if test "${with_override_source_root+set}" = set; then :
30964  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
30965$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30966fi
30967
30968
30969
30970
30971# Check whether --with-adds-and-overrides was given.
30972if test "${with_adds_and_overrides+set}" = set; then :
30973  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
30974$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30975fi
30976
30977
30978
30979
30980# Check whether --with-override-langtools was given.
30981if test "${with_override_langtools+set}" = set; then :
30982  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30983$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30984fi
30985
30986
30987
30988
30989# Check whether --with-override-corba was given.
30990if test "${with_override_corba+set}" = set; then :
30991  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30992$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30993fi
30994
30995
30996
30997
30998# Check whether --with-override-jaxp was given.
30999if test "${with_override_jaxp+set}" = set; then :
31000  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31001$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31002fi
31003
31004
31005
31006
31007# Check whether --with-override-jaxws was given.
31008if test "${with_override_jaxws+set}" = set; then :
31009  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31010$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31011fi
31012
31013
31014
31015
31016# Check whether --with-override-hotspot was given.
31017if test "${with_override_hotspot+set}" = set; then :
31018  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31019$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31020fi
31021
31022
31023
31024
31025# Check whether --with-override-nashorn was given.
31026if test "${with_override_nashorn+set}" = set; then :
31027  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31028$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31029fi
31030
31031
31032
31033
31034# Check whether --with-override-jdk was given.
31035if test "${with_override_jdk+set}" = set; then :
31036  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31037$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31038fi
31039
31040
31041
31042
31043  BUILD_OUTPUT="$OUTPUT_ROOT"
31044
31045  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31046
31047
31048
31049# Check whether --with-import_hotspot was given.
31050if test "${with_import_hotspot+set}" = set; then :
31051  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31052$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31053fi
31054
31055
31056
31057
31058
31059
31060# Check whether --with-import-modules was given.
31061if test "${with_import_modules+set}" = set; then :
31062  withval=$with_import_modules;
31063fi
31064
31065
31066  if test "x$with_import_modules" != x \
31067      && test "x$with_import_modules" != "xno"; then
31068    if test -d "$with_import_modules"; then
31069      IMPORT_MODULES_TOPDIR="$with_import_modules"
31070
31071  # Only process if variable expands to non-empty
31072
31073  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31075
31076  # Input might be given as Windows format, start by converting to
31077  # unix format.
31078  path="$IMPORT_MODULES_TOPDIR"
31079  new_path=`$CYGPATH -u "$path"`
31080
31081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31084  # "foo.exe" is OK but "foo" is an error.
31085  #
31086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31087  # It is also a way to make sure we got the proper file name for the real test later on.
31088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31089  if test "x$test_shortpath" = x; then
31090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31091$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31092    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31093  fi
31094
31095  # Call helper function which possibly converts this using DOS-style short mode.
31096  # If so, the updated path is stored in $new_path.
31097
31098  input_path="$new_path"
31099  # Check if we need to convert this using DOS-style short mode. If the path
31100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31101  # take no chances and rewrite it.
31102  # Note: m4 eats our [], so we need to use [ and ] instead.
31103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31104  if test "x$has_forbidden_chars" != x; then
31105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31109      # Going to short mode and back again did indeed matter. Since short mode is
31110      # case insensitive, let's make it lowercase to improve readability.
31111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31112      # Now convert it back to Unix-style (cygpath)
31113      input_path=`$CYGPATH -u "$shortmode_path"`
31114      new_path="$input_path"
31115    fi
31116  fi
31117
31118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31119  if test "x$test_cygdrive_prefix" = x; then
31120    # As a simple fix, exclude /usr/bin since it's not a real path.
31121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31123      # a path prefixed by /cygdrive for fixpath to work.
31124      new_path="$CYGWIN_ROOT_PATH$input_path"
31125    fi
31126  fi
31127
31128
31129  if test "x$path" != "x$new_path"; then
31130    IMPORT_MODULES_TOPDIR="$new_path"
31131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31132$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31133  fi
31134
31135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31136
31137  path="$IMPORT_MODULES_TOPDIR"
31138  has_colon=`$ECHO $path | $GREP ^.:`
31139  new_path="$path"
31140  if test "x$has_colon" = x; then
31141    # Not in mixed or Windows style, start by that.
31142    new_path=`cmd //c echo $path`
31143  fi
31144
31145
31146  input_path="$new_path"
31147  # Check if we need to convert this using DOS-style short mode. If the path
31148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31149  # take no chances and rewrite it.
31150  # Note: m4 eats our [], so we need to use [ and ] instead.
31151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31152  if test "x$has_forbidden_chars" != x; then
31153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31155  fi
31156
31157
31158  windows_path="$new_path"
31159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31160    unix_path=`$CYGPATH -u "$windows_path"`
31161    new_path="$unix_path"
31162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31164    new_path="$unix_path"
31165  fi
31166
31167  if test "x$path" != "x$new_path"; then
31168    IMPORT_MODULES_TOPDIR="$new_path"
31169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31170$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31171  fi
31172
31173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31175
31176    else
31177      # We're on a unix platform. Hooray! :)
31178      path="$IMPORT_MODULES_TOPDIR"
31179      has_space=`$ECHO "$path" | $GREP " "`
31180      if test "x$has_space" != x; then
31181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31182$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31184      fi
31185
31186      # Use eval to expand a potential ~
31187      eval path="$path"
31188      if test ! -f "$path" && test ! -d "$path"; then
31189        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31190      fi
31191
31192      if test -d "$path"; then
31193        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31194      else
31195        dir="`$DIRNAME "$path"`"
31196        base="`$BASENAME "$path"`"
31197        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31198      fi
31199    fi
31200  fi
31201
31202    elif test -e "$with_import_modules"; then
31203      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31204      $RM -rf "$IMPORT_MODULES_TOPDIR"
31205      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31206      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31207        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31208      fi
31209    else
31210      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31211    fi
31212  fi
31213
31214  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31215    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31216  fi
31217  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31218    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31219  fi
31220  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31221    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31222  fi
31223  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31224    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31225  fi
31226  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31227    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31228  fi
31229  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31230    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31231  fi
31232  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31233    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31234  fi
31235  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31236    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31237  fi
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249###############################################################################
31250#
31251# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31252# native code.
31253#
31254###############################################################################
31255
31256# See if we are doing a complete static build or not
31257
31258  # Check whether --enable-static-build was given.
31259if test "${enable_static_build+set}" = set; then :
31260  enableval=$enable_static_build;
31261fi
31262
31263  STATIC_BUILD=false
31264  if test "x$enable_static_build" = "xyes"; then
31265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31266$as_echo_n "checking if static build is enabled... " >&6; }
31267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31268$as_echo "yes" >&6; }
31269    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31270      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31271    fi
31272    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31273    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31274    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31275    STATIC_BUILD=true
31276  elif test "x$enable_static_build" = "xno"; then
31277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31278$as_echo_n "checking if static build is enabled... " >&6; }
31279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31280$as_echo "no" >&6; }
31281  elif test "x$enable_static_build" != "x"; then
31282    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31283  fi
31284
31285
31286
31287
31288# First determine the toolchain type (compiler family)
31289
31290
31291# Check whether --with-toolchain-type was given.
31292if test "${with_toolchain_type+set}" = set; then :
31293  withval=$with_toolchain_type;
31294fi
31295
31296
31297  # Use indirect variable referencing
31298  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31299  VALID_TOOLCHAINS=${!toolchain_var_name}
31300
31301  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31302    if test -n "$XCODEBUILD"; then
31303      # On Mac OS X, default toolchain to clang after Xcode 5
31304      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31305      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31306      if test $? -ne 0; then
31307        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31308      fi
31309      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31310          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31311          $CUT -f 1 -d .`
31312      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31313$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31314      if test $XCODE_MAJOR_VERSION -ge 5; then
31315          DEFAULT_TOOLCHAIN="clang"
31316      else
31317          DEFAULT_TOOLCHAIN="gcc"
31318      fi
31319    else
31320      # If Xcode is not installed, but the command line tools are
31321      # then we can't run xcodebuild. On these systems we should
31322      # default to clang
31323      DEFAULT_TOOLCHAIN="clang"
31324    fi
31325  else
31326    # First toolchain type in the list is the default
31327    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31328  fi
31329
31330  if test "x$with_toolchain_type" = xlist; then
31331    # List all toolchains
31332    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31333$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31334    for toolchain in $VALID_TOOLCHAINS; do
31335      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31336      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31337      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31338    done
31339
31340    exit 0
31341  elif test "x$with_toolchain_type" != x; then
31342    # User override; check that it is valid
31343    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31344      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31345$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31346      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31347$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31348      as_fn_error $? "Cannot continue." "$LINENO" 5
31349    fi
31350    TOOLCHAIN_TYPE=$with_toolchain_type
31351  else
31352    # No flag given, use default
31353    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31354  fi
31355
31356
31357  TOOLCHAIN_CC_BINARY_clang="clang"
31358  TOOLCHAIN_CC_BINARY_gcc="gcc"
31359  TOOLCHAIN_CC_BINARY_microsoft="cl"
31360  TOOLCHAIN_CC_BINARY_solstudio="cc"
31361  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31362
31363  TOOLCHAIN_CXX_BINARY_clang="clang++"
31364  TOOLCHAIN_CXX_BINARY_gcc="g++"
31365  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31366  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31367  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31368
31369  # Use indirect variable referencing
31370  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31371  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31372  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31373  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31374  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31375  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31376  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31377  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31378
31379
31380  # Define filename patterns
31381  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31382    LIBRARY_PREFIX=
31383    SHARED_LIBRARY_SUFFIX='.dll'
31384    STATIC_LIBRARY_SUFFIX='.lib'
31385    SHARED_LIBRARY='$1.dll'
31386    STATIC_LIBRARY='$1.lib'
31387    OBJ_SUFFIX='.obj'
31388    EXE_SUFFIX='.exe'
31389  else
31390    LIBRARY_PREFIX=lib
31391    SHARED_LIBRARY_SUFFIX='.so'
31392    STATIC_LIBRARY_SUFFIX='.a'
31393    SHARED_LIBRARY='lib$1.so'
31394    STATIC_LIBRARY='lib$1.a'
31395    OBJ_SUFFIX='.o'
31396    EXE_SUFFIX=''
31397    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31398      # For full static builds, we're overloading the SHARED_LIBRARY
31399      # variables in order to limit the amount of changes required.
31400      # It would be better to remove SHARED and just use LIBRARY and
31401      # LIBRARY_SUFFIX for libraries that can be built either
31402      # shared or static and use STATIC_* for libraries that are
31403      # always built statically.
31404      if test "x$STATIC_BUILD" = xtrue; then
31405        SHARED_LIBRARY='lib$1.a'
31406        SHARED_LIBRARY_SUFFIX='.a'
31407      else
31408        SHARED_LIBRARY='lib$1.dylib'
31409        SHARED_LIBRARY_SUFFIX='.dylib'
31410      fi
31411    fi
31412  fi
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31424    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31425$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31426  else
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31428$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31429  fi
31430
31431
31432# User supplied flags should be used when configure detects compilers
31433
31434  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31435    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31436$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31437  fi
31438
31439  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31440    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31441$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31442  fi
31443
31444  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31446$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31447  fi
31448
31449
31450# Check whether --with-extra-cflags was given.
31451if test "${with_extra_cflags+set}" = set; then :
31452  withval=$with_extra_cflags;
31453fi
31454
31455
31456
31457# Check whether --with-extra-cxxflags was given.
31458if test "${with_extra_cxxflags+set}" = set; then :
31459  withval=$with_extra_cxxflags;
31460fi
31461
31462
31463
31464# Check whether --with-extra-ldflags was given.
31465if test "${with_extra_ldflags+set}" = set; then :
31466  withval=$with_extra_ldflags;
31467fi
31468
31469
31470  EXTRA_CFLAGS="$with_extra_cflags"
31471  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31472  EXTRA_LDFLAGS="$with_extra_ldflags"
31473
31474
31475
31476
31477
31478  # The global CFLAGS and LDLAGS variables are used by configure tests and
31479  # should include the extra parameters
31480  CFLAGS="$EXTRA_CFLAGS"
31481  CXXFLAGS="$EXTRA_CXXFLAGS"
31482  LDFLAGS="$EXTRA_LDFLAGS"
31483  CPPFLAGS=""
31484
31485# The sysroot cflags are needed for configure to be able to run the compilers
31486
31487  if test "x$SYSROOT" != "x"; then
31488    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31489      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31490        # Solaris Studio does not have a concept of sysroot. Instead we must
31491        # make sure the default include and lib dirs are appended to each
31492        # compile and link command line. Must also add -I-xbuiltin to enable
31493        # inlining of system functions and intrinsics.
31494        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31495        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31496            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31497      fi
31498    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31499      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31500      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31501    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31502      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31503      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31504    fi
31505    # The global CFLAGS and LDFLAGS variables need these for configure to function
31506    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31507    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31508    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31509    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31510  fi
31511
31512  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31513    # We also need -iframework<path>/System/Library/Frameworks
31514    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31515    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31516    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31517    # set this here so it doesn't have to be peppered throughout the forest
31518    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31519    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31520  fi
31521
31522
31523
31524
31525
31526# Then detect the actual binaries needed
31527
31528  # FIXME: Is this needed?
31529  ac_ext=cpp
31530ac_cpp='$CXXCPP $CPPFLAGS'
31531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31534
31535
31536  # Store the CFLAGS etc passed to the configure script.
31537  ORG_CFLAGS="$CFLAGS"
31538  ORG_CXXFLAGS="$CXXFLAGS"
31539
31540  # autoconf magic only relies on PATH, so update it if tools dir is specified
31541  OLD_PATH="$PATH"
31542
31543  # On Windows, we need to detect the visual studio installation first.
31544  # This will change the PATH, but we need to keep that new PATH even
31545  # after toolchain detection is done, since the compiler (on x86) uses
31546  # it for DLL resolution in runtime.
31547  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31548      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31549
31550  # Store path to cygwin link.exe to help excluding it when searching for
31551  # VS linker. This must be done before changing the PATH when looking for VS.
31552  # Extract the first word of "link", so it can be a program name with args.
31553set dummy link; ac_word=$2
31554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31555$as_echo_n "checking for $ac_word... " >&6; }
31556if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31557  $as_echo_n "(cached) " >&6
31558else
31559  case $CYGWIN_LINK in
31560  [\\/]* | ?:[\\/]*)
31561  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31562  ;;
31563  *)
31564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31565for as_dir in $PATH
31566do
31567  IFS=$as_save_IFS
31568  test -z "$as_dir" && as_dir=.
31569    for ac_exec_ext in '' $ac_executable_extensions; do
31570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31571    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31573    break 2
31574  fi
31575done
31576  done
31577IFS=$as_save_IFS
31578
31579  ;;
31580esac
31581fi
31582CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31583if test -n "$CYGWIN_LINK"; then
31584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31585$as_echo "$CYGWIN_LINK" >&6; }
31586else
31587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31588$as_echo "no" >&6; }
31589fi
31590
31591
31592  if test "x$CYGWIN_LINK" != x; then
31593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31594$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31595    "$CYGWIN_LINK" --version > /dev/null
31596    if test $? -eq 0 ; then
31597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31598$as_echo "yes" >&6; }
31599    else
31600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31601$as_echo "no" >&6; }
31602      # This might be the VS linker. Don't exclude it later on.
31603      CYGWIN_LINK=""
31604    fi
31605  fi
31606
31607  # First-hand choice is to locate and run the vsvars bat file.
31608
31609
31610# Check whether --with-toolchain-version was given.
31611if test "${with_toolchain_version+set}" = set; then :
31612  withval=$with_toolchain_version;
31613fi
31614
31615
31616  if test "x$with_toolchain_version" = xlist; then
31617    # List all toolchains
31618    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31619$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31620    for version in $VALID_VS_VERSIONS; do
31621      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31622      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31623    done
31624
31625    exit 0
31626  elif test "x$DEVKIT_VS_VERSION" != x; then
31627    VS_VERSION=$DEVKIT_VS_VERSION
31628    TOOLCHAIN_VERSION=$VS_VERSION
31629    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31630    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31631    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31632    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31633    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31634    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31635
31636    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31637    # can still be exported as INCLUDE for compiler invocations without
31638    # SYSROOT_CFLAGS
31639    OLDIFS="$IFS"
31640    IFS=";"
31641    for i in $DEVKIT_VS_INCLUDE; do
31642      ipath=$i
31643
31644  unix_path="$ipath"
31645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31646    windows_path=`$CYGPATH -m "$unix_path"`
31647    ipath="$windows_path"
31648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31649    windows_path=`cmd //c echo $unix_path`
31650    ipath="$windows_path"
31651  fi
31652
31653      VS_INCLUDE="$VS_INCLUDE;$ipath"
31654    done
31655    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31656    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31657    for i in $DEVKIT_VS_LIB; do
31658      libpath=$i
31659
31660  unix_path="$libpath"
31661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31662    windows_path=`$CYGPATH -m "$unix_path"`
31663    libpath="$windows_path"
31664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31665    windows_path=`cmd //c echo $unix_path`
31666    libpath="$windows_path"
31667  fi
31668
31669      VS_LIB="$VS_LIB;$libpath"
31670    done
31671    IFS="$OLDIFS"
31672
31673    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31674$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31675
31676  elif test "x$with_toolchain_version" != x; then
31677    # User override; check that it is valid
31678    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31679      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31680$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31681      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31682$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31683      as_fn_error $? "Cannot continue." "$LINENO" 5
31684    fi
31685    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31686  else
31687    # No flag given, use default
31688    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31689  fi
31690
31691  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31692
31693  VS_VERSION="$VS_VERSION"
31694  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31695  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31696  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31697  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31698
31699  # When using --with-tools-dir, assume it points to the correct and default
31700  # version of Visual Studio or that --with-toolchain-version was also set.
31701  if test "x$with_tools_dir" != x; then
31702
31703  if test "x$VS_ENV_CMD" = x; then
31704    VS_VERSION="${VS_VERSION}"
31705    VS_BASE="$with_tools_dir/../.."
31706    METHOD="--with-tools-dir"
31707
31708    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31709      VCVARSFILE="vc/bin/vcvars32.bat"
31710    else
31711      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31712    fi
31713
31714
31715  windows_path="$VS_BASE"
31716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31717    unix_path=`$CYGPATH -u "$windows_path"`
31718    VS_BASE="$unix_path"
31719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31721    VS_BASE="$unix_path"
31722  fi
31723
31724    if test -d "$VS_BASE"; then
31725      if test -f "$VS_BASE/$VCVARSFILE"; then
31726        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31727$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31728        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31729        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31730        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31731        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31732      else
31733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31734$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31735        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31736$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31737      fi
31738    fi
31739  fi
31740
31741
31742  if test "x$VS_ENV_CMD" = x; then
31743    VS_VERSION="${VS_VERSION}"
31744    VS_BASE="$with_tools_dir/../../.."
31745    METHOD="--with-tools-dir"
31746
31747    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31748      VCVARSFILE="vc/bin/vcvars32.bat"
31749    else
31750      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31751    fi
31752
31753
31754  windows_path="$VS_BASE"
31755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31756    unix_path=`$CYGPATH -u "$windows_path"`
31757    VS_BASE="$unix_path"
31758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31760    VS_BASE="$unix_path"
31761  fi
31762
31763    if test -d "$VS_BASE"; then
31764      if test -f "$VS_BASE/$VCVARSFILE"; then
31765        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31766$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31767        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31768        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31769        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31770        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31771      else
31772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31773$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31774        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31775$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31776      fi
31777    fi
31778  fi
31779
31780    if test "x$VS_ENV_CMD" = x; then
31781      # Having specified an argument which is incorrect will produce an instant failure;
31782      # we should not go on looking
31783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31784$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31785      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31786$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31787      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31788$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31789      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31790    fi
31791  fi
31792
31793  VS_ENV_CMD=""
31794  VS_ENV_ARGS=""
31795
31796  if test "x$VS_COMNTOOLS" != x; then
31797
31798  if test "x$VS_ENV_CMD" = x; then
31799    VS_VERSION="${VS_VERSION}"
31800    VS_BASE="$VS_COMNTOOLS/../.."
31801    METHOD="$VS_COMNTOOLS_VAR variable"
31802
31803    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31804      VCVARSFILE="vc/bin/vcvars32.bat"
31805    else
31806      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31807    fi
31808
31809
31810  windows_path="$VS_BASE"
31811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31812    unix_path=`$CYGPATH -u "$windows_path"`
31813    VS_BASE="$unix_path"
31814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31816    VS_BASE="$unix_path"
31817  fi
31818
31819    if test -d "$VS_BASE"; then
31820      if test -f "$VS_BASE/$VCVARSFILE"; then
31821        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31822$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31823        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31824        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31825        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31826        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31827      else
31828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31829$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31831$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31832      fi
31833    fi
31834  fi
31835
31836  fi
31837  if test "x$PROGRAMFILES" != x; then
31838
31839  if test "x$VS_ENV_CMD" = x; then
31840    VS_VERSION="${VS_VERSION}"
31841    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31842    METHOD="well-known name"
31843
31844    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31845      VCVARSFILE="vc/bin/vcvars32.bat"
31846    else
31847      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31848    fi
31849
31850
31851  windows_path="$VS_BASE"
31852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31853    unix_path=`$CYGPATH -u "$windows_path"`
31854    VS_BASE="$unix_path"
31855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31857    VS_BASE="$unix_path"
31858  fi
31859
31860    if test -d "$VS_BASE"; then
31861      if test -f "$VS_BASE/$VCVARSFILE"; then
31862        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31863$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31864        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31865        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31866        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31867        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31868      else
31869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31870$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31871        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31872$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31873      fi
31874    fi
31875  fi
31876
31877  fi
31878  # Work around the insanely named ProgramFiles(x86) env variable
31879  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31880  if test "x$PROGRAMFILES_X86" != x; then
31881
31882  if test "x$VS_ENV_CMD" = x; then
31883    VS_VERSION="${VS_VERSION}"
31884    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31885    METHOD="well-known name"
31886
31887    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31888      VCVARSFILE="vc/bin/vcvars32.bat"
31889    else
31890      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31891    fi
31892
31893
31894  windows_path="$VS_BASE"
31895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31896    unix_path=`$CYGPATH -u "$windows_path"`
31897    VS_BASE="$unix_path"
31898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31900    VS_BASE="$unix_path"
31901  fi
31902
31903    if test -d "$VS_BASE"; then
31904      if test -f "$VS_BASE/$VCVARSFILE"; then
31905        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31906$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31907        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31908        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31909        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31910        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31911      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31915$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31916      fi
31917    fi
31918  fi
31919
31920  fi
31921
31922  if test "x$VS_ENV_CMD" = x; then
31923    VS_VERSION="${VS_VERSION}"
31924    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31925    METHOD="well-known name"
31926
31927    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31928      VCVARSFILE="vc/bin/vcvars32.bat"
31929    else
31930      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31931    fi
31932
31933
31934  windows_path="$VS_BASE"
31935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31936    unix_path=`$CYGPATH -u "$windows_path"`
31937    VS_BASE="$unix_path"
31938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31940    VS_BASE="$unix_path"
31941  fi
31942
31943    if test -d "$VS_BASE"; then
31944      if test -f "$VS_BASE/$VCVARSFILE"; then
31945        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31946$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31947        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31948        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31949        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31950        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31951      else
31952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31953$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31955$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31956      fi
31957    fi
31958  fi
31959
31960
31961  if test "x$VS_ENV_CMD" = x; then
31962    VS_VERSION="${VS_VERSION}"
31963    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31964    METHOD="well-known name"
31965
31966    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31967      VCVARSFILE="vc/bin/vcvars32.bat"
31968    else
31969      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31970    fi
31971
31972
31973  windows_path="$VS_BASE"
31974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31975    unix_path=`$CYGPATH -u "$windows_path"`
31976    VS_BASE="$unix_path"
31977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31979    VS_BASE="$unix_path"
31980  fi
31981
31982    if test -d "$VS_BASE"; then
31983      if test -f "$VS_BASE/$VCVARSFILE"; then
31984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31985$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31986        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31987        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31988        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31989        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31990      else
31991        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31992$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31993        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31994$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31995      fi
31996    fi
31997  fi
31998
31999
32000  if test "x$SDK_INSTALL_DIR" != x; then
32001    if test "x$ProgramW6432" != x; then
32002
32003  if test "x$VS_ENV_CMD" = x; then
32004    VS_VERSION="${VS_VERSION}"
32005    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32006    METHOD="well-known name"
32007
32008  windows_path="$WIN_SDK_BASE"
32009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32010    unix_path=`$CYGPATH -u "$windows_path"`
32011    WIN_SDK_BASE="$unix_path"
32012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32014    WIN_SDK_BASE="$unix_path"
32015  fi
32016
32017    if test -d "$WIN_SDK_BASE"; then
32018      # There have been cases of partial or broken SDK installations. A missing
32019      # lib dir is not going to work.
32020      if test ! -d "$WIN_SDK_BASE/lib"; then
32021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32024$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32025      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32027$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32028        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32029        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32030          VS_ENV_ARGS="/x86"
32031        else
32032          VS_ENV_ARGS="/x64"
32033        fi
32034        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32035        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32036        # TODO: improve detection for other versions of SDK
32037        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32038      else
32039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32040$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32042$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32043      fi
32044    fi
32045  fi
32046
32047    fi
32048    if test "x$PROGRAMW6432" != x; then
32049
32050  if test "x$VS_ENV_CMD" = x; then
32051    VS_VERSION="${VS_VERSION}"
32052    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32053    METHOD="well-known name"
32054
32055  windows_path="$WIN_SDK_BASE"
32056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32057    unix_path=`$CYGPATH -u "$windows_path"`
32058    WIN_SDK_BASE="$unix_path"
32059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32061    WIN_SDK_BASE="$unix_path"
32062  fi
32063
32064    if test -d "$WIN_SDK_BASE"; then
32065      # There have been cases of partial or broken SDK installations. A missing
32066      # lib dir is not going to work.
32067      if test ! -d "$WIN_SDK_BASE/lib"; then
32068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32069$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32071$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32072      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32075        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32076        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32077          VS_ENV_ARGS="/x86"
32078        else
32079          VS_ENV_ARGS="/x64"
32080        fi
32081        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32082        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32083        # TODO: improve detection for other versions of SDK
32084        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32085      else
32086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32089$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32090      fi
32091    fi
32092  fi
32093
32094    fi
32095    if test "x$PROGRAMFILES" != x; then
32096
32097  if test "x$VS_ENV_CMD" = x; then
32098    VS_VERSION="${VS_VERSION}"
32099    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32100    METHOD="well-known name"
32101
32102  windows_path="$WIN_SDK_BASE"
32103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32104    unix_path=`$CYGPATH -u "$windows_path"`
32105    WIN_SDK_BASE="$unix_path"
32106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32108    WIN_SDK_BASE="$unix_path"
32109  fi
32110
32111    if test -d "$WIN_SDK_BASE"; then
32112      # There have been cases of partial or broken SDK installations. A missing
32113      # lib dir is not going to work.
32114      if test ! -d "$WIN_SDK_BASE/lib"; then
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32118$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32119      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32121$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32122        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32123        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32124          VS_ENV_ARGS="/x86"
32125        else
32126          VS_ENV_ARGS="/x64"
32127        fi
32128        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32129        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32130        # TODO: improve detection for other versions of SDK
32131        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32132      else
32133        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32134$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32135        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32136$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32137      fi
32138    fi
32139  fi
32140
32141    fi
32142
32143  if test "x$VS_ENV_CMD" = x; then
32144    VS_VERSION="${VS_VERSION}"
32145    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32146    METHOD="well-known name"
32147
32148  windows_path="$WIN_SDK_BASE"
32149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32150    unix_path=`$CYGPATH -u "$windows_path"`
32151    WIN_SDK_BASE="$unix_path"
32152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32154    WIN_SDK_BASE="$unix_path"
32155  fi
32156
32157    if test -d "$WIN_SDK_BASE"; then
32158      # There have been cases of partial or broken SDK installations. A missing
32159      # lib dir is not going to work.
32160      if test ! -d "$WIN_SDK_BASE/lib"; then
32161        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32162$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32163        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32164$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32165      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32167$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32168        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32169        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32170          VS_ENV_ARGS="/x86"
32171        else
32172          VS_ENV_ARGS="/x64"
32173        fi
32174        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32175        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32176        # TODO: improve detection for other versions of SDK
32177        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32178      else
32179        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32180$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32181        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32182$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32183      fi
32184    fi
32185  fi
32186
32187
32188  if test "x$VS_ENV_CMD" = x; then
32189    VS_VERSION="${VS_VERSION}"
32190    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32191    METHOD="well-known name"
32192
32193  windows_path="$WIN_SDK_BASE"
32194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32195    unix_path=`$CYGPATH -u "$windows_path"`
32196    WIN_SDK_BASE="$unix_path"
32197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32199    WIN_SDK_BASE="$unix_path"
32200  fi
32201
32202    if test -d "$WIN_SDK_BASE"; then
32203      # There have been cases of partial or broken SDK installations. A missing
32204      # lib dir is not going to work.
32205      if test ! -d "$WIN_SDK_BASE/lib"; then
32206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32209$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32210      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32214        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32215          VS_ENV_ARGS="/x86"
32216        else
32217          VS_ENV_ARGS="/x64"
32218        fi
32219        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32220        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32221        # TODO: improve detection for other versions of SDK
32222        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32223      else
32224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32225$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32226        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32227$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32228      fi
32229    fi
32230  fi
32231
32232  fi
32233
32234    if test "x$VS_ENV_CMD" != x; then
32235      TOOLCHAIN_VERSION=$VS_VERSION
32236      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32237      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32238      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32239      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32240      # The rest of the variables are already evaled while probing
32241      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32242$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32243      break
32244    fi
32245  done
32246
32247
32248  # If we have a devkit, skip all of the below.
32249  if test "x$DEVKIT_VS_VERSION" = x; then
32250    if test "x$VS_ENV_CMD" != x; then
32251      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32252
32253  # Only process if variable expands to non-empty
32254
32255  if test "x$VS_ENV_CMD" != x; then
32256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32257
32258  # First separate the path from the arguments. This will split at the first
32259  # space.
32260  complete="$VS_ENV_CMD"
32261  path="${complete%% *}"
32262  tmp="$complete EOL"
32263  arguments="${tmp#* }"
32264
32265  # Input might be given as Windows format, start by converting to
32266  # unix format.
32267  new_path=`$CYGPATH -u "$path"`
32268
32269  # Now try to locate executable using which
32270  new_path=`$WHICH "$new_path" 2> /dev/null`
32271  # bat and cmd files are not always considered executable in cygwin causing which
32272  # to not find them
32273  if test "x$new_path" = x \
32274      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32275      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32276    new_path=`$CYGPATH -u "$path"`
32277  fi
32278  if test "x$new_path" = x; then
32279    # Oops. Which didn't find the executable.
32280    # The splitting of arguments from the executable at a space might have been incorrect,
32281    # since paths with space are more likely in Windows. Give it another try with the whole
32282    # argument.
32283    path="$complete"
32284    arguments="EOL"
32285    new_path=`$CYGPATH -u "$path"`
32286    new_path=`$WHICH "$new_path" 2> /dev/null`
32287    # bat and cmd files are not always considered executable in cygwin causing which
32288    # to not find them
32289    if test "x$new_path" = x \
32290        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32291        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32292      new_path=`$CYGPATH -u "$path"`
32293    fi
32294    if test "x$new_path" = x; then
32295      # It's still not found. Now this is an unrecoverable error.
32296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32297$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32298      has_space=`$ECHO "$complete" | $GREP " "`
32299      if test "x$has_space" != x; then
32300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32302      fi
32303      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32304    fi
32305  fi
32306
32307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32310  # "foo.exe" is OK but "foo" is an error.
32311  #
32312  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32313  # It is also a way to make sure we got the proper file name for the real test later on.
32314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32315  if test "x$test_shortpath" = x; then
32316    # Short path failed, file does not exist as specified.
32317    # Try adding .exe or .cmd
32318    if test -f "${new_path}.exe"; then
32319      input_to_shortpath="${new_path}.exe"
32320    elif test -f "${new_path}.cmd"; then
32321      input_to_shortpath="${new_path}.cmd"
32322    else
32323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32324$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32325      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32326$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32327      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32328    fi
32329  else
32330    input_to_shortpath="$new_path"
32331  fi
32332
32333  # Call helper function which possibly converts this using DOS-style short mode.
32334  # If so, the updated path is stored in $new_path.
32335  new_path="$input_to_shortpath"
32336
32337  input_path="$input_to_shortpath"
32338  # Check if we need to convert this using DOS-style short mode. If the path
32339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32340  # take no chances and rewrite it.
32341  # Note: m4 eats our [], so we need to use [ and ] instead.
32342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32343  if test "x$has_forbidden_chars" != x; then
32344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32348      # Going to short mode and back again did indeed matter. Since short mode is
32349      # case insensitive, let's make it lowercase to improve readability.
32350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32351      # Now convert it back to Unix-style (cygpath)
32352      input_path=`$CYGPATH -u "$shortmode_path"`
32353      new_path="$input_path"
32354    fi
32355  fi
32356
32357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32358  if test "x$test_cygdrive_prefix" = x; then
32359    # As a simple fix, exclude /usr/bin since it's not a real path.
32360    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32362      # a path prefixed by /cygdrive for fixpath to work.
32363      new_path="$CYGWIN_ROOT_PATH$input_path"
32364    fi
32365  fi
32366
32367  # remove trailing .exe if any
32368  new_path="${new_path/%.exe/}"
32369
32370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32371
32372  # First separate the path from the arguments. This will split at the first
32373  # space.
32374  complete="$VS_ENV_CMD"
32375  path="${complete%% *}"
32376  tmp="$complete EOL"
32377  arguments="${tmp#* }"
32378
32379  # Input might be given as Windows format, start by converting to
32380  # unix format.
32381  new_path="$path"
32382
32383  windows_path="$new_path"
32384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32385    unix_path=`$CYGPATH -u "$windows_path"`
32386    new_path="$unix_path"
32387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32389    new_path="$unix_path"
32390  fi
32391
32392
32393  # Now try to locate executable using which
32394  new_path=`$WHICH "$new_path" 2> /dev/null`
32395
32396  if test "x$new_path" = x; then
32397    # Oops. Which didn't find the executable.
32398    # The splitting of arguments from the executable at a space might have been incorrect,
32399    # since paths with space are more likely in Windows. Give it another try with the whole
32400    # argument.
32401    path="$complete"
32402    arguments="EOL"
32403    new_path="$path"
32404
32405  windows_path="$new_path"
32406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407    unix_path=`$CYGPATH -u "$windows_path"`
32408    new_path="$unix_path"
32409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32411    new_path="$unix_path"
32412  fi
32413
32414
32415    new_path=`$WHICH "$new_path" 2> /dev/null`
32416    # bat and cmd files are not always considered executable in MSYS causing which
32417    # to not find them
32418    if test "x$new_path" = x \
32419        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32420        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32421      new_path="$path"
32422
32423  windows_path="$new_path"
32424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32425    unix_path=`$CYGPATH -u "$windows_path"`
32426    new_path="$unix_path"
32427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32429    new_path="$unix_path"
32430  fi
32431
32432    fi
32433
32434    if test "x$new_path" = x; then
32435      # It's still not found. Now this is an unrecoverable error.
32436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32437$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32438      has_space=`$ECHO "$complete" | $GREP " "`
32439      if test "x$has_space" != x; then
32440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32442      fi
32443      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32444    fi
32445  fi
32446
32447  # Now new_path has a complete unix path to the binary
32448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32449    # Keep paths in /bin as-is, but remove trailing .exe if any
32450    new_path="${new_path/%.exe/}"
32451    # Do not save /bin paths to all_fixpath_prefixes!
32452  else
32453    # Not in mixed or Windows style, start by that.
32454    new_path=`cmd //c echo $new_path`
32455
32456  input_path="$new_path"
32457  # Check if we need to convert this using DOS-style short mode. If the path
32458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32459  # take no chances and rewrite it.
32460  # Note: m4 eats our [], so we need to use [ and ] instead.
32461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32462  if test "x$has_forbidden_chars" != x; then
32463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32465  fi
32466
32467    # Output is in $new_path
32468
32469  windows_path="$new_path"
32470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32471    unix_path=`$CYGPATH -u "$windows_path"`
32472    new_path="$unix_path"
32473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32475    new_path="$unix_path"
32476  fi
32477
32478    # remove trailing .exe if any
32479    new_path="${new_path/%.exe/}"
32480
32481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32483  fi
32484
32485    else
32486      # We're on a unix platform. Hooray! :)
32487      # First separate the path from the arguments. This will split at the first
32488      # space.
32489      complete="$VS_ENV_CMD"
32490      path="${complete%% *}"
32491      tmp="$complete EOL"
32492      arguments="${tmp#* }"
32493
32494      # Cannot rely on the command "which" here since it doesn't always work.
32495      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32496      if test -z "$is_absolute_path"; then
32497        # Path to executable is not absolute. Find it.
32498        IFS_save="$IFS"
32499        IFS=:
32500        for p in $PATH; do
32501          if test -f "$p/$path" && test -x "$p/$path"; then
32502            new_path="$p/$path"
32503            break
32504          fi
32505        done
32506        IFS="$IFS_save"
32507      else
32508        # This is an absolute path, we can use it without further modifications.
32509        new_path="$path"
32510      fi
32511
32512      if test "x$new_path" = x; then
32513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32514$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32515        has_space=`$ECHO "$complete" | $GREP " "`
32516        if test "x$has_space" != x; then
32517          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32519        fi
32520        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32521      fi
32522    fi
32523
32524    # Now join together the path and the arguments once again
32525    if test "x$arguments" != xEOL; then
32526      new_complete="$new_path ${arguments% *}"
32527    else
32528      new_complete="$new_path"
32529    fi
32530
32531    if test "x$complete" != "x$new_complete"; then
32532      VS_ENV_CMD="$new_complete"
32533      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32534$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32535    fi
32536  fi
32537
32538
32539      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32540      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32541$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32542
32543      # We need to create a couple of temporary files.
32544      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32545      $MKDIR -p $VS_ENV_TMP_DIR
32546
32547      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32548      # Instead create a shell script which will set the relevant variables when run.
32549      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32550
32551  unix_path="$WINPATH_VS_ENV_CMD"
32552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32553    windows_path=`$CYGPATH -m "$unix_path"`
32554    WINPATH_VS_ENV_CMD="$windows_path"
32555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32556    windows_path=`cmd //c echo $unix_path`
32557    WINPATH_VS_ENV_CMD="$windows_path"
32558  fi
32559
32560      WINPATH_BASH="$BASH"
32561
32562  unix_path="$WINPATH_BASH"
32563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32564    windows_path=`$CYGPATH -m "$unix_path"`
32565    WINPATH_BASH="$windows_path"
32566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32567    windows_path=`cmd //c echo $unix_path`
32568    WINPATH_BASH="$windows_path"
32569  fi
32570
32571
32572      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32573      # script (executable by bash) that will setup the important variables.
32574      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32575      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32576      # This will end up something like:
32577      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32578      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32579      # These will end up something like:
32580      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32581      # The trailing space for everyone except PATH is no typo, but is needed due
32582      # to trailing \ in the Windows paths. These will be stripped later.
32583      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32584          >> $EXTRACT_VC_ENV_BAT_FILE
32585      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32586          >> $EXTRACT_VC_ENV_BAT_FILE
32587      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32588          >> $EXTRACT_VC_ENV_BAT_FILE
32589      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32590          >> $EXTRACT_VC_ENV_BAT_FILE
32591      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32592          >> $EXTRACT_VC_ENV_BAT_FILE
32593      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32594          >> $EXTRACT_VC_ENV_BAT_FILE
32595
32596      # Now execute the newly created bat file.
32597      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32598      # Change directory so we don't need to mess with Windows paths in redirects.
32599      cd $VS_ENV_TMP_DIR
32600      cmd /c extract-vs-env.bat | $CAT
32601      cd $CURDIR
32602
32603      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32604        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32605$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32606        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32607$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32608        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32609$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32610        as_fn_error $? "Cannot continue" "$LINENO" 5
32611      fi
32612
32613      # Now set all paths and other env variables. This will allow the rest of
32614      # the configure script to find and run the compiler in the proper way.
32615      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32616$as_echo "$as_me: Setting extracted environment variables" >&6;}
32617      . $VS_ENV_TMP_DIR/set-vs-env.sh
32618      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32619      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32620    else
32621      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32622      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32623$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32624    fi
32625  fi
32626
32627  # At this point, we should have correct variables in the environment, or we can't continue.
32628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32629$as_echo_n "checking for Visual Studio variables... " >&6; }
32630
32631  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32632      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32633    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32635$as_echo "present but broken" >&6; }
32636      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32637    else
32638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32639$as_echo "ok" >&6; }
32640      # Remove any trailing "\" ";" and " " from the variables.
32641      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32642      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32643      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32644      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32645      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32646      # Remove any paths containing # (typically F#) as that messes up make. This
32647      # is needed if visual studio was installed with F# support.
32648      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32649
32650
32651
32652
32653
32654      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32655      OLDIFS="$IFS"
32656      IFS=";"
32657      for i in $VS_INCLUDE; do
32658        ipath=$i
32659        # Only process non-empty elements
32660        if test "x$ipath" != x; then
32661          IFS="$OLDIFS"
32662          # Check that directory exists before calling fixup_path
32663          testpath=$ipath
32664
32665  windows_path="$testpath"
32666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32667    unix_path=`$CYGPATH -u "$windows_path"`
32668    testpath="$unix_path"
32669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32671    testpath="$unix_path"
32672  fi
32673
32674          if test -d "$testpath"; then
32675
32676  # Only process if variable expands to non-empty
32677
32678  if test "x$ipath" != x; then
32679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32680
32681  # Input might be given as Windows format, start by converting to
32682  # unix format.
32683  path="$ipath"
32684  new_path=`$CYGPATH -u "$path"`
32685
32686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32689  # "foo.exe" is OK but "foo" is an error.
32690  #
32691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32692  # It is also a way to make sure we got the proper file name for the real test later on.
32693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32694  if test "x$test_shortpath" = x; then
32695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32696$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32697    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32698  fi
32699
32700  # Call helper function which possibly converts this using DOS-style short mode.
32701  # If so, the updated path is stored in $new_path.
32702
32703  input_path="$new_path"
32704  # Check if we need to convert this using DOS-style short mode. If the path
32705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32706  # take no chances and rewrite it.
32707  # Note: m4 eats our [], so we need to use [ and ] instead.
32708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32709  if test "x$has_forbidden_chars" != x; then
32710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32714      # Going to short mode and back again did indeed matter. Since short mode is
32715      # case insensitive, let's make it lowercase to improve readability.
32716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32717      # Now convert it back to Unix-style (cygpath)
32718      input_path=`$CYGPATH -u "$shortmode_path"`
32719      new_path="$input_path"
32720    fi
32721  fi
32722
32723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32724  if test "x$test_cygdrive_prefix" = x; then
32725    # As a simple fix, exclude /usr/bin since it's not a real path.
32726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32728      # a path prefixed by /cygdrive for fixpath to work.
32729      new_path="$CYGWIN_ROOT_PATH$input_path"
32730    fi
32731  fi
32732
32733
32734  if test "x$path" != "x$new_path"; then
32735    ipath="$new_path"
32736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32737$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32738  fi
32739
32740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32741
32742  path="$ipath"
32743  has_colon=`$ECHO $path | $GREP ^.:`
32744  new_path="$path"
32745  if test "x$has_colon" = x; then
32746    # Not in mixed or Windows style, start by that.
32747    new_path=`cmd //c echo $path`
32748  fi
32749
32750
32751  input_path="$new_path"
32752  # Check if we need to convert this using DOS-style short mode. If the path
32753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32754  # take no chances and rewrite it.
32755  # Note: m4 eats our [], so we need to use [ and ] instead.
32756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32757  if test "x$has_forbidden_chars" != x; then
32758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32760  fi
32761
32762
32763  windows_path="$new_path"
32764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32765    unix_path=`$CYGPATH -u "$windows_path"`
32766    new_path="$unix_path"
32767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32769    new_path="$unix_path"
32770  fi
32771
32772  if test "x$path" != "x$new_path"; then
32773    ipath="$new_path"
32774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32775$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32776  fi
32777
32778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32780
32781    else
32782      # We're on a unix platform. Hooray! :)
32783      path="$ipath"
32784      has_space=`$ECHO "$path" | $GREP " "`
32785      if test "x$has_space" != x; then
32786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32787$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32789      fi
32790
32791      # Use eval to expand a potential ~
32792      eval path="$path"
32793      if test ! -f "$path" && test ! -d "$path"; then
32794        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32795      fi
32796
32797      if test -d "$path"; then
32798        ipath="`cd "$path"; $THEPWDCMD -L`"
32799      else
32800        dir="`$DIRNAME "$path"`"
32801        base="`$BASENAME "$path"`"
32802        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32803      fi
32804    fi
32805  fi
32806
32807            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32808          fi
32809          IFS=";"
32810        fi
32811      done
32812      # Convert VS_LIB into SYSROOT_LDFLAGS
32813      for i in $VS_LIB; do
32814        libpath=$i
32815        # Only process non-empty elements
32816        if test "x$libpath" != x; then
32817          IFS="$OLDIFS"
32818          # Check that directory exists before calling fixup_path
32819          testpath=$libpath
32820
32821  windows_path="$testpath"
32822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32823    unix_path=`$CYGPATH -u "$windows_path"`
32824    testpath="$unix_path"
32825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32827    testpath="$unix_path"
32828  fi
32829
32830          if test -d "$testpath"; then
32831
32832  # Only process if variable expands to non-empty
32833
32834  if test "x$libpath" != x; then
32835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836
32837  # Input might be given as Windows format, start by converting to
32838  # unix format.
32839  path="$libpath"
32840  new_path=`$CYGPATH -u "$path"`
32841
32842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32845  # "foo.exe" is OK but "foo" is an error.
32846  #
32847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32848  # It is also a way to make sure we got the proper file name for the real test later on.
32849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32850  if test "x$test_shortpath" = x; then
32851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32852$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32853    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32854  fi
32855
32856  # Call helper function which possibly converts this using DOS-style short mode.
32857  # If so, the updated path is stored in $new_path.
32858
32859  input_path="$new_path"
32860  # Check if we need to convert this using DOS-style short mode. If the path
32861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32862  # take no chances and rewrite it.
32863  # Note: m4 eats our [], so we need to use [ and ] instead.
32864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32865  if test "x$has_forbidden_chars" != x; then
32866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32870      # Going to short mode and back again did indeed matter. Since short mode is
32871      # case insensitive, let's make it lowercase to improve readability.
32872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32873      # Now convert it back to Unix-style (cygpath)
32874      input_path=`$CYGPATH -u "$shortmode_path"`
32875      new_path="$input_path"
32876    fi
32877  fi
32878
32879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32880  if test "x$test_cygdrive_prefix" = x; then
32881    # As a simple fix, exclude /usr/bin since it's not a real path.
32882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32884      # a path prefixed by /cygdrive for fixpath to work.
32885      new_path="$CYGWIN_ROOT_PATH$input_path"
32886    fi
32887  fi
32888
32889
32890  if test "x$path" != "x$new_path"; then
32891    libpath="$new_path"
32892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32893$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32894  fi
32895
32896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32897
32898  path="$libpath"
32899  has_colon=`$ECHO $path | $GREP ^.:`
32900  new_path="$path"
32901  if test "x$has_colon" = x; then
32902    # Not in mixed or Windows style, start by that.
32903    new_path=`cmd //c echo $path`
32904  fi
32905
32906
32907  input_path="$new_path"
32908  # Check if we need to convert this using DOS-style short mode. If the path
32909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32910  # take no chances and rewrite it.
32911  # Note: m4 eats our [], so we need to use [ and ] instead.
32912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32913  if test "x$has_forbidden_chars" != x; then
32914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32916  fi
32917
32918
32919  windows_path="$new_path"
32920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32921    unix_path=`$CYGPATH -u "$windows_path"`
32922    new_path="$unix_path"
32923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32925    new_path="$unix_path"
32926  fi
32927
32928  if test "x$path" != "x$new_path"; then
32929    libpath="$new_path"
32930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32931$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32932  fi
32933
32934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32936
32937    else
32938      # We're on a unix platform. Hooray! :)
32939      path="$libpath"
32940      has_space=`$ECHO "$path" | $GREP " "`
32941      if test "x$has_space" != x; then
32942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32943$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32945      fi
32946
32947      # Use eval to expand a potential ~
32948      eval path="$path"
32949      if test ! -f "$path" && test ! -d "$path"; then
32950        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32951      fi
32952
32953      if test -d "$path"; then
32954        libpath="`cd "$path"; $THEPWDCMD -L`"
32955      else
32956        dir="`$DIRNAME "$path"`"
32957        base="`$BASENAME "$path"`"
32958        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32959      fi
32960    fi
32961  fi
32962
32963            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32964          fi
32965          IFS=";"
32966        fi
32967      done
32968      IFS="$OLDIFS"
32969    fi
32970  else
32971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32972$as_echo "not found" >&6; }
32973
32974    if test "x$VS_ENV_CMD" = x; then
32975      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32976$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32977      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32978$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32979    else
32980      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32981$as_echo "$as_me: Running the extraction script failed." >&6;}
32982    fi
32983    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32984$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32985    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32986$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32987    as_fn_error $? "Cannot continue" "$LINENO" 5
32988  fi
32989
32990    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32991    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32992    PATH="$VS_PATH"
32993    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32994    export INCLUDE="$VS_INCLUDE"
32995    export LIB="$VS_LIB"
32996  else
32997    if test "x$XCODE_VERSION_OUTPUT" != x; then
32998      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32999      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33000      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33001    else
33002      # Currently we do not define this for other toolchains. This might change as the need arise.
33003      TOOLCHAIN_VERSION=
33004    fi
33005  fi
33006
33007
33008  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33009  # override all other locations.
33010  if test "x$TOOLCHAIN_PATH" != x; then
33011    PATH=$TOOLCHAIN_PATH:$PATH
33012  fi
33013
33014
33015  #
33016  # Setup the compilers (CC and CXX)
33017  #
33018
33019  COMPILER_NAME=C
33020  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33021
33022  if test "x$CC" != x; then
33023    # User has supplied compiler name already, always let that override.
33024    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33025$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33026    if test "x`basename $CC`" = "x$CC"; then
33027      # A command without a complete path is provided, search $PATH.
33028
33029      for ac_prog in $CC
33030do
33031  # Extract the first word of "$ac_prog", so it can be a program name with args.
33032set dummy $ac_prog; ac_word=$2
33033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33034$as_echo_n "checking for $ac_word... " >&6; }
33035if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33036  $as_echo_n "(cached) " >&6
33037else
33038  case $POTENTIAL_CC in
33039  [\\/]* | ?:[\\/]*)
33040  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33041  ;;
33042  *)
33043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33044for as_dir in $PATH
33045do
33046  IFS=$as_save_IFS
33047  test -z "$as_dir" && as_dir=.
33048    for ac_exec_ext in '' $ac_executable_extensions; do
33049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33050    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33052    break 2
33053  fi
33054done
33055  done
33056IFS=$as_save_IFS
33057
33058  ;;
33059esac
33060fi
33061POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33062if test -n "$POTENTIAL_CC"; then
33063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33064$as_echo "$POTENTIAL_CC" >&6; }
33065else
33066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33067$as_echo "no" >&6; }
33068fi
33069
33070
33071  test -n "$POTENTIAL_CC" && break
33072done
33073
33074      if test "x$POTENTIAL_CC" != x; then
33075        CC=$POTENTIAL_CC
33076      else
33077        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33078      fi
33079    else
33080      # Otherwise it might already be a complete path
33081      if test ! -x "$CC"; then
33082        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33083      fi
33084    fi
33085  else
33086    # No user supplied value. Locate compiler ourselves.
33087
33088    # If we are cross compiling, assume cross compilation tools follows the
33089    # cross compilation standard where they are prefixed with the autoconf
33090    # standard name for the target. For example the binary
33091    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33092    # If we are not cross compiling, then the default compiler name will be
33093    # used.
33094
33095    CC=
33096    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33097    # before checking the rest of the PATH.
33098    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33099    # step, this should not be necessary.
33100    if test -n "$TOOLCHAIN_PATH"; then
33101      PATH_save="$PATH"
33102      PATH="$TOOLCHAIN_PATH"
33103      if test -n "$ac_tool_prefix"; then
33104  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33105set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33107$as_echo_n "checking for $ac_word... " >&6; }
33108if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33109  $as_echo_n "(cached) " >&6
33110else
33111  case $TOOLCHAIN_PATH_CC in
33112  [\\/]* | ?:[\\/]*)
33113  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33114  ;;
33115  *)
33116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33117for as_dir in $PATH
33118do
33119  IFS=$as_save_IFS
33120  test -z "$as_dir" && as_dir=.
33121    for ac_exec_ext in '' $ac_executable_extensions; do
33122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33123    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33125    break 2
33126  fi
33127done
33128  done
33129IFS=$as_save_IFS
33130
33131  ;;
33132esac
33133fi
33134TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33135if test -n "$TOOLCHAIN_PATH_CC"; then
33136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33137$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33138else
33139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33140$as_echo "no" >&6; }
33141fi
33142
33143
33144fi
33145if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33146  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33147  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33148set dummy $SEARCH_LIST; ac_word=$2
33149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33150$as_echo_n "checking for $ac_word... " >&6; }
33151if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33152  $as_echo_n "(cached) " >&6
33153else
33154  case $ac_pt_TOOLCHAIN_PATH_CC in
33155  [\\/]* | ?:[\\/]*)
33156  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33157  ;;
33158  *)
33159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33160for as_dir in $PATH
33161do
33162  IFS=$as_save_IFS
33163  test -z "$as_dir" && as_dir=.
33164    for ac_exec_ext in '' $ac_executable_extensions; do
33165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33166    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33168    break 2
33169  fi
33170done
33171  done
33172IFS=$as_save_IFS
33173
33174  ;;
33175esac
33176fi
33177ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33178if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33180$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33181else
33182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33183$as_echo "no" >&6; }
33184fi
33185
33186  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33187    TOOLCHAIN_PATH_CC=""
33188  else
33189    case $cross_compiling:$ac_tool_warned in
33190yes:)
33191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33193ac_tool_warned=yes ;;
33194esac
33195    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33196  fi
33197else
33198  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33199fi
33200
33201      CC=$TOOLCHAIN_PATH_CC
33202      PATH="$PATH_save"
33203    fi
33204
33205    # AC_PATH_TOOL can't be run multiple times with the same variable,
33206    # so create a new name for this run.
33207    if test "x$CC" = x; then
33208      if test -n "$ac_tool_prefix"; then
33209  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33210set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33212$as_echo_n "checking for $ac_word... " >&6; }
33213if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33214  $as_echo_n "(cached) " >&6
33215else
33216  case $POTENTIAL_CC in
33217  [\\/]* | ?:[\\/]*)
33218  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33219  ;;
33220  *)
33221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33222for as_dir in $PATH
33223do
33224  IFS=$as_save_IFS
33225  test -z "$as_dir" && as_dir=.
33226    for ac_exec_ext in '' $ac_executable_extensions; do
33227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33228    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33230    break 2
33231  fi
33232done
33233  done
33234IFS=$as_save_IFS
33235
33236  ;;
33237esac
33238fi
33239POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33240if test -n "$POTENTIAL_CC"; then
33241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33242$as_echo "$POTENTIAL_CC" >&6; }
33243else
33244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33245$as_echo "no" >&6; }
33246fi
33247
33248
33249fi
33250if test -z "$ac_cv_path_POTENTIAL_CC"; then
33251  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33252  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33253set dummy $SEARCH_LIST; ac_word=$2
33254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33255$as_echo_n "checking for $ac_word... " >&6; }
33256if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33257  $as_echo_n "(cached) " >&6
33258else
33259  case $ac_pt_POTENTIAL_CC in
33260  [\\/]* | ?:[\\/]*)
33261  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33262  ;;
33263  *)
33264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33265for as_dir in $PATH
33266do
33267  IFS=$as_save_IFS
33268  test -z "$as_dir" && as_dir=.
33269    for ac_exec_ext in '' $ac_executable_extensions; do
33270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33271    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33273    break 2
33274  fi
33275done
33276  done
33277IFS=$as_save_IFS
33278
33279  ;;
33280esac
33281fi
33282ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33283if test -n "$ac_pt_POTENTIAL_CC"; then
33284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33285$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33286else
33287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33288$as_echo "no" >&6; }
33289fi
33290
33291  if test "x$ac_pt_POTENTIAL_CC" = x; then
33292    POTENTIAL_CC=""
33293  else
33294    case $cross_compiling:$ac_tool_warned in
33295yes:)
33296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33298ac_tool_warned=yes ;;
33299esac
33300    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33301  fi
33302else
33303  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33304fi
33305
33306      CC=$POTENTIAL_CC
33307    fi
33308
33309    if test "x$CC" = x; then
33310
33311  # Print a helpful message on how to acquire the necessary build dependency.
33312  # devkit is the help tag: freetype, cups, alsa etc
33313  MISSING_DEPENDENCY=devkit
33314
33315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33316    cygwin_help $MISSING_DEPENDENCY
33317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33318    msys_help $MISSING_DEPENDENCY
33319  else
33320    PKGHANDLER_COMMAND=
33321
33322    case $PKGHANDLER in
33323      apt-get)
33324        apt_help     $MISSING_DEPENDENCY ;;
33325      yum)
33326        yum_help     $MISSING_DEPENDENCY ;;
33327      brew)
33328        brew_help    $MISSING_DEPENDENCY ;;
33329      port)
33330        port_help    $MISSING_DEPENDENCY ;;
33331      pkgutil)
33332        pkgutil_help $MISSING_DEPENDENCY ;;
33333      pkgadd)
33334        pkgadd_help  $MISSING_DEPENDENCY ;;
33335    esac
33336
33337    if test "x$PKGHANDLER_COMMAND" != x; then
33338      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33339    fi
33340  fi
33341
33342      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33343    fi
33344  fi
33345
33346  # Now we have a compiler binary in CC. Make sure it's okay.
33347
33348  # Only process if variable expands to non-empty
33349
33350  if test "x$CC" != x; then
33351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33352
33353  # First separate the path from the arguments. This will split at the first
33354  # space.
33355  complete="$CC"
33356  path="${complete%% *}"
33357  tmp="$complete EOL"
33358  arguments="${tmp#* }"
33359
33360  # Input might be given as Windows format, start by converting to
33361  # unix format.
33362  new_path=`$CYGPATH -u "$path"`
33363
33364  # Now try to locate executable using which
33365  new_path=`$WHICH "$new_path" 2> /dev/null`
33366  # bat and cmd files are not always considered executable in cygwin causing which
33367  # to not find them
33368  if test "x$new_path" = x \
33369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33371    new_path=`$CYGPATH -u "$path"`
33372  fi
33373  if test "x$new_path" = x; then
33374    # Oops. Which didn't find the executable.
33375    # The splitting of arguments from the executable at a space might have been incorrect,
33376    # since paths with space are more likely in Windows. Give it another try with the whole
33377    # argument.
33378    path="$complete"
33379    arguments="EOL"
33380    new_path=`$CYGPATH -u "$path"`
33381    new_path=`$WHICH "$new_path" 2> /dev/null`
33382    # bat and cmd files are not always considered executable in cygwin causing which
33383    # to not find them
33384    if test "x$new_path" = x \
33385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33387      new_path=`$CYGPATH -u "$path"`
33388    fi
33389    if test "x$new_path" = x; then
33390      # It's still not found. Now this is an unrecoverable error.
33391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33392$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33393      has_space=`$ECHO "$complete" | $GREP " "`
33394      if test "x$has_space" != x; then
33395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33397      fi
33398      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33399    fi
33400  fi
33401
33402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33405  # "foo.exe" is OK but "foo" is an error.
33406  #
33407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33408  # It is also a way to make sure we got the proper file name for the real test later on.
33409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33410  if test "x$test_shortpath" = x; then
33411    # Short path failed, file does not exist as specified.
33412    # Try adding .exe or .cmd
33413    if test -f "${new_path}.exe"; then
33414      input_to_shortpath="${new_path}.exe"
33415    elif test -f "${new_path}.cmd"; then
33416      input_to_shortpath="${new_path}.cmd"
33417    else
33418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33419$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33422      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33423    fi
33424  else
33425    input_to_shortpath="$new_path"
33426  fi
33427
33428  # Call helper function which possibly converts this using DOS-style short mode.
33429  # If so, the updated path is stored in $new_path.
33430  new_path="$input_to_shortpath"
33431
33432  input_path="$input_to_shortpath"
33433  # Check if we need to convert this using DOS-style short mode. If the path
33434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33435  # take no chances and rewrite it.
33436  # Note: m4 eats our [], so we need to use [ and ] instead.
33437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33438  if test "x$has_forbidden_chars" != x; then
33439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33443      # Going to short mode and back again did indeed matter. Since short mode is
33444      # case insensitive, let's make it lowercase to improve readability.
33445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33446      # Now convert it back to Unix-style (cygpath)
33447      input_path=`$CYGPATH -u "$shortmode_path"`
33448      new_path="$input_path"
33449    fi
33450  fi
33451
33452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33453  if test "x$test_cygdrive_prefix" = x; then
33454    # As a simple fix, exclude /usr/bin since it's not a real path.
33455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33457      # a path prefixed by /cygdrive for fixpath to work.
33458      new_path="$CYGWIN_ROOT_PATH$input_path"
33459    fi
33460  fi
33461
33462  # remove trailing .exe if any
33463  new_path="${new_path/%.exe/}"
33464
33465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33466
33467  # First separate the path from the arguments. This will split at the first
33468  # space.
33469  complete="$CC"
33470  path="${complete%% *}"
33471  tmp="$complete EOL"
33472  arguments="${tmp#* }"
33473
33474  # Input might be given as Windows format, start by converting to
33475  # unix format.
33476  new_path="$path"
33477
33478  windows_path="$new_path"
33479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33480    unix_path=`$CYGPATH -u "$windows_path"`
33481    new_path="$unix_path"
33482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33484    new_path="$unix_path"
33485  fi
33486
33487
33488  # Now try to locate executable using which
33489  new_path=`$WHICH "$new_path" 2> /dev/null`
33490
33491  if test "x$new_path" = x; then
33492    # Oops. Which didn't find the executable.
33493    # The splitting of arguments from the executable at a space might have been incorrect,
33494    # since paths with space are more likely in Windows. Give it another try with the whole
33495    # argument.
33496    path="$complete"
33497    arguments="EOL"
33498    new_path="$path"
33499
33500  windows_path="$new_path"
33501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33502    unix_path=`$CYGPATH -u "$windows_path"`
33503    new_path="$unix_path"
33504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33506    new_path="$unix_path"
33507  fi
33508
33509
33510    new_path=`$WHICH "$new_path" 2> /dev/null`
33511    # bat and cmd files are not always considered executable in MSYS causing which
33512    # to not find them
33513    if test "x$new_path" = x \
33514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33516      new_path="$path"
33517
33518  windows_path="$new_path"
33519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33520    unix_path=`$CYGPATH -u "$windows_path"`
33521    new_path="$unix_path"
33522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33524    new_path="$unix_path"
33525  fi
33526
33527    fi
33528
33529    if test "x$new_path" = x; then
33530      # It's still not found. Now this is an unrecoverable error.
33531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33532$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33533      has_space=`$ECHO "$complete" | $GREP " "`
33534      if test "x$has_space" != x; then
33535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33537      fi
33538      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33539    fi
33540  fi
33541
33542  # Now new_path has a complete unix path to the binary
33543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33544    # Keep paths in /bin as-is, but remove trailing .exe if any
33545    new_path="${new_path/%.exe/}"
33546    # Do not save /bin paths to all_fixpath_prefixes!
33547  else
33548    # Not in mixed or Windows style, start by that.
33549    new_path=`cmd //c echo $new_path`
33550
33551  input_path="$new_path"
33552  # Check if we need to convert this using DOS-style short mode. If the path
33553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33554  # take no chances and rewrite it.
33555  # Note: m4 eats our [], so we need to use [ and ] instead.
33556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33557  if test "x$has_forbidden_chars" != x; then
33558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33560  fi
33561
33562    # Output is in $new_path
33563
33564  windows_path="$new_path"
33565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33566    unix_path=`$CYGPATH -u "$windows_path"`
33567    new_path="$unix_path"
33568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33570    new_path="$unix_path"
33571  fi
33572
33573    # remove trailing .exe if any
33574    new_path="${new_path/%.exe/}"
33575
33576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33578  fi
33579
33580    else
33581      # We're on a unix platform. Hooray! :)
33582      # First separate the path from the arguments. This will split at the first
33583      # space.
33584      complete="$CC"
33585      path="${complete%% *}"
33586      tmp="$complete EOL"
33587      arguments="${tmp#* }"
33588
33589      # Cannot rely on the command "which" here since it doesn't always work.
33590      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33591      if test -z "$is_absolute_path"; then
33592        # Path to executable is not absolute. Find it.
33593        IFS_save="$IFS"
33594        IFS=:
33595        for p in $PATH; do
33596          if test -f "$p/$path" && test -x "$p/$path"; then
33597            new_path="$p/$path"
33598            break
33599          fi
33600        done
33601        IFS="$IFS_save"
33602      else
33603        # This is an absolute path, we can use it without further modifications.
33604        new_path="$path"
33605      fi
33606
33607      if test "x$new_path" = x; then
33608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33609$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33610        has_space=`$ECHO "$complete" | $GREP " "`
33611        if test "x$has_space" != x; then
33612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33614        fi
33615        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33616      fi
33617    fi
33618
33619    # Now join together the path and the arguments once again
33620    if test "x$arguments" != xEOL; then
33621      new_complete="$new_path ${arguments% *}"
33622    else
33623      new_complete="$new_path"
33624    fi
33625
33626    if test "x$complete" != "x$new_complete"; then
33627      CC="$new_complete"
33628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33629$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33630    fi
33631  fi
33632
33633  TEST_COMPILER="$CC"
33634
33635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33636$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33637  SYMLINK_ORIGINAL="$TEST_COMPILER"
33638
33639  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33640    # Follow a chain of symbolic links. Use readlink
33641    # where it exists, else fall back to horribly
33642    # complicated shell code.
33643    if test "x$READLINK_TESTED" != yes; then
33644      # On MacOSX there is a readlink tool with a different
33645      # purpose than the GNU readlink tool. Check the found readlink.
33646      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33647      if test "x$ISGNU" = x; then
33648        # A readlink that we do not know how to use.
33649        # Are there other non-GNU readlinks out there?
33650        READLINK_TESTED=yes
33651        READLINK=
33652      fi
33653    fi
33654
33655    if test "x$READLINK" != x; then
33656      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33657    else
33658      # Save the current directory for restoring afterwards
33659      STARTDIR=$PWD
33660      COUNTER=0
33661      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33662      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33663      cd $sym_link_dir
33664      # Use -P flag to resolve symlinks in directories.
33665      cd `$THEPWDCMD -P`
33666      sym_link_dir=`$THEPWDCMD -P`
33667      # Resolve file symlinks
33668      while test $COUNTER -lt 20; do
33669        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33670        if test "x$ISLINK" == x; then
33671          # This is not a symbolic link! We are done!
33672          break
33673        fi
33674        # Again resolve directory symlinks since the target of the just found
33675        # link could be in a different directory
33676        cd `$DIRNAME $ISLINK`
33677        sym_link_dir=`$THEPWDCMD -P`
33678        sym_link_file=`$BASENAME $ISLINK`
33679        let COUNTER=COUNTER+1
33680      done
33681      cd $STARTDIR
33682      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33683    fi
33684  fi
33685
33686  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33688$as_echo "no symlink" >&6; }
33689  else
33690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33691$as_echo "$SYMLINK_ORIGINAL" >&6; }
33692
33693    # We can't handle ccache by gcc wrappers, since we need to know if we're
33694    # using ccache. Instead ccache usage must be controlled by a configure option.
33695    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33696    if test "x$COMPILER_BASENAME" = "xccache"; then
33697      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33698$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33699      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33700    fi
33701  fi
33702
33703
33704  COMPILER=$CC
33705  COMPILER_NAME=$COMPILER_NAME
33706
33707  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33708    # cc -V output typically looks like
33709    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33710    # or
33711    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33712    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33713    # Check that this is likely to be the Solaris Studio cc.
33714    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33715    if test $? -ne 0; then
33716      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33717      { $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
33718$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33719      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33720$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33721      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33722$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33723      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33724    fi
33725    # Remove usage instructions (if present), and
33726    # collapse compiler output into a single line
33727    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33728        $SED -e 's/ *[Uu]sage:.*//'`
33729    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33730        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33731  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33732    # xlc -qversion output typically looks like
33733    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33734    #     Version: 11.01.0000.0015
33735    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33736    # Check that this is likely to be the IBM XL C compiler.
33737    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33738    if test $? -ne 0; then
33739      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33740      { $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
33741$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33742      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33743$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33744      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33745$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33746      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33747    fi
33748    # Collapse compiler output into a single line
33749    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33750    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33751        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33752  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33753    # There is no specific version flag, but all output starts with a version string.
33754    # First line typically looks something like:
33755    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33756    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33757    # Check that this is likely to be Microsoft CL.EXE.
33758    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33759    if test $? -ne 0; then
33760      { $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
33761$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33762      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33763$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33764      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33765    fi
33766    # Collapse compiler output into a single line
33767    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33768    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33769        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33770  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33771    # gcc --version output typically looks like
33772    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33773    #     Copyright (C) 2013 Free Software Foundation, Inc.
33774    #     This is free software; see the source for copying conditions.  There is NO
33775    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33776    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33777    # Check that this is likely to be GCC.
33778    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33779    if test $? -ne 0; then
33780      { $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
33781$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33782      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33783$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33784      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33785    fi
33786    # Remove Copyright and legalese from version string, and
33787    # collapse into a single line
33788    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33789        $SED -e 's/ *Copyright .*//'`
33790    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33791        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33792  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33793    # clang --version output typically looks like
33794    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33795    #    clang version 3.3 (tags/RELEASE_33/final)
33796    # or
33797    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33798    #    Target: x86_64-pc-linux-gnu
33799    #    Thread model: posix
33800    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33801    # Check that this is likely to be clang
33802    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33803    if test $? -ne 0; then
33804      { $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
33805$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33806      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33807$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33808      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33809    fi
33810    # Collapse compiler output into a single line
33811    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33812    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33813        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33814  else
33815      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33816  fi
33817  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33818  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33819  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33820  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33821
33822  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33823$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33824
33825
33826  # Now that we have resolved CC ourself, let autoconf have its go at it
33827  ac_ext=c
33828ac_cpp='$CPP $CPPFLAGS'
33829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33831ac_compiler_gnu=$ac_cv_c_compiler_gnu
33832if test -n "$ac_tool_prefix"; then
33833  for ac_prog in $CC
33834  do
33835    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33836set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33838$as_echo_n "checking for $ac_word... " >&6; }
33839if ${ac_cv_prog_CC+:} false; then :
33840  $as_echo_n "(cached) " >&6
33841else
33842  if test -n "$CC"; then
33843  ac_cv_prog_CC="$CC" # Let the user override the test.
33844else
33845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33846for as_dir in $PATH
33847do
33848  IFS=$as_save_IFS
33849  test -z "$as_dir" && as_dir=.
33850    for ac_exec_ext in '' $ac_executable_extensions; do
33851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33852    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33854    break 2
33855  fi
33856done
33857  done
33858IFS=$as_save_IFS
33859
33860fi
33861fi
33862CC=$ac_cv_prog_CC
33863if test -n "$CC"; then
33864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33865$as_echo "$CC" >&6; }
33866else
33867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33868$as_echo "no" >&6; }
33869fi
33870
33871
33872    test -n "$CC" && break
33873  done
33874fi
33875if test -z "$CC"; then
33876  ac_ct_CC=$CC
33877  for ac_prog in $CC
33878do
33879  # Extract the first word of "$ac_prog", so it can be a program name with args.
33880set dummy $ac_prog; ac_word=$2
33881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33882$as_echo_n "checking for $ac_word... " >&6; }
33883if ${ac_cv_prog_ac_ct_CC+:} false; then :
33884  $as_echo_n "(cached) " >&6
33885else
33886  if test -n "$ac_ct_CC"; then
33887  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33888else
33889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33890for as_dir in $PATH
33891do
33892  IFS=$as_save_IFS
33893  test -z "$as_dir" && as_dir=.
33894    for ac_exec_ext in '' $ac_executable_extensions; do
33895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33896    ac_cv_prog_ac_ct_CC="$ac_prog"
33897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33898    break 2
33899  fi
33900done
33901  done
33902IFS=$as_save_IFS
33903
33904fi
33905fi
33906ac_ct_CC=$ac_cv_prog_ac_ct_CC
33907if test -n "$ac_ct_CC"; then
33908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33909$as_echo "$ac_ct_CC" >&6; }
33910else
33911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33912$as_echo "no" >&6; }
33913fi
33914
33915
33916  test -n "$ac_ct_CC" && break
33917done
33918
33919  if test "x$ac_ct_CC" = x; then
33920    CC=""
33921  else
33922    case $cross_compiling:$ac_tool_warned in
33923yes:)
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33926ac_tool_warned=yes ;;
33927esac
33928    CC=$ac_ct_CC
33929  fi
33930fi
33931
33932
33933test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33935as_fn_error $? "no acceptable C compiler found in \$PATH
33936See \`config.log' for more details" "$LINENO" 5; }
33937
33938# Provide some information about the compiler.
33939$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33940set X $ac_compile
33941ac_compiler=$2
33942for ac_option in --version -v -V -qversion; do
33943  { { ac_try="$ac_compiler $ac_option >&5"
33944case "(($ac_try" in
33945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33946  *) ac_try_echo=$ac_try;;
33947esac
33948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33949$as_echo "$ac_try_echo"; } >&5
33950  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33951  ac_status=$?
33952  if test -s conftest.err; then
33953    sed '10a\
33954... rest of stderr output deleted ...
33955         10q' conftest.err >conftest.er1
33956    cat conftest.er1 >&5
33957  fi
33958  rm -f conftest.er1 conftest.err
33959  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33960  test $ac_status = 0; }
33961done
33962
33963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33964/* end confdefs.h.  */
33965
33966int
33967main ()
33968{
33969
33970  ;
33971  return 0;
33972}
33973_ACEOF
33974ac_clean_files_save=$ac_clean_files
33975ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33976# Try to create an executable without -o first, disregard a.out.
33977# It will help us diagnose broken compilers, and finding out an intuition
33978# of exeext.
33979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33980$as_echo_n "checking whether the C compiler works... " >&6; }
33981ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33982
33983# The possible output files:
33984ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33985
33986ac_rmfiles=
33987for ac_file in $ac_files
33988do
33989  case $ac_file in
33990    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33991    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33992  esac
33993done
33994rm -f $ac_rmfiles
33995
33996if { { ac_try="$ac_link_default"
33997case "(($ac_try" in
33998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33999  *) ac_try_echo=$ac_try;;
34000esac
34001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34002$as_echo "$ac_try_echo"; } >&5
34003  (eval "$ac_link_default") 2>&5
34004  ac_status=$?
34005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34006  test $ac_status = 0; }; then :
34007  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34008# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34009# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34010# so that the user can short-circuit this test for compilers unknown to
34011# Autoconf.
34012for ac_file in $ac_files ''
34013do
34014  test -f "$ac_file" || continue
34015  case $ac_file in
34016    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34017	;;
34018    [ab].out )
34019	# We found the default executable, but exeext='' is most
34020	# certainly right.
34021	break;;
34022    *.* )
34023	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34024	then :; else
34025	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34026	fi
34027	# We set ac_cv_exeext here because the later test for it is not
34028	# safe: cross compilers may not add the suffix if given an `-o'
34029	# argument, so we may need to know it at that point already.
34030	# Even if this section looks crufty: it has the advantage of
34031	# actually working.
34032	break;;
34033    * )
34034	break;;
34035  esac
34036done
34037test "$ac_cv_exeext" = no && ac_cv_exeext=
34038
34039else
34040  ac_file=''
34041fi
34042if test -z "$ac_file"; then :
34043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34044$as_echo "no" >&6; }
34045$as_echo "$as_me: failed program was:" >&5
34046sed 's/^/| /' conftest.$ac_ext >&5
34047
34048{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34050as_fn_error 77 "C compiler cannot create executables
34051See \`config.log' for more details" "$LINENO" 5; }
34052else
34053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34054$as_echo "yes" >&6; }
34055fi
34056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34057$as_echo_n "checking for C compiler default output file name... " >&6; }
34058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34059$as_echo "$ac_file" >&6; }
34060ac_exeext=$ac_cv_exeext
34061
34062rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34063ac_clean_files=$ac_clean_files_save
34064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34065$as_echo_n "checking for suffix of executables... " >&6; }
34066if { { ac_try="$ac_link"
34067case "(($ac_try" in
34068  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34069  *) ac_try_echo=$ac_try;;
34070esac
34071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34072$as_echo "$ac_try_echo"; } >&5
34073  (eval "$ac_link") 2>&5
34074  ac_status=$?
34075  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34076  test $ac_status = 0; }; then :
34077  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34078# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34079# work properly (i.e., refer to `conftest.exe'), while it won't with
34080# `rm'.
34081for ac_file in conftest.exe conftest conftest.*; do
34082  test -f "$ac_file" || continue
34083  case $ac_file in
34084    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34085    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34086	  break;;
34087    * ) break;;
34088  esac
34089done
34090else
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 compute suffix of executables: cannot compile and link
34094See \`config.log' for more details" "$LINENO" 5; }
34095fi
34096rm -f conftest conftest$ac_cv_exeext
34097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34098$as_echo "$ac_cv_exeext" >&6; }
34099
34100rm -f conftest.$ac_ext
34101EXEEXT=$ac_cv_exeext
34102ac_exeext=$EXEEXT
34103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34104/* end confdefs.h.  */
34105#include <stdio.h>
34106int
34107main ()
34108{
34109FILE *f = fopen ("conftest.out", "w");
34110 return ferror (f) || fclose (f) != 0;
34111
34112  ;
34113  return 0;
34114}
34115_ACEOF
34116ac_clean_files="$ac_clean_files conftest.out"
34117# Check that the compiler produces executables we can run.  If not, either
34118# the compiler is broken, or we cross compile.
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34120$as_echo_n "checking whether we are cross compiling... " >&6; }
34121if test "$cross_compiling" != yes; then
34122  { { ac_try="$ac_link"
34123case "(($ac_try" in
34124  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34125  *) ac_try_echo=$ac_try;;
34126esac
34127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34128$as_echo "$ac_try_echo"; } >&5
34129  (eval "$ac_link") 2>&5
34130  ac_status=$?
34131  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34132  test $ac_status = 0; }
34133  if { ac_try='./conftest$ac_cv_exeext'
34134  { { case "(($ac_try" in
34135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34136  *) ac_try_echo=$ac_try;;
34137esac
34138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34139$as_echo "$ac_try_echo"; } >&5
34140  (eval "$ac_try") 2>&5
34141  ac_status=$?
34142  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34143  test $ac_status = 0; }; }; then
34144    cross_compiling=no
34145  else
34146    if test "$cross_compiling" = maybe; then
34147	cross_compiling=yes
34148    else
34149	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34151as_fn_error $? "cannot run C compiled programs.
34152If you meant to cross compile, use \`--host'.
34153See \`config.log' for more details" "$LINENO" 5; }
34154    fi
34155  fi
34156fi
34157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34158$as_echo "$cross_compiling" >&6; }
34159
34160rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34161ac_clean_files=$ac_clean_files_save
34162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34163$as_echo_n "checking for suffix of object files... " >&6; }
34164if ${ac_cv_objext+:} false; then :
34165  $as_echo_n "(cached) " >&6
34166else
34167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34168/* end confdefs.h.  */
34169
34170int
34171main ()
34172{
34173
34174  ;
34175  return 0;
34176}
34177_ACEOF
34178rm -f conftest.o conftest.obj
34179if { { ac_try="$ac_compile"
34180case "(($ac_try" in
34181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34182  *) ac_try_echo=$ac_try;;
34183esac
34184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34185$as_echo "$ac_try_echo"; } >&5
34186  (eval "$ac_compile") 2>&5
34187  ac_status=$?
34188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34189  test $ac_status = 0; }; then :
34190  for ac_file in conftest.o conftest.obj conftest.*; do
34191  test -f "$ac_file" || continue;
34192  case $ac_file in
34193    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34194    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34195       break;;
34196  esac
34197done
34198else
34199  $as_echo "$as_me: failed program was:" >&5
34200sed 's/^/| /' conftest.$ac_ext >&5
34201
34202{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34204as_fn_error $? "cannot compute suffix of object files: cannot compile
34205See \`config.log' for more details" "$LINENO" 5; }
34206fi
34207rm -f conftest.$ac_cv_objext conftest.$ac_ext
34208fi
34209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34210$as_echo "$ac_cv_objext" >&6; }
34211OBJEXT=$ac_cv_objext
34212ac_objext=$OBJEXT
34213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34214$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34215if ${ac_cv_c_compiler_gnu+:} false; then :
34216  $as_echo_n "(cached) " >&6
34217else
34218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34219/* end confdefs.h.  */
34220
34221int
34222main ()
34223{
34224#ifndef __GNUC__
34225       choke me
34226#endif
34227
34228  ;
34229  return 0;
34230}
34231_ACEOF
34232if ac_fn_c_try_compile "$LINENO"; then :
34233  ac_compiler_gnu=yes
34234else
34235  ac_compiler_gnu=no
34236fi
34237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34238ac_cv_c_compiler_gnu=$ac_compiler_gnu
34239
34240fi
34241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34242$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34243if test $ac_compiler_gnu = yes; then
34244  GCC=yes
34245else
34246  GCC=
34247fi
34248ac_test_CFLAGS=${CFLAGS+set}
34249ac_save_CFLAGS=$CFLAGS
34250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34251$as_echo_n "checking whether $CC accepts -g... " >&6; }
34252if ${ac_cv_prog_cc_g+:} false; then :
34253  $as_echo_n "(cached) " >&6
34254else
34255  ac_save_c_werror_flag=$ac_c_werror_flag
34256   ac_c_werror_flag=yes
34257   ac_cv_prog_cc_g=no
34258   CFLAGS="-g"
34259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34260/* end confdefs.h.  */
34261
34262int
34263main ()
34264{
34265
34266  ;
34267  return 0;
34268}
34269_ACEOF
34270if ac_fn_c_try_compile "$LINENO"; then :
34271  ac_cv_prog_cc_g=yes
34272else
34273  CFLAGS=""
34274      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34275/* end confdefs.h.  */
34276
34277int
34278main ()
34279{
34280
34281  ;
34282  return 0;
34283}
34284_ACEOF
34285if ac_fn_c_try_compile "$LINENO"; then :
34286
34287else
34288  ac_c_werror_flag=$ac_save_c_werror_flag
34289	 CFLAGS="-g"
34290	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34291/* end confdefs.h.  */
34292
34293int
34294main ()
34295{
34296
34297  ;
34298  return 0;
34299}
34300_ACEOF
34301if ac_fn_c_try_compile "$LINENO"; then :
34302  ac_cv_prog_cc_g=yes
34303fi
34304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34305fi
34306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34307fi
34308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34309   ac_c_werror_flag=$ac_save_c_werror_flag
34310fi
34311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34312$as_echo "$ac_cv_prog_cc_g" >&6; }
34313if test "$ac_test_CFLAGS" = set; then
34314  CFLAGS=$ac_save_CFLAGS
34315elif test $ac_cv_prog_cc_g = yes; then
34316  if test "$GCC" = yes; then
34317    CFLAGS="-g -O2"
34318  else
34319    CFLAGS="-g"
34320  fi
34321else
34322  if test "$GCC" = yes; then
34323    CFLAGS="-O2"
34324  else
34325    CFLAGS=
34326  fi
34327fi
34328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34329$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34330if ${ac_cv_prog_cc_c89+:} false; then :
34331  $as_echo_n "(cached) " >&6
34332else
34333  ac_cv_prog_cc_c89=no
34334ac_save_CC=$CC
34335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34336/* end confdefs.h.  */
34337#include <stdarg.h>
34338#include <stdio.h>
34339struct stat;
34340/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34341struct buf { int x; };
34342FILE * (*rcsopen) (struct buf *, struct stat *, int);
34343static char *e (p, i)
34344     char **p;
34345     int i;
34346{
34347  return p[i];
34348}
34349static char *f (char * (*g) (char **, int), char **p, ...)
34350{
34351  char *s;
34352  va_list v;
34353  va_start (v,p);
34354  s = g (p, va_arg (v,int));
34355  va_end (v);
34356  return s;
34357}
34358
34359/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34360   function prototypes and stuff, but not '\xHH' hex character constants.
34361   These don't provoke an error unfortunately, instead are silently treated
34362   as 'x'.  The following induces an error, until -std is added to get
34363   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34364   array size at least.  It's necessary to write '\x00'==0 to get something
34365   that's true only with -std.  */
34366int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34367
34368/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34369   inside strings and character constants.  */
34370#define FOO(x) 'x'
34371int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34372
34373int test (int i, double x);
34374struct s1 {int (*f) (int a);};
34375struct s2 {int (*f) (double a);};
34376int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34377int argc;
34378char **argv;
34379int
34380main ()
34381{
34382return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34383  ;
34384  return 0;
34385}
34386_ACEOF
34387for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34388	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34389do
34390  CC="$ac_save_CC $ac_arg"
34391  if ac_fn_c_try_compile "$LINENO"; then :
34392  ac_cv_prog_cc_c89=$ac_arg
34393fi
34394rm -f core conftest.err conftest.$ac_objext
34395  test "x$ac_cv_prog_cc_c89" != "xno" && break
34396done
34397rm -f conftest.$ac_ext
34398CC=$ac_save_CC
34399
34400fi
34401# AC_CACHE_VAL
34402case "x$ac_cv_prog_cc_c89" in
34403  x)
34404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34405$as_echo "none needed" >&6; } ;;
34406  xno)
34407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34408$as_echo "unsupported" >&6; } ;;
34409  *)
34410    CC="$CC $ac_cv_prog_cc_c89"
34411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34412$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34413esac
34414if test "x$ac_cv_prog_cc_c89" != xno; then :
34415
34416fi
34417
34418ac_ext=cpp
34419ac_cpp='$CXXCPP $CPPFLAGS'
34420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34423
34424
34425
34426  COMPILER_NAME=C++
34427  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34428
34429  if test "x$CXX" != x; then
34430    # User has supplied compiler name already, always let that override.
34431    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34432$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34433    if test "x`basename $CXX`" = "x$CXX"; then
34434      # A command without a complete path is provided, search $PATH.
34435
34436      for ac_prog in $CXX
34437do
34438  # Extract the first word of "$ac_prog", so it can be a program name with args.
34439set dummy $ac_prog; ac_word=$2
34440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34441$as_echo_n "checking for $ac_word... " >&6; }
34442if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34443  $as_echo_n "(cached) " >&6
34444else
34445  case $POTENTIAL_CXX in
34446  [\\/]* | ?:[\\/]*)
34447  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34448  ;;
34449  *)
34450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34451for as_dir in $PATH
34452do
34453  IFS=$as_save_IFS
34454  test -z "$as_dir" && as_dir=.
34455    for ac_exec_ext in '' $ac_executable_extensions; do
34456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34457    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34459    break 2
34460  fi
34461done
34462  done
34463IFS=$as_save_IFS
34464
34465  ;;
34466esac
34467fi
34468POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34469if test -n "$POTENTIAL_CXX"; then
34470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34471$as_echo "$POTENTIAL_CXX" >&6; }
34472else
34473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34474$as_echo "no" >&6; }
34475fi
34476
34477
34478  test -n "$POTENTIAL_CXX" && break
34479done
34480
34481      if test "x$POTENTIAL_CXX" != x; then
34482        CXX=$POTENTIAL_CXX
34483      else
34484        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34485      fi
34486    else
34487      # Otherwise it might already be a complete path
34488      if test ! -x "$CXX"; then
34489        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34490      fi
34491    fi
34492  else
34493    # No user supplied value. Locate compiler ourselves.
34494
34495    # If we are cross compiling, assume cross compilation tools follows the
34496    # cross compilation standard where they are prefixed with the autoconf
34497    # standard name for the target. For example the binary
34498    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34499    # If we are not cross compiling, then the default compiler name will be
34500    # used.
34501
34502    CXX=
34503    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34504    # before checking the rest of the PATH.
34505    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34506    # step, this should not be necessary.
34507    if test -n "$TOOLCHAIN_PATH"; then
34508      PATH_save="$PATH"
34509      PATH="$TOOLCHAIN_PATH"
34510      if test -n "$ac_tool_prefix"; then
34511  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34512set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34514$as_echo_n "checking for $ac_word... " >&6; }
34515if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34516  $as_echo_n "(cached) " >&6
34517else
34518  case $TOOLCHAIN_PATH_CXX in
34519  [\\/]* | ?:[\\/]*)
34520  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34521  ;;
34522  *)
34523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34524for as_dir in $PATH
34525do
34526  IFS=$as_save_IFS
34527  test -z "$as_dir" && as_dir=.
34528    for ac_exec_ext in '' $ac_executable_extensions; do
34529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34530    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34532    break 2
34533  fi
34534done
34535  done
34536IFS=$as_save_IFS
34537
34538  ;;
34539esac
34540fi
34541TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34542if test -n "$TOOLCHAIN_PATH_CXX"; then
34543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34544$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34545else
34546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34547$as_echo "no" >&6; }
34548fi
34549
34550
34551fi
34552if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
34553  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
34554  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34555set dummy $SEARCH_LIST; ac_word=$2
34556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34557$as_echo_n "checking for $ac_word... " >&6; }
34558if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
34559  $as_echo_n "(cached) " >&6
34560else
34561  case $ac_pt_TOOLCHAIN_PATH_CXX in
34562  [\\/]* | ?:[\\/]*)
34563  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34564  ;;
34565  *)
34566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34567for as_dir in $PATH
34568do
34569  IFS=$as_save_IFS
34570  test -z "$as_dir" && as_dir=.
34571    for ac_exec_ext in '' $ac_executable_extensions; do
34572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34573    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34575    break 2
34576  fi
34577done
34578  done
34579IFS=$as_save_IFS
34580
34581  ;;
34582esac
34583fi
34584ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
34585if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
34586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
34587$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
34588else
34589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34590$as_echo "no" >&6; }
34591fi
34592
34593  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
34594    TOOLCHAIN_PATH_CXX=""
34595  else
34596    case $cross_compiling:$ac_tool_warned in
34597yes:)
34598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34600ac_tool_warned=yes ;;
34601esac
34602    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
34603  fi
34604else
34605  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
34606fi
34607
34608      CXX=$TOOLCHAIN_PATH_CXX
34609      PATH="$PATH_save"
34610    fi
34611
34612    # AC_PATH_TOOL can't be run multiple times with the same variable,
34613    # so create a new name for this run.
34614    if test "x$CXX" = x; then
34615      if test -n "$ac_tool_prefix"; then
34616  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34617set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34619$as_echo_n "checking for $ac_word... " >&6; }
34620if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34621  $as_echo_n "(cached) " >&6
34622else
34623  case $POTENTIAL_CXX in
34624  [\\/]* | ?:[\\/]*)
34625  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34626  ;;
34627  *)
34628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34629for as_dir in $PATH
34630do
34631  IFS=$as_save_IFS
34632  test -z "$as_dir" && as_dir=.
34633    for ac_exec_ext in '' $ac_executable_extensions; do
34634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34635    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34637    break 2
34638  fi
34639done
34640  done
34641IFS=$as_save_IFS
34642
34643  ;;
34644esac
34645fi
34646POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34647if test -n "$POTENTIAL_CXX"; then
34648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34649$as_echo "$POTENTIAL_CXX" >&6; }
34650else
34651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34652$as_echo "no" >&6; }
34653fi
34654
34655
34656fi
34657if test -z "$ac_cv_path_POTENTIAL_CXX"; then
34658  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
34659  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34660set dummy $SEARCH_LIST; ac_word=$2
34661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34662$as_echo_n "checking for $ac_word... " >&6; }
34663if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
34664  $as_echo_n "(cached) " >&6
34665else
34666  case $ac_pt_POTENTIAL_CXX in
34667  [\\/]* | ?:[\\/]*)
34668  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
34669  ;;
34670  *)
34671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34672for as_dir in $PATH
34673do
34674  IFS=$as_save_IFS
34675  test -z "$as_dir" && as_dir=.
34676    for ac_exec_ext in '' $ac_executable_extensions; do
34677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34678    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34680    break 2
34681  fi
34682done
34683  done
34684IFS=$as_save_IFS
34685
34686  ;;
34687esac
34688fi
34689ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
34690if test -n "$ac_pt_POTENTIAL_CXX"; then
34691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
34692$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
34693else
34694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34695$as_echo "no" >&6; }
34696fi
34697
34698  if test "x$ac_pt_POTENTIAL_CXX" = x; then
34699    POTENTIAL_CXX=""
34700  else
34701    case $cross_compiling:$ac_tool_warned in
34702yes:)
34703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34705ac_tool_warned=yes ;;
34706esac
34707    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
34708  fi
34709else
34710  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
34711fi
34712
34713      CXX=$POTENTIAL_CXX
34714    fi
34715
34716    if test "x$CXX" = x; then
34717
34718  # Print a helpful message on how to acquire the necessary build dependency.
34719  # devkit is the help tag: freetype, cups, alsa etc
34720  MISSING_DEPENDENCY=devkit
34721
34722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34723    cygwin_help $MISSING_DEPENDENCY
34724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34725    msys_help $MISSING_DEPENDENCY
34726  else
34727    PKGHANDLER_COMMAND=
34728
34729    case $PKGHANDLER in
34730      apt-get)
34731        apt_help     $MISSING_DEPENDENCY ;;
34732      yum)
34733        yum_help     $MISSING_DEPENDENCY ;;
34734      brew)
34735        brew_help    $MISSING_DEPENDENCY ;;
34736      port)
34737        port_help    $MISSING_DEPENDENCY ;;
34738      pkgutil)
34739        pkgutil_help $MISSING_DEPENDENCY ;;
34740      pkgadd)
34741        pkgadd_help  $MISSING_DEPENDENCY ;;
34742    esac
34743
34744    if test "x$PKGHANDLER_COMMAND" != x; then
34745      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34746    fi
34747  fi
34748
34749      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34750    fi
34751  fi
34752
34753  # Now we have a compiler binary in CXX. Make sure it's okay.
34754
34755  # Only process if variable expands to non-empty
34756
34757  if test "x$CXX" != x; then
34758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34759
34760  # First separate the path from the arguments. This will split at the first
34761  # space.
34762  complete="$CXX"
34763  path="${complete%% *}"
34764  tmp="$complete EOL"
34765  arguments="${tmp#* }"
34766
34767  # Input might be given as Windows format, start by converting to
34768  # unix format.
34769  new_path=`$CYGPATH -u "$path"`
34770
34771  # Now try to locate executable using which
34772  new_path=`$WHICH "$new_path" 2> /dev/null`
34773  # bat and cmd files are not always considered executable in cygwin causing which
34774  # to not find them
34775  if test "x$new_path" = x \
34776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34778    new_path=`$CYGPATH -u "$path"`
34779  fi
34780  if test "x$new_path" = x; then
34781    # Oops. Which didn't find the executable.
34782    # The splitting of arguments from the executable at a space might have been incorrect,
34783    # since paths with space are more likely in Windows. Give it another try with the whole
34784    # argument.
34785    path="$complete"
34786    arguments="EOL"
34787    new_path=`$CYGPATH -u "$path"`
34788    new_path=`$WHICH "$new_path" 2> /dev/null`
34789    # bat and cmd files are not always considered executable in cygwin causing which
34790    # to not find them
34791    if test "x$new_path" = x \
34792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34794      new_path=`$CYGPATH -u "$path"`
34795    fi
34796    if test "x$new_path" = x; then
34797      # It's still not found. Now this is an unrecoverable error.
34798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34799$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34800      has_space=`$ECHO "$complete" | $GREP " "`
34801      if test "x$has_space" != x; then
34802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34804      fi
34805      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34806    fi
34807  fi
34808
34809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34812  # "foo.exe" is OK but "foo" is an error.
34813  #
34814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34815  # It is also a way to make sure we got the proper file name for the real test later on.
34816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34817  if test "x$test_shortpath" = x; then
34818    # Short path failed, file does not exist as specified.
34819    # Try adding .exe or .cmd
34820    if test -f "${new_path}.exe"; then
34821      input_to_shortpath="${new_path}.exe"
34822    elif test -f "${new_path}.cmd"; then
34823      input_to_shortpath="${new_path}.cmd"
34824    else
34825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34826$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34829      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34830    fi
34831  else
34832    input_to_shortpath="$new_path"
34833  fi
34834
34835  # Call helper function which possibly converts this using DOS-style short mode.
34836  # If so, the updated path is stored in $new_path.
34837  new_path="$input_to_shortpath"
34838
34839  input_path="$input_to_shortpath"
34840  # Check if we need to convert this using DOS-style short mode. If the path
34841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34842  # take no chances and rewrite it.
34843  # Note: m4 eats our [], so we need to use [ and ] instead.
34844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34845  if test "x$has_forbidden_chars" != x; then
34846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34850      # Going to short mode and back again did indeed matter. Since short mode is
34851      # case insensitive, let's make it lowercase to improve readability.
34852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34853      # Now convert it back to Unix-style (cygpath)
34854      input_path=`$CYGPATH -u "$shortmode_path"`
34855      new_path="$input_path"
34856    fi
34857  fi
34858
34859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34860  if test "x$test_cygdrive_prefix" = x; then
34861    # As a simple fix, exclude /usr/bin since it's not a real path.
34862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34864      # a path prefixed by /cygdrive for fixpath to work.
34865      new_path="$CYGWIN_ROOT_PATH$input_path"
34866    fi
34867  fi
34868
34869  # remove trailing .exe if any
34870  new_path="${new_path/%.exe/}"
34871
34872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34873
34874  # First separate the path from the arguments. This will split at the first
34875  # space.
34876  complete="$CXX"
34877  path="${complete%% *}"
34878  tmp="$complete EOL"
34879  arguments="${tmp#* }"
34880
34881  # Input might be given as Windows format, start by converting to
34882  # unix format.
34883  new_path="$path"
34884
34885  windows_path="$new_path"
34886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34887    unix_path=`$CYGPATH -u "$windows_path"`
34888    new_path="$unix_path"
34889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34891    new_path="$unix_path"
34892  fi
34893
34894
34895  # Now try to locate executable using which
34896  new_path=`$WHICH "$new_path" 2> /dev/null`
34897
34898  if test "x$new_path" = x; then
34899    # Oops. Which didn't find the executable.
34900    # The splitting of arguments from the executable at a space might have been incorrect,
34901    # since paths with space are more likely in Windows. Give it another try with the whole
34902    # argument.
34903    path="$complete"
34904    arguments="EOL"
34905    new_path="$path"
34906
34907  windows_path="$new_path"
34908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34909    unix_path=`$CYGPATH -u "$windows_path"`
34910    new_path="$unix_path"
34911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34913    new_path="$unix_path"
34914  fi
34915
34916
34917    new_path=`$WHICH "$new_path" 2> /dev/null`
34918    # bat and cmd files are not always considered executable in MSYS causing which
34919    # to not find them
34920    if test "x$new_path" = x \
34921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34923      new_path="$path"
34924
34925  windows_path="$new_path"
34926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34927    unix_path=`$CYGPATH -u "$windows_path"`
34928    new_path="$unix_path"
34929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34931    new_path="$unix_path"
34932  fi
34933
34934    fi
34935
34936    if test "x$new_path" = x; then
34937      # It's still not found. Now this is an unrecoverable error.
34938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34939$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34940      has_space=`$ECHO "$complete" | $GREP " "`
34941      if test "x$has_space" != x; then
34942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34944      fi
34945      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34946    fi
34947  fi
34948
34949  # Now new_path has a complete unix path to the binary
34950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34951    # Keep paths in /bin as-is, but remove trailing .exe if any
34952    new_path="${new_path/%.exe/}"
34953    # Do not save /bin paths to all_fixpath_prefixes!
34954  else
34955    # Not in mixed or Windows style, start by that.
34956    new_path=`cmd //c echo $new_path`
34957
34958  input_path="$new_path"
34959  # Check if we need to convert this using DOS-style short mode. If the path
34960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34961  # take no chances and rewrite it.
34962  # Note: m4 eats our [], so we need to use [ and ] instead.
34963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34964  if test "x$has_forbidden_chars" != x; then
34965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34967  fi
34968
34969    # Output is in $new_path
34970
34971  windows_path="$new_path"
34972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34973    unix_path=`$CYGPATH -u "$windows_path"`
34974    new_path="$unix_path"
34975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34977    new_path="$unix_path"
34978  fi
34979
34980    # remove trailing .exe if any
34981    new_path="${new_path/%.exe/}"
34982
34983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34985  fi
34986
34987    else
34988      # We're on a unix platform. Hooray! :)
34989      # First separate the path from the arguments. This will split at the first
34990      # space.
34991      complete="$CXX"
34992      path="${complete%% *}"
34993      tmp="$complete EOL"
34994      arguments="${tmp#* }"
34995
34996      # Cannot rely on the command "which" here since it doesn't always work.
34997      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34998      if test -z "$is_absolute_path"; then
34999        # Path to executable is not absolute. Find it.
35000        IFS_save="$IFS"
35001        IFS=:
35002        for p in $PATH; do
35003          if test -f "$p/$path" && test -x "$p/$path"; then
35004            new_path="$p/$path"
35005            break
35006          fi
35007        done
35008        IFS="$IFS_save"
35009      else
35010        # This is an absolute path, we can use it without further modifications.
35011        new_path="$path"
35012      fi
35013
35014      if test "x$new_path" = x; then
35015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35016$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35017        has_space=`$ECHO "$complete" | $GREP " "`
35018        if test "x$has_space" != x; then
35019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35021        fi
35022        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35023      fi
35024    fi
35025
35026    # Now join together the path and the arguments once again
35027    if test "x$arguments" != xEOL; then
35028      new_complete="$new_path ${arguments% *}"
35029    else
35030      new_complete="$new_path"
35031    fi
35032
35033    if test "x$complete" != "x$new_complete"; then
35034      CXX="$new_complete"
35035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35036$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35037    fi
35038  fi
35039
35040  TEST_COMPILER="$CXX"
35041
35042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35043$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35044  SYMLINK_ORIGINAL="$TEST_COMPILER"
35045
35046  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35047    # Follow a chain of symbolic links. Use readlink
35048    # where it exists, else fall back to horribly
35049    # complicated shell code.
35050    if test "x$READLINK_TESTED" != yes; then
35051      # On MacOSX there is a readlink tool with a different
35052      # purpose than the GNU readlink tool. Check the found readlink.
35053      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35054      if test "x$ISGNU" = x; then
35055        # A readlink that we do not know how to use.
35056        # Are there other non-GNU readlinks out there?
35057        READLINK_TESTED=yes
35058        READLINK=
35059      fi
35060    fi
35061
35062    if test "x$READLINK" != x; then
35063      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35064    else
35065      # Save the current directory for restoring afterwards
35066      STARTDIR=$PWD
35067      COUNTER=0
35068      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35069      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35070      cd $sym_link_dir
35071      # Use -P flag to resolve symlinks in directories.
35072      cd `$THEPWDCMD -P`
35073      sym_link_dir=`$THEPWDCMD -P`
35074      # Resolve file symlinks
35075      while test $COUNTER -lt 20; do
35076        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35077        if test "x$ISLINK" == x; then
35078          # This is not a symbolic link! We are done!
35079          break
35080        fi
35081        # Again resolve directory symlinks since the target of the just found
35082        # link could be in a different directory
35083        cd `$DIRNAME $ISLINK`
35084        sym_link_dir=`$THEPWDCMD -P`
35085        sym_link_file=`$BASENAME $ISLINK`
35086        let COUNTER=COUNTER+1
35087      done
35088      cd $STARTDIR
35089      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35090    fi
35091  fi
35092
35093  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35095$as_echo "no symlink" >&6; }
35096  else
35097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35098$as_echo "$SYMLINK_ORIGINAL" >&6; }
35099
35100    # We can't handle ccache by gcc wrappers, since we need to know if we're
35101    # using ccache. Instead ccache usage must be controlled by a configure option.
35102    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35103    if test "x$COMPILER_BASENAME" = "xccache"; then
35104      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35105$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35106      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35107    fi
35108  fi
35109
35110
35111  COMPILER=$CXX
35112  COMPILER_NAME=$COMPILER_NAME
35113
35114  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35115    # cc -V output typically looks like
35116    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35117    # or
35118    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35119    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35120    # Check that this is likely to be the Solaris Studio cc.
35121    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35122    if test $? -ne 0; then
35123      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35124      { $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
35125$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35127$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35128      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35129$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35130      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35131    fi
35132    # Remove usage instructions (if present), and
35133    # collapse compiler output into a single line
35134    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35135        $SED -e 's/ *[Uu]sage:.*//'`
35136    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35137        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35138  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35139    # xlc -qversion output typically looks like
35140    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35141    #     Version: 11.01.0000.0015
35142    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35143    # Check that this is likely to be the IBM XL C compiler.
35144    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35145    if test $? -ne 0; then
35146      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35147      { $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
35148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35150$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35152$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35153      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35154    fi
35155    # Collapse compiler output into a single line
35156    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35158        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35159  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35160    # There is no specific version flag, but all output starts with a version string.
35161    # First line typically looks something like:
35162    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35163    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35164    # Check that this is likely to be Microsoft CL.EXE.
35165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35166    if test $? -ne 0; then
35167      { $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
35168$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35169      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35170$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35171      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35172    fi
35173    # Collapse compiler output into a single line
35174    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35175    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35176        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35177  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35178    # gcc --version output typically looks like
35179    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35180    #     Copyright (C) 2013 Free Software Foundation, Inc.
35181    #     This is free software; see the source for copying conditions.  There is NO
35182    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35183    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35184    # Check that this is likely to be GCC.
35185    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35186    if test $? -ne 0; then
35187      { $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
35188$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35189      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35190$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35191      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35192    fi
35193    # Remove Copyright and legalese from version string, and
35194    # collapse into a single line
35195    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35196        $SED -e 's/ *Copyright .*//'`
35197    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35198        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35199  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35200    # clang --version output typically looks like
35201    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35202    #    clang version 3.3 (tags/RELEASE_33/final)
35203    # or
35204    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35205    #    Target: x86_64-pc-linux-gnu
35206    #    Thread model: posix
35207    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35208    # Check that this is likely to be clang
35209    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35210    if test $? -ne 0; then
35211      { $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
35212$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35213      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35214$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35215      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35216    fi
35217    # Collapse compiler output into a single line
35218    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35219    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35220        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35221  else
35222      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35223  fi
35224  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35225  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35226  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35227  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35228
35229  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35230$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35231
35232
35233  # Now that we have resolved CXX ourself, let autoconf have its go at it
35234  ac_ext=cpp
35235ac_cpp='$CXXCPP $CPPFLAGS'
35236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35239if test -z "$CXX"; then
35240  if test -n "$CCC"; then
35241    CXX=$CCC
35242  else
35243    if test -n "$ac_tool_prefix"; then
35244  for ac_prog in $CXX
35245  do
35246    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35247set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35249$as_echo_n "checking for $ac_word... " >&6; }
35250if ${ac_cv_prog_CXX+:} false; then :
35251  $as_echo_n "(cached) " >&6
35252else
35253  if test -n "$CXX"; then
35254  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35255else
35256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35257for as_dir in $PATH
35258do
35259  IFS=$as_save_IFS
35260  test -z "$as_dir" && as_dir=.
35261    for ac_exec_ext in '' $ac_executable_extensions; do
35262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35263    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35265    break 2
35266  fi
35267done
35268  done
35269IFS=$as_save_IFS
35270
35271fi
35272fi
35273CXX=$ac_cv_prog_CXX
35274if test -n "$CXX"; then
35275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35276$as_echo "$CXX" >&6; }
35277else
35278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35279$as_echo "no" >&6; }
35280fi
35281
35282
35283    test -n "$CXX" && break
35284  done
35285fi
35286if test -z "$CXX"; then
35287  ac_ct_CXX=$CXX
35288  for ac_prog in $CXX
35289do
35290  # Extract the first word of "$ac_prog", so it can be a program name with args.
35291set dummy $ac_prog; ac_word=$2
35292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35293$as_echo_n "checking for $ac_word... " >&6; }
35294if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35295  $as_echo_n "(cached) " >&6
35296else
35297  if test -n "$ac_ct_CXX"; then
35298  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35299else
35300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35301for as_dir in $PATH
35302do
35303  IFS=$as_save_IFS
35304  test -z "$as_dir" && as_dir=.
35305    for ac_exec_ext in '' $ac_executable_extensions; do
35306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35307    ac_cv_prog_ac_ct_CXX="$ac_prog"
35308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35309    break 2
35310  fi
35311done
35312  done
35313IFS=$as_save_IFS
35314
35315fi
35316fi
35317ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35318if test -n "$ac_ct_CXX"; then
35319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35320$as_echo "$ac_ct_CXX" >&6; }
35321else
35322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35323$as_echo "no" >&6; }
35324fi
35325
35326
35327  test -n "$ac_ct_CXX" && break
35328done
35329
35330  if test "x$ac_ct_CXX" = x; then
35331    CXX="g++"
35332  else
35333    case $cross_compiling:$ac_tool_warned in
35334yes:)
35335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35337ac_tool_warned=yes ;;
35338esac
35339    CXX=$ac_ct_CXX
35340  fi
35341fi
35342
35343  fi
35344fi
35345# Provide some information about the compiler.
35346$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35347set X $ac_compile
35348ac_compiler=$2
35349for ac_option in --version -v -V -qversion; do
35350  { { ac_try="$ac_compiler $ac_option >&5"
35351case "(($ac_try" in
35352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35353  *) ac_try_echo=$ac_try;;
35354esac
35355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35356$as_echo "$ac_try_echo"; } >&5
35357  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35358  ac_status=$?
35359  if test -s conftest.err; then
35360    sed '10a\
35361... rest of stderr output deleted ...
35362         10q' conftest.err >conftest.er1
35363    cat conftest.er1 >&5
35364  fi
35365  rm -f conftest.er1 conftest.err
35366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35367  test $ac_status = 0; }
35368done
35369
35370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35371$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35372if ${ac_cv_cxx_compiler_gnu+:} false; then :
35373  $as_echo_n "(cached) " >&6
35374else
35375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35376/* end confdefs.h.  */
35377
35378int
35379main ()
35380{
35381#ifndef __GNUC__
35382       choke me
35383#endif
35384
35385  ;
35386  return 0;
35387}
35388_ACEOF
35389if ac_fn_cxx_try_compile "$LINENO"; then :
35390  ac_compiler_gnu=yes
35391else
35392  ac_compiler_gnu=no
35393fi
35394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35395ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35396
35397fi
35398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35399$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35400if test $ac_compiler_gnu = yes; then
35401  GXX=yes
35402else
35403  GXX=
35404fi
35405ac_test_CXXFLAGS=${CXXFLAGS+set}
35406ac_save_CXXFLAGS=$CXXFLAGS
35407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35408$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35409if ${ac_cv_prog_cxx_g+:} false; then :
35410  $as_echo_n "(cached) " >&6
35411else
35412  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35413   ac_cxx_werror_flag=yes
35414   ac_cv_prog_cxx_g=no
35415   CXXFLAGS="-g"
35416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35417/* end confdefs.h.  */
35418
35419int
35420main ()
35421{
35422
35423  ;
35424  return 0;
35425}
35426_ACEOF
35427if ac_fn_cxx_try_compile "$LINENO"; then :
35428  ac_cv_prog_cxx_g=yes
35429else
35430  CXXFLAGS=""
35431      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35432/* end confdefs.h.  */
35433
35434int
35435main ()
35436{
35437
35438  ;
35439  return 0;
35440}
35441_ACEOF
35442if ac_fn_cxx_try_compile "$LINENO"; then :
35443
35444else
35445  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35446	 CXXFLAGS="-g"
35447	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35448/* end confdefs.h.  */
35449
35450int
35451main ()
35452{
35453
35454  ;
35455  return 0;
35456}
35457_ACEOF
35458if ac_fn_cxx_try_compile "$LINENO"; then :
35459  ac_cv_prog_cxx_g=yes
35460fi
35461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35462fi
35463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35464fi
35465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35466   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35467fi
35468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35469$as_echo "$ac_cv_prog_cxx_g" >&6; }
35470if test "$ac_test_CXXFLAGS" = set; then
35471  CXXFLAGS=$ac_save_CXXFLAGS
35472elif test $ac_cv_prog_cxx_g = yes; then
35473  if test "$GXX" = yes; then
35474    CXXFLAGS="-g -O2"
35475  else
35476    CXXFLAGS="-g"
35477  fi
35478else
35479  if test "$GXX" = yes; then
35480    CXXFLAGS="-O2"
35481  else
35482    CXXFLAGS=
35483  fi
35484fi
35485ac_ext=cpp
35486ac_cpp='$CXXCPP $CPPFLAGS'
35487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35490
35491
35492  # This is the compiler version number on the form X.Y[.Z]
35493
35494
35495
35496
35497  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35499$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35500    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35501$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35502  fi
35503
35504  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35505  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35506    { $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
35507$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;}
35508  fi
35509
35510  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35511    { $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
35512$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35513  fi
35514
35515  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35516
35517
35518  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568    # Execute function body
35569
35570  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35571  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35572
35573  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35574    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35575  fi
35576
35577  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35578    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35579  fi
35580
35581  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35582  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35583
35584  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35585    :
35586
35587  else
35588    :
35589
35590          { $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
35591$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35592
35593
35594  fi
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609  fi
35610
35611  #
35612  # Setup the preprocessor (CPP and CXXCPP)
35613  #
35614  ac_ext=c
35615ac_cpp='$CPP $CPPFLAGS'
35616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35618ac_compiler_gnu=$ac_cv_c_compiler_gnu
35619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35620$as_echo_n "checking how to run the C preprocessor... " >&6; }
35621# On Suns, sometimes $CPP names a directory.
35622if test -n "$CPP" && test -d "$CPP"; then
35623  CPP=
35624fi
35625if test -z "$CPP"; then
35626  if ${ac_cv_prog_CPP+:} false; then :
35627  $as_echo_n "(cached) " >&6
35628else
35629      # Double quotes because CPP needs to be expanded
35630    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35631    do
35632      ac_preproc_ok=false
35633for ac_c_preproc_warn_flag in '' yes
35634do
35635  # Use a header file that comes with gcc, so configuring glibc
35636  # with a fresh cross-compiler works.
35637  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35638  # <limits.h> exists even on freestanding compilers.
35639  # On the NeXT, cc -E runs the code through the compiler's parser,
35640  # not just through cpp. "Syntax error" is here to catch this case.
35641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35642/* end confdefs.h.  */
35643#ifdef __STDC__
35644# include <limits.h>
35645#else
35646# include <assert.h>
35647#endif
35648		     Syntax error
35649_ACEOF
35650if ac_fn_c_try_cpp "$LINENO"; then :
35651
35652else
35653  # Broken: fails on valid input.
35654continue
35655fi
35656rm -f conftest.err conftest.i conftest.$ac_ext
35657
35658  # OK, works on sane cases.  Now check whether nonexistent headers
35659  # can be detected and how.
35660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35661/* end confdefs.h.  */
35662#include <ac_nonexistent.h>
35663_ACEOF
35664if ac_fn_c_try_cpp "$LINENO"; then :
35665  # Broken: success on invalid input.
35666continue
35667else
35668  # Passes both tests.
35669ac_preproc_ok=:
35670break
35671fi
35672rm -f conftest.err conftest.i conftest.$ac_ext
35673
35674done
35675# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35676rm -f conftest.i conftest.err conftest.$ac_ext
35677if $ac_preproc_ok; then :
35678  break
35679fi
35680
35681    done
35682    ac_cv_prog_CPP=$CPP
35683
35684fi
35685  CPP=$ac_cv_prog_CPP
35686else
35687  ac_cv_prog_CPP=$CPP
35688fi
35689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35690$as_echo "$CPP" >&6; }
35691ac_preproc_ok=false
35692for ac_c_preproc_warn_flag in '' yes
35693do
35694  # Use a header file that comes with gcc, so configuring glibc
35695  # with a fresh cross-compiler works.
35696  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35697  # <limits.h> exists even on freestanding compilers.
35698  # On the NeXT, cc -E runs the code through the compiler's parser,
35699  # not just through cpp. "Syntax error" is here to catch this case.
35700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35701/* end confdefs.h.  */
35702#ifdef __STDC__
35703# include <limits.h>
35704#else
35705# include <assert.h>
35706#endif
35707		     Syntax error
35708_ACEOF
35709if ac_fn_c_try_cpp "$LINENO"; then :
35710
35711else
35712  # Broken: fails on valid input.
35713continue
35714fi
35715rm -f conftest.err conftest.i conftest.$ac_ext
35716
35717  # OK, works on sane cases.  Now check whether nonexistent headers
35718  # can be detected and how.
35719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35720/* end confdefs.h.  */
35721#include <ac_nonexistent.h>
35722_ACEOF
35723if ac_fn_c_try_cpp "$LINENO"; then :
35724  # Broken: success on invalid input.
35725continue
35726else
35727  # Passes both tests.
35728ac_preproc_ok=:
35729break
35730fi
35731rm -f conftest.err conftest.i conftest.$ac_ext
35732
35733done
35734# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35735rm -f conftest.i conftest.err conftest.$ac_ext
35736if $ac_preproc_ok; then :
35737
35738else
35739  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35741as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35742See \`config.log' for more details" "$LINENO" 5; }
35743fi
35744
35745ac_ext=cpp
35746ac_cpp='$CXXCPP $CPPFLAGS'
35747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35750
35751
35752  # Only process if variable expands to non-empty
35753
35754  if test "x$CPP" != x; then
35755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35756
35757  # First separate the path from the arguments. This will split at the first
35758  # space.
35759  complete="$CPP"
35760  path="${complete%% *}"
35761  tmp="$complete EOL"
35762  arguments="${tmp#* }"
35763
35764  # Input might be given as Windows format, start by converting to
35765  # unix format.
35766  new_path=`$CYGPATH -u "$path"`
35767
35768  # Now try to locate executable using which
35769  new_path=`$WHICH "$new_path" 2> /dev/null`
35770  # bat and cmd files are not always considered executable in cygwin causing which
35771  # to not find them
35772  if test "x$new_path" = x \
35773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35775    new_path=`$CYGPATH -u "$path"`
35776  fi
35777  if test "x$new_path" = x; then
35778    # Oops. Which didn't find the executable.
35779    # The splitting of arguments from the executable at a space might have been incorrect,
35780    # since paths with space are more likely in Windows. Give it another try with the whole
35781    # argument.
35782    path="$complete"
35783    arguments="EOL"
35784    new_path=`$CYGPATH -u "$path"`
35785    new_path=`$WHICH "$new_path" 2> /dev/null`
35786    # bat and cmd files are not always considered executable in cygwin causing which
35787    # to not find them
35788    if test "x$new_path" = x \
35789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35791      new_path=`$CYGPATH -u "$path"`
35792    fi
35793    if test "x$new_path" = x; then
35794      # It's still not found. Now this is an unrecoverable error.
35795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35796$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35797      has_space=`$ECHO "$complete" | $GREP " "`
35798      if test "x$has_space" != x; then
35799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35801      fi
35802      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35803    fi
35804  fi
35805
35806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35809  # "foo.exe" is OK but "foo" is an error.
35810  #
35811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35812  # It is also a way to make sure we got the proper file name for the real test later on.
35813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35814  if test "x$test_shortpath" = x; then
35815    # Short path failed, file does not exist as specified.
35816    # Try adding .exe or .cmd
35817    if test -f "${new_path}.exe"; then
35818      input_to_shortpath="${new_path}.exe"
35819    elif test -f "${new_path}.cmd"; then
35820      input_to_shortpath="${new_path}.cmd"
35821    else
35822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35823$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35826      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35827    fi
35828  else
35829    input_to_shortpath="$new_path"
35830  fi
35831
35832  # Call helper function which possibly converts this using DOS-style short mode.
35833  # If so, the updated path is stored in $new_path.
35834  new_path="$input_to_shortpath"
35835
35836  input_path="$input_to_shortpath"
35837  # Check if we need to convert this using DOS-style short mode. If the path
35838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35839  # take no chances and rewrite it.
35840  # Note: m4 eats our [], so we need to use [ and ] instead.
35841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35842  if test "x$has_forbidden_chars" != x; then
35843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35847      # Going to short mode and back again did indeed matter. Since short mode is
35848      # case insensitive, let's make it lowercase to improve readability.
35849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35850      # Now convert it back to Unix-style (cygpath)
35851      input_path=`$CYGPATH -u "$shortmode_path"`
35852      new_path="$input_path"
35853    fi
35854  fi
35855
35856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35857  if test "x$test_cygdrive_prefix" = x; then
35858    # As a simple fix, exclude /usr/bin since it's not a real path.
35859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35861      # a path prefixed by /cygdrive for fixpath to work.
35862      new_path="$CYGWIN_ROOT_PATH$input_path"
35863    fi
35864  fi
35865
35866  # remove trailing .exe if any
35867  new_path="${new_path/%.exe/}"
35868
35869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35870
35871  # First separate the path from the arguments. This will split at the first
35872  # space.
35873  complete="$CPP"
35874  path="${complete%% *}"
35875  tmp="$complete EOL"
35876  arguments="${tmp#* }"
35877
35878  # Input might be given as Windows format, start by converting to
35879  # unix format.
35880  new_path="$path"
35881
35882  windows_path="$new_path"
35883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35884    unix_path=`$CYGPATH -u "$windows_path"`
35885    new_path="$unix_path"
35886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35888    new_path="$unix_path"
35889  fi
35890
35891
35892  # Now try to locate executable using which
35893  new_path=`$WHICH "$new_path" 2> /dev/null`
35894
35895  if test "x$new_path" = x; then
35896    # Oops. Which didn't find the executable.
35897    # The splitting of arguments from the executable at a space might have been incorrect,
35898    # since paths with space are more likely in Windows. Give it another try with the whole
35899    # argument.
35900    path="$complete"
35901    arguments="EOL"
35902    new_path="$path"
35903
35904  windows_path="$new_path"
35905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35906    unix_path=`$CYGPATH -u "$windows_path"`
35907    new_path="$unix_path"
35908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35910    new_path="$unix_path"
35911  fi
35912
35913
35914    new_path=`$WHICH "$new_path" 2> /dev/null`
35915    # bat and cmd files are not always considered executable in MSYS causing which
35916    # to not find them
35917    if test "x$new_path" = x \
35918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35920      new_path="$path"
35921
35922  windows_path="$new_path"
35923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35924    unix_path=`$CYGPATH -u "$windows_path"`
35925    new_path="$unix_path"
35926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35928    new_path="$unix_path"
35929  fi
35930
35931    fi
35932
35933    if test "x$new_path" = x; then
35934      # It's still not found. Now this is an unrecoverable error.
35935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35936$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35937      has_space=`$ECHO "$complete" | $GREP " "`
35938      if test "x$has_space" != x; then
35939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35941      fi
35942      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35943    fi
35944  fi
35945
35946  # Now new_path has a complete unix path to the binary
35947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35948    # Keep paths in /bin as-is, but remove trailing .exe if any
35949    new_path="${new_path/%.exe/}"
35950    # Do not save /bin paths to all_fixpath_prefixes!
35951  else
35952    # Not in mixed or Windows style, start by that.
35953    new_path=`cmd //c echo $new_path`
35954
35955  input_path="$new_path"
35956  # Check if we need to convert this using DOS-style short mode. If the path
35957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35958  # take no chances and rewrite it.
35959  # Note: m4 eats our [], so we need to use [ and ] instead.
35960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35961  if test "x$has_forbidden_chars" != x; then
35962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35964  fi
35965
35966    # Output is in $new_path
35967
35968  windows_path="$new_path"
35969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35970    unix_path=`$CYGPATH -u "$windows_path"`
35971    new_path="$unix_path"
35972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35974    new_path="$unix_path"
35975  fi
35976
35977    # remove trailing .exe if any
35978    new_path="${new_path/%.exe/}"
35979
35980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35982  fi
35983
35984    else
35985      # We're on a unix platform. Hooray! :)
35986      # First separate the path from the arguments. This will split at the first
35987      # space.
35988      complete="$CPP"
35989      path="${complete%% *}"
35990      tmp="$complete EOL"
35991      arguments="${tmp#* }"
35992
35993      # Cannot rely on the command "which" here since it doesn't always work.
35994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35995      if test -z "$is_absolute_path"; then
35996        # Path to executable is not absolute. Find it.
35997        IFS_save="$IFS"
35998        IFS=:
35999        for p in $PATH; do
36000          if test -f "$p/$path" && test -x "$p/$path"; then
36001            new_path="$p/$path"
36002            break
36003          fi
36004        done
36005        IFS="$IFS_save"
36006      else
36007        # This is an absolute path, we can use it without further modifications.
36008        new_path="$path"
36009      fi
36010
36011      if test "x$new_path" = x; then
36012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36013$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36014        has_space=`$ECHO "$complete" | $GREP " "`
36015        if test "x$has_space" != x; then
36016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36018        fi
36019        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36020      fi
36021    fi
36022
36023    # Now join together the path and the arguments once again
36024    if test "x$arguments" != xEOL; then
36025      new_complete="$new_path ${arguments% *}"
36026    else
36027      new_complete="$new_path"
36028    fi
36029
36030    if test "x$complete" != "x$new_complete"; then
36031      CPP="$new_complete"
36032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36033$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36034    fi
36035  fi
36036
36037  ac_ext=cpp
36038ac_cpp='$CXXCPP $CPPFLAGS'
36039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36043$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36044if test -z "$CXXCPP"; then
36045  if ${ac_cv_prog_CXXCPP+:} false; then :
36046  $as_echo_n "(cached) " >&6
36047else
36048      # Double quotes because CXXCPP needs to be expanded
36049    for CXXCPP in "$CXX -E" "/lib/cpp"
36050    do
36051      ac_preproc_ok=false
36052for ac_cxx_preproc_warn_flag in '' yes
36053do
36054  # Use a header file that comes with gcc, so configuring glibc
36055  # with a fresh cross-compiler works.
36056  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36057  # <limits.h> exists even on freestanding compilers.
36058  # On the NeXT, cc -E runs the code through the compiler's parser,
36059  # not just through cpp. "Syntax error" is here to catch this case.
36060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36061/* end confdefs.h.  */
36062#ifdef __STDC__
36063# include <limits.h>
36064#else
36065# include <assert.h>
36066#endif
36067		     Syntax error
36068_ACEOF
36069if ac_fn_cxx_try_cpp "$LINENO"; then :
36070
36071else
36072  # Broken: fails on valid input.
36073continue
36074fi
36075rm -f conftest.err conftest.i conftest.$ac_ext
36076
36077  # OK, works on sane cases.  Now check whether nonexistent headers
36078  # can be detected and how.
36079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36080/* end confdefs.h.  */
36081#include <ac_nonexistent.h>
36082_ACEOF
36083if ac_fn_cxx_try_cpp "$LINENO"; then :
36084  # Broken: success on invalid input.
36085continue
36086else
36087  # Passes both tests.
36088ac_preproc_ok=:
36089break
36090fi
36091rm -f conftest.err conftest.i conftest.$ac_ext
36092
36093done
36094# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36095rm -f conftest.i conftest.err conftest.$ac_ext
36096if $ac_preproc_ok; then :
36097  break
36098fi
36099
36100    done
36101    ac_cv_prog_CXXCPP=$CXXCPP
36102
36103fi
36104  CXXCPP=$ac_cv_prog_CXXCPP
36105else
36106  ac_cv_prog_CXXCPP=$CXXCPP
36107fi
36108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36109$as_echo "$CXXCPP" >&6; }
36110ac_preproc_ok=false
36111for ac_cxx_preproc_warn_flag in '' yes
36112do
36113  # Use a header file that comes with gcc, so configuring glibc
36114  # with a fresh cross-compiler works.
36115  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36116  # <limits.h> exists even on freestanding compilers.
36117  # On the NeXT, cc -E runs the code through the compiler's parser,
36118  # not just through cpp. "Syntax error" is here to catch this case.
36119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36120/* end confdefs.h.  */
36121#ifdef __STDC__
36122# include <limits.h>
36123#else
36124# include <assert.h>
36125#endif
36126		     Syntax error
36127_ACEOF
36128if ac_fn_cxx_try_cpp "$LINENO"; then :
36129
36130else
36131  # Broken: fails on valid input.
36132continue
36133fi
36134rm -f conftest.err conftest.i conftest.$ac_ext
36135
36136  # OK, works on sane cases.  Now check whether nonexistent headers
36137  # can be detected and how.
36138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36139/* end confdefs.h.  */
36140#include <ac_nonexistent.h>
36141_ACEOF
36142if ac_fn_cxx_try_cpp "$LINENO"; then :
36143  # Broken: success on invalid input.
36144continue
36145else
36146  # Passes both tests.
36147ac_preproc_ok=:
36148break
36149fi
36150rm -f conftest.err conftest.i conftest.$ac_ext
36151
36152done
36153# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36154rm -f conftest.i conftest.err conftest.$ac_ext
36155if $ac_preproc_ok; then :
36156
36157else
36158  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36160as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36161See \`config.log' for more details" "$LINENO" 5; }
36162fi
36163
36164ac_ext=cpp
36165ac_cpp='$CXXCPP $CPPFLAGS'
36166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36169
36170
36171  # Only process if variable expands to non-empty
36172
36173  if test "x$CXXCPP" != x; then
36174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36175
36176  # First separate the path from the arguments. This will split at the first
36177  # space.
36178  complete="$CXXCPP"
36179  path="${complete%% *}"
36180  tmp="$complete EOL"
36181  arguments="${tmp#* }"
36182
36183  # Input might be given as Windows format, start by converting to
36184  # unix format.
36185  new_path=`$CYGPATH -u "$path"`
36186
36187  # Now try to locate executable using which
36188  new_path=`$WHICH "$new_path" 2> /dev/null`
36189  # bat and cmd files are not always considered executable in cygwin causing which
36190  # to not find them
36191  if test "x$new_path" = x \
36192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36194    new_path=`$CYGPATH -u "$path"`
36195  fi
36196  if test "x$new_path" = x; then
36197    # Oops. Which didn't find the executable.
36198    # The splitting of arguments from the executable at a space might have been incorrect,
36199    # since paths with space are more likely in Windows. Give it another try with the whole
36200    # argument.
36201    path="$complete"
36202    arguments="EOL"
36203    new_path=`$CYGPATH -u "$path"`
36204    new_path=`$WHICH "$new_path" 2> /dev/null`
36205    # bat and cmd files are not always considered executable in cygwin causing which
36206    # to not find them
36207    if test "x$new_path" = x \
36208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36210      new_path=`$CYGPATH -u "$path"`
36211    fi
36212    if test "x$new_path" = x; then
36213      # It's still not found. Now this is an unrecoverable error.
36214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36215$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36216      has_space=`$ECHO "$complete" | $GREP " "`
36217      if test "x$has_space" != x; then
36218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36220      fi
36221      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36222    fi
36223  fi
36224
36225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36228  # "foo.exe" is OK but "foo" is an error.
36229  #
36230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36231  # It is also a way to make sure we got the proper file name for the real test later on.
36232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36233  if test "x$test_shortpath" = x; then
36234    # Short path failed, file does not exist as specified.
36235    # Try adding .exe or .cmd
36236    if test -f "${new_path}.exe"; then
36237      input_to_shortpath="${new_path}.exe"
36238    elif test -f "${new_path}.cmd"; then
36239      input_to_shortpath="${new_path}.cmd"
36240    else
36241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36242$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36245      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36246    fi
36247  else
36248    input_to_shortpath="$new_path"
36249  fi
36250
36251  # Call helper function which possibly converts this using DOS-style short mode.
36252  # If so, the updated path is stored in $new_path.
36253  new_path="$input_to_shortpath"
36254
36255  input_path="$input_to_shortpath"
36256  # Check if we need to convert this using DOS-style short mode. If the path
36257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36258  # take no chances and rewrite it.
36259  # Note: m4 eats our [], so we need to use [ and ] instead.
36260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36261  if test "x$has_forbidden_chars" != x; then
36262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36266      # Going to short mode and back again did indeed matter. Since short mode is
36267      # case insensitive, let's make it lowercase to improve readability.
36268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36269      # Now convert it back to Unix-style (cygpath)
36270      input_path=`$CYGPATH -u "$shortmode_path"`
36271      new_path="$input_path"
36272    fi
36273  fi
36274
36275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36276  if test "x$test_cygdrive_prefix" = x; then
36277    # As a simple fix, exclude /usr/bin since it's not a real path.
36278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36280      # a path prefixed by /cygdrive for fixpath to work.
36281      new_path="$CYGWIN_ROOT_PATH$input_path"
36282    fi
36283  fi
36284
36285  # remove trailing .exe if any
36286  new_path="${new_path/%.exe/}"
36287
36288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36289
36290  # First separate the path from the arguments. This will split at the first
36291  # space.
36292  complete="$CXXCPP"
36293  path="${complete%% *}"
36294  tmp="$complete EOL"
36295  arguments="${tmp#* }"
36296
36297  # Input might be given as Windows format, start by converting to
36298  # unix format.
36299  new_path="$path"
36300
36301  windows_path="$new_path"
36302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36303    unix_path=`$CYGPATH -u "$windows_path"`
36304    new_path="$unix_path"
36305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36307    new_path="$unix_path"
36308  fi
36309
36310
36311  # Now try to locate executable using which
36312  new_path=`$WHICH "$new_path" 2> /dev/null`
36313
36314  if test "x$new_path" = x; then
36315    # Oops. Which didn't find the executable.
36316    # The splitting of arguments from the executable at a space might have been incorrect,
36317    # since paths with space are more likely in Windows. Give it another try with the whole
36318    # argument.
36319    path="$complete"
36320    arguments="EOL"
36321    new_path="$path"
36322
36323  windows_path="$new_path"
36324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36325    unix_path=`$CYGPATH -u "$windows_path"`
36326    new_path="$unix_path"
36327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36329    new_path="$unix_path"
36330  fi
36331
36332
36333    new_path=`$WHICH "$new_path" 2> /dev/null`
36334    # bat and cmd files are not always considered executable in MSYS causing which
36335    # to not find them
36336    if test "x$new_path" = x \
36337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36339      new_path="$path"
36340
36341  windows_path="$new_path"
36342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36343    unix_path=`$CYGPATH -u "$windows_path"`
36344    new_path="$unix_path"
36345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36347    new_path="$unix_path"
36348  fi
36349
36350    fi
36351
36352    if test "x$new_path" = x; then
36353      # It's still not found. Now this is an unrecoverable error.
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36355$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36356      has_space=`$ECHO "$complete" | $GREP " "`
36357      if test "x$has_space" != x; then
36358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36360      fi
36361      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36362    fi
36363  fi
36364
36365  # Now new_path has a complete unix path to the binary
36366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36367    # Keep paths in /bin as-is, but remove trailing .exe if any
36368    new_path="${new_path/%.exe/}"
36369    # Do not save /bin paths to all_fixpath_prefixes!
36370  else
36371    # Not in mixed or Windows style, start by that.
36372    new_path=`cmd //c echo $new_path`
36373
36374  input_path="$new_path"
36375  # Check if we need to convert this using DOS-style short mode. If the path
36376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36377  # take no chances and rewrite it.
36378  # Note: m4 eats our [], so we need to use [ and ] instead.
36379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36380  if test "x$has_forbidden_chars" != x; then
36381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36383  fi
36384
36385    # Output is in $new_path
36386
36387  windows_path="$new_path"
36388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36389    unix_path=`$CYGPATH -u "$windows_path"`
36390    new_path="$unix_path"
36391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36393    new_path="$unix_path"
36394  fi
36395
36396    # remove trailing .exe if any
36397    new_path="${new_path/%.exe/}"
36398
36399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36401  fi
36402
36403    else
36404      # We're on a unix platform. Hooray! :)
36405      # First separate the path from the arguments. This will split at the first
36406      # space.
36407      complete="$CXXCPP"
36408      path="${complete%% *}"
36409      tmp="$complete EOL"
36410      arguments="${tmp#* }"
36411
36412      # Cannot rely on the command "which" here since it doesn't always work.
36413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36414      if test -z "$is_absolute_path"; then
36415        # Path to executable is not absolute. Find it.
36416        IFS_save="$IFS"
36417        IFS=:
36418        for p in $PATH; do
36419          if test -f "$p/$path" && test -x "$p/$path"; then
36420            new_path="$p/$path"
36421            break
36422          fi
36423        done
36424        IFS="$IFS_save"
36425      else
36426        # This is an absolute path, we can use it without further modifications.
36427        new_path="$path"
36428      fi
36429
36430      if test "x$new_path" = x; then
36431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36432$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36433        has_space=`$ECHO "$complete" | $GREP " "`
36434        if test "x$has_space" != x; then
36435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36437        fi
36438        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36439      fi
36440    fi
36441
36442    # Now join together the path and the arguments once again
36443    if test "x$arguments" != xEOL; then
36444      new_complete="$new_path ${arguments% *}"
36445    else
36446      new_complete="$new_path"
36447    fi
36448
36449    if test "x$complete" != "x$new_complete"; then
36450      CXXCPP="$new_complete"
36451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36452$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36453    fi
36454  fi
36455
36456
36457  #
36458  # Setup the linker (LD)
36459  #
36460  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36461    # In the Microsoft toolchain we have a separate LD command "link".
36462    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36463    # a cygwin program for something completely different.
36464    # Extract the first word of "link", so it can be a program name with args.
36465set dummy link; ac_word=$2
36466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36467$as_echo_n "checking for $ac_word... " >&6; }
36468if ${ac_cv_prog_LD+:} false; then :
36469  $as_echo_n "(cached) " >&6
36470else
36471  if test -n "$LD"; then
36472  ac_cv_prog_LD="$LD" # Let the user override the test.
36473else
36474  ac_prog_rejected=no
36475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36476for as_dir in $PATH
36477do
36478  IFS=$as_save_IFS
36479  test -z "$as_dir" && as_dir=.
36480    for ac_exec_ext in '' $ac_executable_extensions; do
36481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36482    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36483       ac_prog_rejected=yes
36484       continue
36485     fi
36486    ac_cv_prog_LD="link"
36487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36488    break 2
36489  fi
36490done
36491  done
36492IFS=$as_save_IFS
36493
36494if test $ac_prog_rejected = yes; then
36495  # We found a bogon in the path, so make sure we never use it.
36496  set dummy $ac_cv_prog_LD
36497  shift
36498  if test $# != 0; then
36499    # We chose a different compiler from the bogus one.
36500    # However, it has the same basename, so the bogon will be chosen
36501    # first if we set LD to just the basename; use the full file name.
36502    shift
36503    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36504  fi
36505fi
36506fi
36507fi
36508LD=$ac_cv_prog_LD
36509if test -n "$LD"; then
36510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36511$as_echo "$LD" >&6; }
36512else
36513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36514$as_echo "no" >&6; }
36515fi
36516
36517
36518
36519  # Only process if variable expands to non-empty
36520
36521  if test "x$LD" != x; then
36522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36523
36524  # First separate the path from the arguments. This will split at the first
36525  # space.
36526  complete="$LD"
36527  path="${complete%% *}"
36528  tmp="$complete EOL"
36529  arguments="${tmp#* }"
36530
36531  # Input might be given as Windows format, start by converting to
36532  # unix format.
36533  new_path=`$CYGPATH -u "$path"`
36534
36535  # Now try to locate executable using which
36536  new_path=`$WHICH "$new_path" 2> /dev/null`
36537  # bat and cmd files are not always considered executable in cygwin causing which
36538  # to not find them
36539  if test "x$new_path" = x \
36540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36542    new_path=`$CYGPATH -u "$path"`
36543  fi
36544  if test "x$new_path" = x; then
36545    # Oops. Which didn't find the executable.
36546    # The splitting of arguments from the executable at a space might have been incorrect,
36547    # since paths with space are more likely in Windows. Give it another try with the whole
36548    # argument.
36549    path="$complete"
36550    arguments="EOL"
36551    new_path=`$CYGPATH -u "$path"`
36552    new_path=`$WHICH "$new_path" 2> /dev/null`
36553    # bat and cmd files are not always considered executable in cygwin causing which
36554    # to not find them
36555    if test "x$new_path" = x \
36556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36558      new_path=`$CYGPATH -u "$path"`
36559    fi
36560    if test "x$new_path" = x; then
36561      # It's still not found. Now this is an unrecoverable error.
36562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36563$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36564      has_space=`$ECHO "$complete" | $GREP " "`
36565      if test "x$has_space" != x; then
36566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36568      fi
36569      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36570    fi
36571  fi
36572
36573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36576  # "foo.exe" is OK but "foo" is an error.
36577  #
36578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36579  # It is also a way to make sure we got the proper file name for the real test later on.
36580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36581  if test "x$test_shortpath" = x; then
36582    # Short path failed, file does not exist as specified.
36583    # Try adding .exe or .cmd
36584    if test -f "${new_path}.exe"; then
36585      input_to_shortpath="${new_path}.exe"
36586    elif test -f "${new_path}.cmd"; then
36587      input_to_shortpath="${new_path}.cmd"
36588    else
36589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36590$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36593      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36594    fi
36595  else
36596    input_to_shortpath="$new_path"
36597  fi
36598
36599  # Call helper function which possibly converts this using DOS-style short mode.
36600  # If so, the updated path is stored in $new_path.
36601  new_path="$input_to_shortpath"
36602
36603  input_path="$input_to_shortpath"
36604  # Check if we need to convert this using DOS-style short mode. If the path
36605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36606  # take no chances and rewrite it.
36607  # Note: m4 eats our [], so we need to use [ and ] instead.
36608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36609  if test "x$has_forbidden_chars" != x; then
36610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36614      # Going to short mode and back again did indeed matter. Since short mode is
36615      # case insensitive, let's make it lowercase to improve readability.
36616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36617      # Now convert it back to Unix-style (cygpath)
36618      input_path=`$CYGPATH -u "$shortmode_path"`
36619      new_path="$input_path"
36620    fi
36621  fi
36622
36623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36624  if test "x$test_cygdrive_prefix" = x; then
36625    # As a simple fix, exclude /usr/bin since it's not a real path.
36626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36628      # a path prefixed by /cygdrive for fixpath to work.
36629      new_path="$CYGWIN_ROOT_PATH$input_path"
36630    fi
36631  fi
36632
36633  # remove trailing .exe if any
36634  new_path="${new_path/%.exe/}"
36635
36636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36637
36638  # First separate the path from the arguments. This will split at the first
36639  # space.
36640  complete="$LD"
36641  path="${complete%% *}"
36642  tmp="$complete EOL"
36643  arguments="${tmp#* }"
36644
36645  # Input might be given as Windows format, start by converting to
36646  # unix format.
36647  new_path="$path"
36648
36649  windows_path="$new_path"
36650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36651    unix_path=`$CYGPATH -u "$windows_path"`
36652    new_path="$unix_path"
36653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36655    new_path="$unix_path"
36656  fi
36657
36658
36659  # Now try to locate executable using which
36660  new_path=`$WHICH "$new_path" 2> /dev/null`
36661
36662  if test "x$new_path" = x; then
36663    # Oops. Which didn't find the executable.
36664    # The splitting of arguments from the executable at a space might have been incorrect,
36665    # since paths with space are more likely in Windows. Give it another try with the whole
36666    # argument.
36667    path="$complete"
36668    arguments="EOL"
36669    new_path="$path"
36670
36671  windows_path="$new_path"
36672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36673    unix_path=`$CYGPATH -u "$windows_path"`
36674    new_path="$unix_path"
36675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36677    new_path="$unix_path"
36678  fi
36679
36680
36681    new_path=`$WHICH "$new_path" 2> /dev/null`
36682    # bat and cmd files are not always considered executable in MSYS causing which
36683    # to not find them
36684    if test "x$new_path" = x \
36685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36687      new_path="$path"
36688
36689  windows_path="$new_path"
36690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36691    unix_path=`$CYGPATH -u "$windows_path"`
36692    new_path="$unix_path"
36693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36695    new_path="$unix_path"
36696  fi
36697
36698    fi
36699
36700    if test "x$new_path" = x; then
36701      # It's still not found. Now this is an unrecoverable error.
36702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36703$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36704      has_space=`$ECHO "$complete" | $GREP " "`
36705      if test "x$has_space" != x; then
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36708      fi
36709      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36710    fi
36711  fi
36712
36713  # Now new_path has a complete unix path to the binary
36714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36715    # Keep paths in /bin as-is, but remove trailing .exe if any
36716    new_path="${new_path/%.exe/}"
36717    # Do not save /bin paths to all_fixpath_prefixes!
36718  else
36719    # Not in mixed or Windows style, start by that.
36720    new_path=`cmd //c echo $new_path`
36721
36722  input_path="$new_path"
36723  # Check if we need to convert this using DOS-style short mode. If the path
36724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36725  # take no chances and rewrite it.
36726  # Note: m4 eats our [], so we need to use [ and ] instead.
36727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36728  if test "x$has_forbidden_chars" != x; then
36729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36731  fi
36732
36733    # Output is in $new_path
36734
36735  windows_path="$new_path"
36736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36737    unix_path=`$CYGPATH -u "$windows_path"`
36738    new_path="$unix_path"
36739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36741    new_path="$unix_path"
36742  fi
36743
36744    # remove trailing .exe if any
36745    new_path="${new_path/%.exe/}"
36746
36747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36749  fi
36750
36751    else
36752      # We're on a unix platform. Hooray! :)
36753      # First separate the path from the arguments. This will split at the first
36754      # space.
36755      complete="$LD"
36756      path="${complete%% *}"
36757      tmp="$complete EOL"
36758      arguments="${tmp#* }"
36759
36760      # Cannot rely on the command "which" here since it doesn't always work.
36761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36762      if test -z "$is_absolute_path"; then
36763        # Path to executable is not absolute. Find it.
36764        IFS_save="$IFS"
36765        IFS=:
36766        for p in $PATH; do
36767          if test -f "$p/$path" && test -x "$p/$path"; then
36768            new_path="$p/$path"
36769            break
36770          fi
36771        done
36772        IFS="$IFS_save"
36773      else
36774        # This is an absolute path, we can use it without further modifications.
36775        new_path="$path"
36776      fi
36777
36778      if test "x$new_path" = x; then
36779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36780$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36781        has_space=`$ECHO "$complete" | $GREP " "`
36782        if test "x$has_space" != x; then
36783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36785        fi
36786        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36787      fi
36788    fi
36789
36790    # Now join together the path and the arguments once again
36791    if test "x$arguments" != xEOL; then
36792      new_complete="$new_path ${arguments% *}"
36793    else
36794      new_complete="$new_path"
36795    fi
36796
36797    if test "x$complete" != "x$new_complete"; then
36798      LD="$new_complete"
36799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36800$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36801    fi
36802  fi
36803
36804    # Verify that we indeed succeeded with this trick.
36805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36806$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36807    "$LD" --version > /dev/null
36808    if test $? -eq 0 ; then
36809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36810$as_echo "no" >&6; }
36811      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36812    else
36813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36814$as_echo "yes" >&6; }
36815    fi
36816    LDCXX="$LD"
36817  else
36818    # All other toolchains use the compiler to link.
36819    LD="$CC"
36820    LDCXX="$CXX"
36821  fi
36822
36823  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36824
36825
36826  #
36827  # Setup the assembler (AS)
36828  #
36829  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36830
36831
36832  # Publish this variable in the help.
36833
36834
36835  if [ -z "${AS+x}" ]; then
36836    # The variable is not set by user, try to locate tool using the code snippet
36837    for ac_prog in as
36838do
36839  # Extract the first word of "$ac_prog", so it can be a program name with args.
36840set dummy $ac_prog; ac_word=$2
36841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36842$as_echo_n "checking for $ac_word... " >&6; }
36843if ${ac_cv_path_AS+:} false; then :
36844  $as_echo_n "(cached) " >&6
36845else
36846  case $AS in
36847  [\\/]* | ?:[\\/]*)
36848  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36849  ;;
36850  *)
36851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36852for as_dir in $PATH
36853do
36854  IFS=$as_save_IFS
36855  test -z "$as_dir" && as_dir=.
36856    for ac_exec_ext in '' $ac_executable_extensions; do
36857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36858    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36860    break 2
36861  fi
36862done
36863  done
36864IFS=$as_save_IFS
36865
36866  ;;
36867esac
36868fi
36869AS=$ac_cv_path_AS
36870if test -n "$AS"; then
36871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36872$as_echo "$AS" >&6; }
36873else
36874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36875$as_echo "no" >&6; }
36876fi
36877
36878
36879  test -n "$AS" && break
36880done
36881
36882  else
36883    # The variable is set, but is it from the command line or the environment?
36884
36885    # Try to remove the string !AS! from our list.
36886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36888      # If it failed, the variable was not from the command line. Ignore it,
36889      # but warn the user (except for BASH, which is always set by the calling BASH).
36890      if test "xAS" != xBASH; then
36891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36892$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36893      fi
36894      # Try to locate tool using the code snippet
36895      for ac_prog in as
36896do
36897  # Extract the first word of "$ac_prog", so it can be a program name with args.
36898set dummy $ac_prog; ac_word=$2
36899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36900$as_echo_n "checking for $ac_word... " >&6; }
36901if ${ac_cv_path_AS+:} false; then :
36902  $as_echo_n "(cached) " >&6
36903else
36904  case $AS in
36905  [\\/]* | ?:[\\/]*)
36906  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36907  ;;
36908  *)
36909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36910for as_dir in $PATH
36911do
36912  IFS=$as_save_IFS
36913  test -z "$as_dir" && as_dir=.
36914    for ac_exec_ext in '' $ac_executable_extensions; do
36915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36916    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36918    break 2
36919  fi
36920done
36921  done
36922IFS=$as_save_IFS
36923
36924  ;;
36925esac
36926fi
36927AS=$ac_cv_path_AS
36928if test -n "$AS"; then
36929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36930$as_echo "$AS" >&6; }
36931else
36932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36933$as_echo "no" >&6; }
36934fi
36935
36936
36937  test -n "$AS" && break
36938done
36939
36940    else
36941      # If it succeeded, then it was overridden by the user. We will use it
36942      # for the tool.
36943
36944      # First remove it from the list of overridden variables, so we can test
36945      # for unknown variables in the end.
36946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36947
36948      # Check if we try to supply an empty value
36949      if test "x$AS" = x; then
36950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36951$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36953$as_echo_n "checking for AS... " >&6; }
36954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36955$as_echo "disabled" >&6; }
36956      else
36957        # Check if the provided tool contains a complete path.
36958        tool_specified="$AS"
36959        tool_basename="${tool_specified##*/}"
36960        if test "x$tool_basename" = "x$tool_specified"; then
36961          # A command without a complete path is provided, search $PATH.
36962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36963$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36964          # Extract the first word of "$tool_basename", so it can be a program name with args.
36965set dummy $tool_basename; ac_word=$2
36966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36967$as_echo_n "checking for $ac_word... " >&6; }
36968if ${ac_cv_path_AS+:} false; then :
36969  $as_echo_n "(cached) " >&6
36970else
36971  case $AS in
36972  [\\/]* | ?:[\\/]*)
36973  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36974  ;;
36975  *)
36976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36977for as_dir in $PATH
36978do
36979  IFS=$as_save_IFS
36980  test -z "$as_dir" && as_dir=.
36981    for ac_exec_ext in '' $ac_executable_extensions; do
36982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36983    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36985    break 2
36986  fi
36987done
36988  done
36989IFS=$as_save_IFS
36990
36991  ;;
36992esac
36993fi
36994AS=$ac_cv_path_AS
36995if test -n "$AS"; then
36996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36997$as_echo "$AS" >&6; }
36998else
36999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37000$as_echo "no" >&6; }
37001fi
37002
37003
37004          if test "x$AS" = x; then
37005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37006          fi
37007        else
37008          # Otherwise we believe it is a complete path. Use it as it is.
37009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37010$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37012$as_echo_n "checking for AS... " >&6; }
37013          if test ! -x "$tool_specified"; then
37014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37015$as_echo "not found" >&6; }
37016            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37017          fi
37018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37019$as_echo "$tool_specified" >&6; }
37020        fi
37021      fi
37022    fi
37023
37024  fi
37025
37026
37027
37028  # Only process if variable expands to non-empty
37029
37030  if test "x$AS" != x; then
37031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37032
37033  # First separate the path from the arguments. This will split at the first
37034  # space.
37035  complete="$AS"
37036  path="${complete%% *}"
37037  tmp="$complete EOL"
37038  arguments="${tmp#* }"
37039
37040  # Input might be given as Windows format, start by converting to
37041  # unix format.
37042  new_path=`$CYGPATH -u "$path"`
37043
37044  # Now try to locate executable using which
37045  new_path=`$WHICH "$new_path" 2> /dev/null`
37046  # bat and cmd files are not always considered executable in cygwin causing which
37047  # to not find them
37048  if test "x$new_path" = x \
37049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37051    new_path=`$CYGPATH -u "$path"`
37052  fi
37053  if test "x$new_path" = x; then
37054    # Oops. Which didn't find the executable.
37055    # The splitting of arguments from the executable at a space might have been incorrect,
37056    # since paths with space are more likely in Windows. Give it another try with the whole
37057    # argument.
37058    path="$complete"
37059    arguments="EOL"
37060    new_path=`$CYGPATH -u "$path"`
37061    new_path=`$WHICH "$new_path" 2> /dev/null`
37062    # bat and cmd files are not always considered executable in cygwin causing which
37063    # to not find them
37064    if test "x$new_path" = x \
37065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37067      new_path=`$CYGPATH -u "$path"`
37068    fi
37069    if test "x$new_path" = x; then
37070      # It's still not found. Now this is an unrecoverable error.
37071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37072$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37073      has_space=`$ECHO "$complete" | $GREP " "`
37074      if test "x$has_space" != x; then
37075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37077      fi
37078      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37079    fi
37080  fi
37081
37082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37085  # "foo.exe" is OK but "foo" is an error.
37086  #
37087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37088  # It is also a way to make sure we got the proper file name for the real test later on.
37089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37090  if test "x$test_shortpath" = x; then
37091    # Short path failed, file does not exist as specified.
37092    # Try adding .exe or .cmd
37093    if test -f "${new_path}.exe"; then
37094      input_to_shortpath="${new_path}.exe"
37095    elif test -f "${new_path}.cmd"; then
37096      input_to_shortpath="${new_path}.cmd"
37097    else
37098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37099$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37102      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37103    fi
37104  else
37105    input_to_shortpath="$new_path"
37106  fi
37107
37108  # Call helper function which possibly converts this using DOS-style short mode.
37109  # If so, the updated path is stored in $new_path.
37110  new_path="$input_to_shortpath"
37111
37112  input_path="$input_to_shortpath"
37113  # Check if we need to convert this using DOS-style short mode. If the path
37114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37115  # take no chances and rewrite it.
37116  # Note: m4 eats our [], so we need to use [ and ] instead.
37117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37118  if test "x$has_forbidden_chars" != x; then
37119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37123      # Going to short mode and back again did indeed matter. Since short mode is
37124      # case insensitive, let's make it lowercase to improve readability.
37125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37126      # Now convert it back to Unix-style (cygpath)
37127      input_path=`$CYGPATH -u "$shortmode_path"`
37128      new_path="$input_path"
37129    fi
37130  fi
37131
37132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37133  if test "x$test_cygdrive_prefix" = x; then
37134    # As a simple fix, exclude /usr/bin since it's not a real path.
37135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37137      # a path prefixed by /cygdrive for fixpath to work.
37138      new_path="$CYGWIN_ROOT_PATH$input_path"
37139    fi
37140  fi
37141
37142  # remove trailing .exe if any
37143  new_path="${new_path/%.exe/}"
37144
37145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37146
37147  # First separate the path from the arguments. This will split at the first
37148  # space.
37149  complete="$AS"
37150  path="${complete%% *}"
37151  tmp="$complete EOL"
37152  arguments="${tmp#* }"
37153
37154  # Input might be given as Windows format, start by converting to
37155  # unix format.
37156  new_path="$path"
37157
37158  windows_path="$new_path"
37159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37160    unix_path=`$CYGPATH -u "$windows_path"`
37161    new_path="$unix_path"
37162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37164    new_path="$unix_path"
37165  fi
37166
37167
37168  # Now try to locate executable using which
37169  new_path=`$WHICH "$new_path" 2> /dev/null`
37170
37171  if test "x$new_path" = x; then
37172    # Oops. Which didn't find the executable.
37173    # The splitting of arguments from the executable at a space might have been incorrect,
37174    # since paths with space are more likely in Windows. Give it another try with the whole
37175    # argument.
37176    path="$complete"
37177    arguments="EOL"
37178    new_path="$path"
37179
37180  windows_path="$new_path"
37181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37182    unix_path=`$CYGPATH -u "$windows_path"`
37183    new_path="$unix_path"
37184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37186    new_path="$unix_path"
37187  fi
37188
37189
37190    new_path=`$WHICH "$new_path" 2> /dev/null`
37191    # bat and cmd files are not always considered executable in MSYS causing which
37192    # to not find them
37193    if test "x$new_path" = x \
37194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37196      new_path="$path"
37197
37198  windows_path="$new_path"
37199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37200    unix_path=`$CYGPATH -u "$windows_path"`
37201    new_path="$unix_path"
37202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37204    new_path="$unix_path"
37205  fi
37206
37207    fi
37208
37209    if test "x$new_path" = x; then
37210      # It's still not found. Now this is an unrecoverable error.
37211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37212$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37213      has_space=`$ECHO "$complete" | $GREP " "`
37214      if test "x$has_space" != x; then
37215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37217      fi
37218      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37219    fi
37220  fi
37221
37222  # Now new_path has a complete unix path to the binary
37223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37224    # Keep paths in /bin as-is, but remove trailing .exe if any
37225    new_path="${new_path/%.exe/}"
37226    # Do not save /bin paths to all_fixpath_prefixes!
37227  else
37228    # Not in mixed or Windows style, start by that.
37229    new_path=`cmd //c echo $new_path`
37230
37231  input_path="$new_path"
37232  # Check if we need to convert this using DOS-style short mode. If the path
37233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37234  # take no chances and rewrite it.
37235  # Note: m4 eats our [], so we need to use [ and ] instead.
37236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37237  if test "x$has_forbidden_chars" != x; then
37238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37240  fi
37241
37242    # Output is in $new_path
37243
37244  windows_path="$new_path"
37245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37246    unix_path=`$CYGPATH -u "$windows_path"`
37247    new_path="$unix_path"
37248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37250    new_path="$unix_path"
37251  fi
37252
37253    # remove trailing .exe if any
37254    new_path="${new_path/%.exe/}"
37255
37256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37258  fi
37259
37260    else
37261      # We're on a unix platform. Hooray! :)
37262      # First separate the path from the arguments. This will split at the first
37263      # space.
37264      complete="$AS"
37265      path="${complete%% *}"
37266      tmp="$complete EOL"
37267      arguments="${tmp#* }"
37268
37269      # Cannot rely on the command "which" here since it doesn't always work.
37270      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37271      if test -z "$is_absolute_path"; then
37272        # Path to executable is not absolute. Find it.
37273        IFS_save="$IFS"
37274        IFS=:
37275        for p in $PATH; do
37276          if test -f "$p/$path" && test -x "$p/$path"; then
37277            new_path="$p/$path"
37278            break
37279          fi
37280        done
37281        IFS="$IFS_save"
37282      else
37283        # This is an absolute path, we can use it without further modifications.
37284        new_path="$path"
37285      fi
37286
37287      if test "x$new_path" = x; then
37288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37289$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37290        has_space=`$ECHO "$complete" | $GREP " "`
37291        if test "x$has_space" != x; then
37292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37294        fi
37295        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37296      fi
37297    fi
37298
37299    # Now join together the path and the arguments once again
37300    if test "x$arguments" != xEOL; then
37301      new_complete="$new_path ${arguments% *}"
37302    else
37303      new_complete="$new_path"
37304    fi
37305
37306    if test "x$complete" != "x$new_complete"; then
37307      AS="$new_complete"
37308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37309$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37310    fi
37311  fi
37312
37313    if test "x$AS" = x; then
37314      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37315    fi
37316  else
37317    # FIXME: is this correct for microsoft?
37318    AS="$CC -c"
37319  fi
37320
37321
37322  #
37323  # Setup the archiver (AR)
37324  #
37325  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37326    # The corresponding ar tool is lib.exe (used to create static libraries)
37327    # Extract the first word of "lib", so it can be a program name with args.
37328set dummy lib; ac_word=$2
37329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37330$as_echo_n "checking for $ac_word... " >&6; }
37331if ${ac_cv_prog_AR+:} false; then :
37332  $as_echo_n "(cached) " >&6
37333else
37334  if test -n "$AR"; then
37335  ac_cv_prog_AR="$AR" # Let the user override the test.
37336else
37337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37338for as_dir in $PATH
37339do
37340  IFS=$as_save_IFS
37341  test -z "$as_dir" && as_dir=.
37342    for ac_exec_ext in '' $ac_executable_extensions; do
37343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37344    ac_cv_prog_AR="lib"
37345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37346    break 2
37347  fi
37348done
37349  done
37350IFS=$as_save_IFS
37351
37352fi
37353fi
37354AR=$ac_cv_prog_AR
37355if test -n "$AR"; then
37356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37357$as_echo "$AR" >&6; }
37358else
37359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37360$as_echo "no" >&6; }
37361fi
37362
37363
37364  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37365
37366
37367  # Publish this variable in the help.
37368
37369
37370  if [ -z "${AR+x}" ]; then
37371    # The variable is not set by user, try to locate tool using the code snippet
37372    if test -n "$ac_tool_prefix"; then
37373  for ac_prog in ar gcc-ar
37374  do
37375    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37376set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37378$as_echo_n "checking for $ac_word... " >&6; }
37379if ${ac_cv_prog_AR+:} false; then :
37380  $as_echo_n "(cached) " >&6
37381else
37382  if test -n "$AR"; then
37383  ac_cv_prog_AR="$AR" # Let the user override the test.
37384else
37385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37386for as_dir in $PATH
37387do
37388  IFS=$as_save_IFS
37389  test -z "$as_dir" && as_dir=.
37390    for ac_exec_ext in '' $ac_executable_extensions; do
37391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37392    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37394    break 2
37395  fi
37396done
37397  done
37398IFS=$as_save_IFS
37399
37400fi
37401fi
37402AR=$ac_cv_prog_AR
37403if test -n "$AR"; then
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37405$as_echo "$AR" >&6; }
37406else
37407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37408$as_echo "no" >&6; }
37409fi
37410
37411
37412    test -n "$AR" && break
37413  done
37414fi
37415if test -z "$AR"; then
37416  ac_ct_AR=$AR
37417  for ac_prog in ar gcc-ar
37418do
37419  # Extract the first word of "$ac_prog", so it can be a program name with args.
37420set dummy $ac_prog; ac_word=$2
37421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37422$as_echo_n "checking for $ac_word... " >&6; }
37423if ${ac_cv_prog_ac_ct_AR+:} false; then :
37424  $as_echo_n "(cached) " >&6
37425else
37426  if test -n "$ac_ct_AR"; then
37427  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37428else
37429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37430for as_dir in $PATH
37431do
37432  IFS=$as_save_IFS
37433  test -z "$as_dir" && as_dir=.
37434    for ac_exec_ext in '' $ac_executable_extensions; do
37435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37436    ac_cv_prog_ac_ct_AR="$ac_prog"
37437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37438    break 2
37439  fi
37440done
37441  done
37442IFS=$as_save_IFS
37443
37444fi
37445fi
37446ac_ct_AR=$ac_cv_prog_ac_ct_AR
37447if test -n "$ac_ct_AR"; then
37448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37449$as_echo "$ac_ct_AR" >&6; }
37450else
37451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37452$as_echo "no" >&6; }
37453fi
37454
37455
37456  test -n "$ac_ct_AR" && break
37457done
37458
37459  if test "x$ac_ct_AR" = x; then
37460    AR=""
37461  else
37462    case $cross_compiling:$ac_tool_warned in
37463yes:)
37464{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37465$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37466ac_tool_warned=yes ;;
37467esac
37468    AR=$ac_ct_AR
37469  fi
37470fi
37471
37472  else
37473    # The variable is set, but is it from the command line or the environment?
37474
37475    # Try to remove the string !AR! from our list.
37476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37478      # If it failed, the variable was not from the command line. Ignore it,
37479      # but warn the user (except for BASH, which is always set by the calling BASH).
37480      if test "xAR" != xBASH; then
37481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37482$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37483      fi
37484      # Try to locate tool using the code snippet
37485      if test -n "$ac_tool_prefix"; then
37486  for ac_prog in ar gcc-ar
37487  do
37488    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37489set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37491$as_echo_n "checking for $ac_word... " >&6; }
37492if ${ac_cv_prog_AR+:} false; then :
37493  $as_echo_n "(cached) " >&6
37494else
37495  if test -n "$AR"; then
37496  ac_cv_prog_AR="$AR" # Let the user override the test.
37497else
37498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37499for as_dir in $PATH
37500do
37501  IFS=$as_save_IFS
37502  test -z "$as_dir" && as_dir=.
37503    for ac_exec_ext in '' $ac_executable_extensions; do
37504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37505    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37507    break 2
37508  fi
37509done
37510  done
37511IFS=$as_save_IFS
37512
37513fi
37514fi
37515AR=$ac_cv_prog_AR
37516if test -n "$AR"; then
37517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37518$as_echo "$AR" >&6; }
37519else
37520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37521$as_echo "no" >&6; }
37522fi
37523
37524
37525    test -n "$AR" && break
37526  done
37527fi
37528if test -z "$AR"; then
37529  ac_ct_AR=$AR
37530  for ac_prog in ar gcc-ar
37531do
37532  # Extract the first word of "$ac_prog", so it can be a program name with args.
37533set dummy $ac_prog; ac_word=$2
37534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37535$as_echo_n "checking for $ac_word... " >&6; }
37536if ${ac_cv_prog_ac_ct_AR+:} false; then :
37537  $as_echo_n "(cached) " >&6
37538else
37539  if test -n "$ac_ct_AR"; then
37540  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37541else
37542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37543for as_dir in $PATH
37544do
37545  IFS=$as_save_IFS
37546  test -z "$as_dir" && as_dir=.
37547    for ac_exec_ext in '' $ac_executable_extensions; do
37548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37549    ac_cv_prog_ac_ct_AR="$ac_prog"
37550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37551    break 2
37552  fi
37553done
37554  done
37555IFS=$as_save_IFS
37556
37557fi
37558fi
37559ac_ct_AR=$ac_cv_prog_ac_ct_AR
37560if test -n "$ac_ct_AR"; then
37561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37562$as_echo "$ac_ct_AR" >&6; }
37563else
37564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37565$as_echo "no" >&6; }
37566fi
37567
37568
37569  test -n "$ac_ct_AR" && break
37570done
37571
37572  if test "x$ac_ct_AR" = x; then
37573    AR=""
37574  else
37575    case $cross_compiling:$ac_tool_warned in
37576yes:)
37577{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37579ac_tool_warned=yes ;;
37580esac
37581    AR=$ac_ct_AR
37582  fi
37583fi
37584
37585    else
37586      # If it succeeded, then it was overridden by the user. We will use it
37587      # for the tool.
37588
37589      # First remove it from the list of overridden variables, so we can test
37590      # for unknown variables in the end.
37591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37592
37593      # Check if we try to supply an empty value
37594      if test "x$AR" = x; then
37595        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37596$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37598$as_echo_n "checking for AR... " >&6; }
37599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37600$as_echo "disabled" >&6; }
37601      else
37602        # Check if the provided tool contains a complete path.
37603        tool_specified="$AR"
37604        tool_basename="${tool_specified##*/}"
37605        if test "x$tool_basename" = "x$tool_specified"; then
37606          # A command without a complete path is provided, search $PATH.
37607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37608$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37609          # Extract the first word of "$tool_basename", so it can be a program name with args.
37610set dummy $tool_basename; ac_word=$2
37611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37612$as_echo_n "checking for $ac_word... " >&6; }
37613if ${ac_cv_path_AR+:} false; then :
37614  $as_echo_n "(cached) " >&6
37615else
37616  case $AR in
37617  [\\/]* | ?:[\\/]*)
37618  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37619  ;;
37620  *)
37621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37622for as_dir in $PATH
37623do
37624  IFS=$as_save_IFS
37625  test -z "$as_dir" && as_dir=.
37626    for ac_exec_ext in '' $ac_executable_extensions; do
37627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37628    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37630    break 2
37631  fi
37632done
37633  done
37634IFS=$as_save_IFS
37635
37636  ;;
37637esac
37638fi
37639AR=$ac_cv_path_AR
37640if test -n "$AR"; then
37641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37642$as_echo "$AR" >&6; }
37643else
37644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37645$as_echo "no" >&6; }
37646fi
37647
37648
37649          if test "x$AR" = x; then
37650            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37651          fi
37652        else
37653          # Otherwise we believe it is a complete path. Use it as it is.
37654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37655$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37656          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37657$as_echo_n "checking for AR... " >&6; }
37658          if test ! -x "$tool_specified"; then
37659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37660$as_echo "not found" >&6; }
37661            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37662          fi
37663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37664$as_echo "$tool_specified" >&6; }
37665        fi
37666      fi
37667    fi
37668
37669  fi
37670
37671
37672  else
37673
37674
37675  # Publish this variable in the help.
37676
37677
37678  if [ -z "${AR+x}" ]; then
37679    # The variable is not set by user, try to locate tool using the code snippet
37680    if test -n "$ac_tool_prefix"; then
37681  for ac_prog in ar
37682  do
37683    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37686$as_echo_n "checking for $ac_word... " >&6; }
37687if ${ac_cv_prog_AR+:} false; then :
37688  $as_echo_n "(cached) " >&6
37689else
37690  if test -n "$AR"; then
37691  ac_cv_prog_AR="$AR" # Let the user override the test.
37692else
37693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37694for as_dir in $PATH
37695do
37696  IFS=$as_save_IFS
37697  test -z "$as_dir" && as_dir=.
37698    for ac_exec_ext in '' $ac_executable_extensions; do
37699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37700    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37702    break 2
37703  fi
37704done
37705  done
37706IFS=$as_save_IFS
37707
37708fi
37709fi
37710AR=$ac_cv_prog_AR
37711if test -n "$AR"; then
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37713$as_echo "$AR" >&6; }
37714else
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37716$as_echo "no" >&6; }
37717fi
37718
37719
37720    test -n "$AR" && break
37721  done
37722fi
37723if test -z "$AR"; then
37724  ac_ct_AR=$AR
37725  for ac_prog in ar
37726do
37727  # Extract the first word of "$ac_prog", so it can be a program name with args.
37728set dummy $ac_prog; ac_word=$2
37729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37730$as_echo_n "checking for $ac_word... " >&6; }
37731if ${ac_cv_prog_ac_ct_AR+:} false; then :
37732  $as_echo_n "(cached) " >&6
37733else
37734  if test -n "$ac_ct_AR"; then
37735  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37736else
37737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37738for as_dir in $PATH
37739do
37740  IFS=$as_save_IFS
37741  test -z "$as_dir" && as_dir=.
37742    for ac_exec_ext in '' $ac_executable_extensions; do
37743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37744    ac_cv_prog_ac_ct_AR="$ac_prog"
37745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37746    break 2
37747  fi
37748done
37749  done
37750IFS=$as_save_IFS
37751
37752fi
37753fi
37754ac_ct_AR=$ac_cv_prog_ac_ct_AR
37755if test -n "$ac_ct_AR"; then
37756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37757$as_echo "$ac_ct_AR" >&6; }
37758else
37759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37760$as_echo "no" >&6; }
37761fi
37762
37763
37764  test -n "$ac_ct_AR" && break
37765done
37766
37767  if test "x$ac_ct_AR" = x; then
37768    AR=""
37769  else
37770    case $cross_compiling:$ac_tool_warned in
37771yes:)
37772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37774ac_tool_warned=yes ;;
37775esac
37776    AR=$ac_ct_AR
37777  fi
37778fi
37779
37780  else
37781    # The variable is set, but is it from the command line or the environment?
37782
37783    # Try to remove the string !AR! from our list.
37784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37786      # If it failed, the variable was not from the command line. Ignore it,
37787      # but warn the user (except for BASH, which is always set by the calling BASH).
37788      if test "xAR" != xBASH; then
37789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37790$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37791      fi
37792      # Try to locate tool using the code snippet
37793      if test -n "$ac_tool_prefix"; then
37794  for ac_prog in ar
37795  do
37796    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37797set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37799$as_echo_n "checking for $ac_word... " >&6; }
37800if ${ac_cv_prog_AR+:} false; then :
37801  $as_echo_n "(cached) " >&6
37802else
37803  if test -n "$AR"; then
37804  ac_cv_prog_AR="$AR" # Let the user override the test.
37805else
37806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37807for as_dir in $PATH
37808do
37809  IFS=$as_save_IFS
37810  test -z "$as_dir" && as_dir=.
37811    for ac_exec_ext in '' $ac_executable_extensions; do
37812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37813    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37815    break 2
37816  fi
37817done
37818  done
37819IFS=$as_save_IFS
37820
37821fi
37822fi
37823AR=$ac_cv_prog_AR
37824if test -n "$AR"; then
37825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37826$as_echo "$AR" >&6; }
37827else
37828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37829$as_echo "no" >&6; }
37830fi
37831
37832
37833    test -n "$AR" && break
37834  done
37835fi
37836if test -z "$AR"; then
37837  ac_ct_AR=$AR
37838  for ac_prog in ar
37839do
37840  # Extract the first word of "$ac_prog", so it can be a program name with args.
37841set dummy $ac_prog; ac_word=$2
37842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37843$as_echo_n "checking for $ac_word... " >&6; }
37844if ${ac_cv_prog_ac_ct_AR+:} false; then :
37845  $as_echo_n "(cached) " >&6
37846else
37847  if test -n "$ac_ct_AR"; then
37848  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37849else
37850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37851for as_dir in $PATH
37852do
37853  IFS=$as_save_IFS
37854  test -z "$as_dir" && as_dir=.
37855    for ac_exec_ext in '' $ac_executable_extensions; do
37856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37857    ac_cv_prog_ac_ct_AR="$ac_prog"
37858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37859    break 2
37860  fi
37861done
37862  done
37863IFS=$as_save_IFS
37864
37865fi
37866fi
37867ac_ct_AR=$ac_cv_prog_ac_ct_AR
37868if test -n "$ac_ct_AR"; then
37869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37870$as_echo "$ac_ct_AR" >&6; }
37871else
37872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37873$as_echo "no" >&6; }
37874fi
37875
37876
37877  test -n "$ac_ct_AR" && break
37878done
37879
37880  if test "x$ac_ct_AR" = x; then
37881    AR=""
37882  else
37883    case $cross_compiling:$ac_tool_warned in
37884yes:)
37885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37887ac_tool_warned=yes ;;
37888esac
37889    AR=$ac_ct_AR
37890  fi
37891fi
37892
37893    else
37894      # If it succeeded, then it was overridden by the user. We will use it
37895      # for the tool.
37896
37897      # First remove it from the list of overridden variables, so we can test
37898      # for unknown variables in the end.
37899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37900
37901      # Check if we try to supply an empty value
37902      if test "x$AR" = x; then
37903        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37904$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37906$as_echo_n "checking for AR... " >&6; }
37907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37908$as_echo "disabled" >&6; }
37909      else
37910        # Check if the provided tool contains a complete path.
37911        tool_specified="$AR"
37912        tool_basename="${tool_specified##*/}"
37913        if test "x$tool_basename" = "x$tool_specified"; then
37914          # A command without a complete path is provided, search $PATH.
37915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37916$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37917          # Extract the first word of "$tool_basename", so it can be a program name with args.
37918set dummy $tool_basename; ac_word=$2
37919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37920$as_echo_n "checking for $ac_word... " >&6; }
37921if ${ac_cv_path_AR+:} false; then :
37922  $as_echo_n "(cached) " >&6
37923else
37924  case $AR in
37925  [\\/]* | ?:[\\/]*)
37926  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37927  ;;
37928  *)
37929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37930for as_dir in $PATH
37931do
37932  IFS=$as_save_IFS
37933  test -z "$as_dir" && as_dir=.
37934    for ac_exec_ext in '' $ac_executable_extensions; do
37935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37936    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37938    break 2
37939  fi
37940done
37941  done
37942IFS=$as_save_IFS
37943
37944  ;;
37945esac
37946fi
37947AR=$ac_cv_path_AR
37948if test -n "$AR"; then
37949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37950$as_echo "$AR" >&6; }
37951else
37952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37953$as_echo "no" >&6; }
37954fi
37955
37956
37957          if test "x$AR" = x; then
37958            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37959          fi
37960        else
37961          # Otherwise we believe it is a complete path. Use it as it is.
37962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37963$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37964          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37965$as_echo_n "checking for AR... " >&6; }
37966          if test ! -x "$tool_specified"; then
37967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37968$as_echo "not found" >&6; }
37969            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37970          fi
37971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37972$as_echo "$tool_specified" >&6; }
37973        fi
37974      fi
37975    fi
37976
37977  fi
37978
37979
37980  fi
37981
37982  # Only process if variable expands to non-empty
37983
37984  if test "x$AR" != x; then
37985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37986
37987  # First separate the path from the arguments. This will split at the first
37988  # space.
37989  complete="$AR"
37990  path="${complete%% *}"
37991  tmp="$complete EOL"
37992  arguments="${tmp#* }"
37993
37994  # Input might be given as Windows format, start by converting to
37995  # unix format.
37996  new_path=`$CYGPATH -u "$path"`
37997
37998  # Now try to locate executable using which
37999  new_path=`$WHICH "$new_path" 2> /dev/null`
38000  # bat and cmd files are not always considered executable in cygwin causing which
38001  # to not find them
38002  if test "x$new_path" = x \
38003      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38004      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38005    new_path=`$CYGPATH -u "$path"`
38006  fi
38007  if test "x$new_path" = x; then
38008    # Oops. Which didn't find the executable.
38009    # The splitting of arguments from the executable at a space might have been incorrect,
38010    # since paths with space are more likely in Windows. Give it another try with the whole
38011    # argument.
38012    path="$complete"
38013    arguments="EOL"
38014    new_path=`$CYGPATH -u "$path"`
38015    new_path=`$WHICH "$new_path" 2> /dev/null`
38016    # bat and cmd files are not always considered executable in cygwin causing which
38017    # to not find them
38018    if test "x$new_path" = x \
38019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38021      new_path=`$CYGPATH -u "$path"`
38022    fi
38023    if test "x$new_path" = x; then
38024      # It's still not found. Now this is an unrecoverable error.
38025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38026$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38027      has_space=`$ECHO "$complete" | $GREP " "`
38028      if test "x$has_space" != x; then
38029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38031      fi
38032      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38033    fi
38034  fi
38035
38036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38039  # "foo.exe" is OK but "foo" is an error.
38040  #
38041  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38042  # It is also a way to make sure we got the proper file name for the real test later on.
38043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38044  if test "x$test_shortpath" = x; then
38045    # Short path failed, file does not exist as specified.
38046    # Try adding .exe or .cmd
38047    if test -f "${new_path}.exe"; then
38048      input_to_shortpath="${new_path}.exe"
38049    elif test -f "${new_path}.cmd"; then
38050      input_to_shortpath="${new_path}.cmd"
38051    else
38052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38053$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38054      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38055$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38056      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38057    fi
38058  else
38059    input_to_shortpath="$new_path"
38060  fi
38061
38062  # Call helper function which possibly converts this using DOS-style short mode.
38063  # If so, the updated path is stored in $new_path.
38064  new_path="$input_to_shortpath"
38065
38066  input_path="$input_to_shortpath"
38067  # Check if we need to convert this using DOS-style short mode. If the path
38068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38069  # take no chances and rewrite it.
38070  # Note: m4 eats our [], so we need to use [ and ] instead.
38071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38072  if test "x$has_forbidden_chars" != x; then
38073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38077      # Going to short mode and back again did indeed matter. Since short mode is
38078      # case insensitive, let's make it lowercase to improve readability.
38079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38080      # Now convert it back to Unix-style (cygpath)
38081      input_path=`$CYGPATH -u "$shortmode_path"`
38082      new_path="$input_path"
38083    fi
38084  fi
38085
38086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38087  if test "x$test_cygdrive_prefix" = x; then
38088    # As a simple fix, exclude /usr/bin since it's not a real path.
38089    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38091      # a path prefixed by /cygdrive for fixpath to work.
38092      new_path="$CYGWIN_ROOT_PATH$input_path"
38093    fi
38094  fi
38095
38096  # remove trailing .exe if any
38097  new_path="${new_path/%.exe/}"
38098
38099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38100
38101  # First separate the path from the arguments. This will split at the first
38102  # space.
38103  complete="$AR"
38104  path="${complete%% *}"
38105  tmp="$complete EOL"
38106  arguments="${tmp#* }"
38107
38108  # Input might be given as Windows format, start by converting to
38109  # unix format.
38110  new_path="$path"
38111
38112  windows_path="$new_path"
38113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38114    unix_path=`$CYGPATH -u "$windows_path"`
38115    new_path="$unix_path"
38116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38118    new_path="$unix_path"
38119  fi
38120
38121
38122  # Now try to locate executable using which
38123  new_path=`$WHICH "$new_path" 2> /dev/null`
38124
38125  if test "x$new_path" = x; then
38126    # Oops. Which didn't find the executable.
38127    # The splitting of arguments from the executable at a space might have been incorrect,
38128    # since paths with space are more likely in Windows. Give it another try with the whole
38129    # argument.
38130    path="$complete"
38131    arguments="EOL"
38132    new_path="$path"
38133
38134  windows_path="$new_path"
38135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38136    unix_path=`$CYGPATH -u "$windows_path"`
38137    new_path="$unix_path"
38138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38140    new_path="$unix_path"
38141  fi
38142
38143
38144    new_path=`$WHICH "$new_path" 2> /dev/null`
38145    # bat and cmd files are not always considered executable in MSYS causing which
38146    # to not find them
38147    if test "x$new_path" = x \
38148        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38149        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38150      new_path="$path"
38151
38152  windows_path="$new_path"
38153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38154    unix_path=`$CYGPATH -u "$windows_path"`
38155    new_path="$unix_path"
38156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38158    new_path="$unix_path"
38159  fi
38160
38161    fi
38162
38163    if test "x$new_path" = x; then
38164      # It's still not found. Now this is an unrecoverable error.
38165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38166$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38167      has_space=`$ECHO "$complete" | $GREP " "`
38168      if test "x$has_space" != x; then
38169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38171      fi
38172      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38173    fi
38174  fi
38175
38176  # Now new_path has a complete unix path to the binary
38177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38178    # Keep paths in /bin as-is, but remove trailing .exe if any
38179    new_path="${new_path/%.exe/}"
38180    # Do not save /bin paths to all_fixpath_prefixes!
38181  else
38182    # Not in mixed or Windows style, start by that.
38183    new_path=`cmd //c echo $new_path`
38184
38185  input_path="$new_path"
38186  # Check if we need to convert this using DOS-style short mode. If the path
38187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38188  # take no chances and rewrite it.
38189  # Note: m4 eats our [], so we need to use [ and ] instead.
38190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38191  if test "x$has_forbidden_chars" != x; then
38192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38194  fi
38195
38196    # Output is in $new_path
38197
38198  windows_path="$new_path"
38199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38200    unix_path=`$CYGPATH -u "$windows_path"`
38201    new_path="$unix_path"
38202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38204    new_path="$unix_path"
38205  fi
38206
38207    # remove trailing .exe if any
38208    new_path="${new_path/%.exe/}"
38209
38210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38212  fi
38213
38214    else
38215      # We're on a unix platform. Hooray! :)
38216      # First separate the path from the arguments. This will split at the first
38217      # space.
38218      complete="$AR"
38219      path="${complete%% *}"
38220      tmp="$complete EOL"
38221      arguments="${tmp#* }"
38222
38223      # Cannot rely on the command "which" here since it doesn't always work.
38224      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38225      if test -z "$is_absolute_path"; then
38226        # Path to executable is not absolute. Find it.
38227        IFS_save="$IFS"
38228        IFS=:
38229        for p in $PATH; do
38230          if test -f "$p/$path" && test -x "$p/$path"; then
38231            new_path="$p/$path"
38232            break
38233          fi
38234        done
38235        IFS="$IFS_save"
38236      else
38237        # This is an absolute path, we can use it without further modifications.
38238        new_path="$path"
38239      fi
38240
38241      if test "x$new_path" = x; then
38242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38243$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38244        has_space=`$ECHO "$complete" | $GREP " "`
38245        if test "x$has_space" != x; then
38246          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38247$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38248        fi
38249        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38250      fi
38251    fi
38252
38253    # Now join together the path and the arguments once again
38254    if test "x$arguments" != xEOL; then
38255      new_complete="$new_path ${arguments% *}"
38256    else
38257      new_complete="$new_path"
38258    fi
38259
38260    if test "x$complete" != "x$new_complete"; then
38261      AR="$new_complete"
38262      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38263$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38264    fi
38265  fi
38266
38267
38268
38269  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38270
38271
38272  # Publish this variable in the help.
38273
38274
38275  if [ -z "${LIPO+x}" ]; then
38276    # The variable is not set by user, try to locate tool using the code snippet
38277    for ac_prog in lipo
38278do
38279  # Extract the first word of "$ac_prog", so it can be a program name with args.
38280set dummy $ac_prog; ac_word=$2
38281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38282$as_echo_n "checking for $ac_word... " >&6; }
38283if ${ac_cv_path_LIPO+:} false; then :
38284  $as_echo_n "(cached) " >&6
38285else
38286  case $LIPO in
38287  [\\/]* | ?:[\\/]*)
38288  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38289  ;;
38290  *)
38291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38292for as_dir in $PATH
38293do
38294  IFS=$as_save_IFS
38295  test -z "$as_dir" && as_dir=.
38296    for ac_exec_ext in '' $ac_executable_extensions; do
38297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38298    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38300    break 2
38301  fi
38302done
38303  done
38304IFS=$as_save_IFS
38305
38306  ;;
38307esac
38308fi
38309LIPO=$ac_cv_path_LIPO
38310if test -n "$LIPO"; then
38311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38312$as_echo "$LIPO" >&6; }
38313else
38314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38315$as_echo "no" >&6; }
38316fi
38317
38318
38319  test -n "$LIPO" && break
38320done
38321
38322  else
38323    # The variable is set, but is it from the command line or the environment?
38324
38325    # Try to remove the string !LIPO! from our list.
38326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38328      # If it failed, the variable was not from the command line. Ignore it,
38329      # but warn the user (except for BASH, which is always set by the calling BASH).
38330      if test "xLIPO" != xBASH; then
38331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38332$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38333      fi
38334      # Try to locate tool using the code snippet
38335      for ac_prog in lipo
38336do
38337  # Extract the first word of "$ac_prog", so it can be a program name with args.
38338set dummy $ac_prog; ac_word=$2
38339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38340$as_echo_n "checking for $ac_word... " >&6; }
38341if ${ac_cv_path_LIPO+:} false; then :
38342  $as_echo_n "(cached) " >&6
38343else
38344  case $LIPO in
38345  [\\/]* | ?:[\\/]*)
38346  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38347  ;;
38348  *)
38349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38350for as_dir in $PATH
38351do
38352  IFS=$as_save_IFS
38353  test -z "$as_dir" && as_dir=.
38354    for ac_exec_ext in '' $ac_executable_extensions; do
38355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38356    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38358    break 2
38359  fi
38360done
38361  done
38362IFS=$as_save_IFS
38363
38364  ;;
38365esac
38366fi
38367LIPO=$ac_cv_path_LIPO
38368if test -n "$LIPO"; then
38369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38370$as_echo "$LIPO" >&6; }
38371else
38372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38373$as_echo "no" >&6; }
38374fi
38375
38376
38377  test -n "$LIPO" && break
38378done
38379
38380    else
38381      # If it succeeded, then it was overridden by the user. We will use it
38382      # for the tool.
38383
38384      # First remove it from the list of overridden variables, so we can test
38385      # for unknown variables in the end.
38386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38387
38388      # Check if we try to supply an empty value
38389      if test "x$LIPO" = x; then
38390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38391$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38393$as_echo_n "checking for LIPO... " >&6; }
38394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38395$as_echo "disabled" >&6; }
38396      else
38397        # Check if the provided tool contains a complete path.
38398        tool_specified="$LIPO"
38399        tool_basename="${tool_specified##*/}"
38400        if test "x$tool_basename" = "x$tool_specified"; then
38401          # A command without a complete path is provided, search $PATH.
38402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38403$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38404          # Extract the first word of "$tool_basename", so it can be a program name with args.
38405set dummy $tool_basename; ac_word=$2
38406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38407$as_echo_n "checking for $ac_word... " >&6; }
38408if ${ac_cv_path_LIPO+:} false; then :
38409  $as_echo_n "(cached) " >&6
38410else
38411  case $LIPO in
38412  [\\/]* | ?:[\\/]*)
38413  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38414  ;;
38415  *)
38416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38417for as_dir in $PATH
38418do
38419  IFS=$as_save_IFS
38420  test -z "$as_dir" && as_dir=.
38421    for ac_exec_ext in '' $ac_executable_extensions; do
38422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38423    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38425    break 2
38426  fi
38427done
38428  done
38429IFS=$as_save_IFS
38430
38431  ;;
38432esac
38433fi
38434LIPO=$ac_cv_path_LIPO
38435if test -n "$LIPO"; then
38436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38437$as_echo "$LIPO" >&6; }
38438else
38439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38440$as_echo "no" >&6; }
38441fi
38442
38443
38444          if test "x$LIPO" = x; then
38445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38446          fi
38447        else
38448          # Otherwise we believe it is a complete path. Use it as it is.
38449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38450$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38452$as_echo_n "checking for LIPO... " >&6; }
38453          if test ! -x "$tool_specified"; then
38454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38455$as_echo "not found" >&6; }
38456            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38457          fi
38458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38459$as_echo "$tool_specified" >&6; }
38460        fi
38461      fi
38462    fi
38463
38464  fi
38465
38466
38467
38468  # Only process if variable expands to non-empty
38469
38470  if test "x$LIPO" != x; then
38471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38472
38473  # First separate the path from the arguments. This will split at the first
38474  # space.
38475  complete="$LIPO"
38476  path="${complete%% *}"
38477  tmp="$complete EOL"
38478  arguments="${tmp#* }"
38479
38480  # Input might be given as Windows format, start by converting to
38481  # unix format.
38482  new_path=`$CYGPATH -u "$path"`
38483
38484  # Now try to locate executable using which
38485  new_path=`$WHICH "$new_path" 2> /dev/null`
38486  # bat and cmd files are not always considered executable in cygwin causing which
38487  # to not find them
38488  if test "x$new_path" = x \
38489      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38490      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38491    new_path=`$CYGPATH -u "$path"`
38492  fi
38493  if test "x$new_path" = x; then
38494    # Oops. Which didn't find the executable.
38495    # The splitting of arguments from the executable at a space might have been incorrect,
38496    # since paths with space are more likely in Windows. Give it another try with the whole
38497    # argument.
38498    path="$complete"
38499    arguments="EOL"
38500    new_path=`$CYGPATH -u "$path"`
38501    new_path=`$WHICH "$new_path" 2> /dev/null`
38502    # bat and cmd files are not always considered executable in cygwin causing which
38503    # to not find them
38504    if test "x$new_path" = x \
38505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38507      new_path=`$CYGPATH -u "$path"`
38508    fi
38509    if test "x$new_path" = x; then
38510      # It's still not found. Now this is an unrecoverable error.
38511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38512$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38513      has_space=`$ECHO "$complete" | $GREP " "`
38514      if test "x$has_space" != x; then
38515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38517      fi
38518      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38519    fi
38520  fi
38521
38522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38525  # "foo.exe" is OK but "foo" is an error.
38526  #
38527  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38528  # It is also a way to make sure we got the proper file name for the real test later on.
38529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38530  if test "x$test_shortpath" = x; then
38531    # Short path failed, file does not exist as specified.
38532    # Try adding .exe or .cmd
38533    if test -f "${new_path}.exe"; then
38534      input_to_shortpath="${new_path}.exe"
38535    elif test -f "${new_path}.cmd"; then
38536      input_to_shortpath="${new_path}.cmd"
38537    else
38538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38539$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38542      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38543    fi
38544  else
38545    input_to_shortpath="$new_path"
38546  fi
38547
38548  # Call helper function which possibly converts this using DOS-style short mode.
38549  # If so, the updated path is stored in $new_path.
38550  new_path="$input_to_shortpath"
38551
38552  input_path="$input_to_shortpath"
38553  # Check if we need to convert this using DOS-style short mode. If the path
38554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38555  # take no chances and rewrite it.
38556  # Note: m4 eats our [], so we need to use [ and ] instead.
38557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38558  if test "x$has_forbidden_chars" != x; then
38559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38563      # Going to short mode and back again did indeed matter. Since short mode is
38564      # case insensitive, let's make it lowercase to improve readability.
38565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38566      # Now convert it back to Unix-style (cygpath)
38567      input_path=`$CYGPATH -u "$shortmode_path"`
38568      new_path="$input_path"
38569    fi
38570  fi
38571
38572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38573  if test "x$test_cygdrive_prefix" = x; then
38574    # As a simple fix, exclude /usr/bin since it's not a real path.
38575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38577      # a path prefixed by /cygdrive for fixpath to work.
38578      new_path="$CYGWIN_ROOT_PATH$input_path"
38579    fi
38580  fi
38581
38582  # remove trailing .exe if any
38583  new_path="${new_path/%.exe/}"
38584
38585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38586
38587  # First separate the path from the arguments. This will split at the first
38588  # space.
38589  complete="$LIPO"
38590  path="${complete%% *}"
38591  tmp="$complete EOL"
38592  arguments="${tmp#* }"
38593
38594  # Input might be given as Windows format, start by converting to
38595  # unix format.
38596  new_path="$path"
38597
38598  windows_path="$new_path"
38599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38600    unix_path=`$CYGPATH -u "$windows_path"`
38601    new_path="$unix_path"
38602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38604    new_path="$unix_path"
38605  fi
38606
38607
38608  # Now try to locate executable using which
38609  new_path=`$WHICH "$new_path" 2> /dev/null`
38610
38611  if test "x$new_path" = x; then
38612    # Oops. Which didn't find the executable.
38613    # The splitting of arguments from the executable at a space might have been incorrect,
38614    # since paths with space are more likely in Windows. Give it another try with the whole
38615    # argument.
38616    path="$complete"
38617    arguments="EOL"
38618    new_path="$path"
38619
38620  windows_path="$new_path"
38621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38622    unix_path=`$CYGPATH -u "$windows_path"`
38623    new_path="$unix_path"
38624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38626    new_path="$unix_path"
38627  fi
38628
38629
38630    new_path=`$WHICH "$new_path" 2> /dev/null`
38631    # bat and cmd files are not always considered executable in MSYS causing which
38632    # to not find them
38633    if test "x$new_path" = x \
38634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38636      new_path="$path"
38637
38638  windows_path="$new_path"
38639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38640    unix_path=`$CYGPATH -u "$windows_path"`
38641    new_path="$unix_path"
38642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38644    new_path="$unix_path"
38645  fi
38646
38647    fi
38648
38649    if test "x$new_path" = x; then
38650      # It's still not found. Now this is an unrecoverable error.
38651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38652$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38653      has_space=`$ECHO "$complete" | $GREP " "`
38654      if test "x$has_space" != x; then
38655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38657      fi
38658      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38659    fi
38660  fi
38661
38662  # Now new_path has a complete unix path to the binary
38663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38664    # Keep paths in /bin as-is, but remove trailing .exe if any
38665    new_path="${new_path/%.exe/}"
38666    # Do not save /bin paths to all_fixpath_prefixes!
38667  else
38668    # Not in mixed or Windows style, start by that.
38669    new_path=`cmd //c echo $new_path`
38670
38671  input_path="$new_path"
38672  # Check if we need to convert this using DOS-style short mode. If the path
38673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38674  # take no chances and rewrite it.
38675  # Note: m4 eats our [], so we need to use [ and ] instead.
38676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38677  if test "x$has_forbidden_chars" != x; then
38678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38680  fi
38681
38682    # Output is in $new_path
38683
38684  windows_path="$new_path"
38685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38686    unix_path=`$CYGPATH -u "$windows_path"`
38687    new_path="$unix_path"
38688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38690    new_path="$unix_path"
38691  fi
38692
38693    # remove trailing .exe if any
38694    new_path="${new_path/%.exe/}"
38695
38696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38698  fi
38699
38700    else
38701      # We're on a unix platform. Hooray! :)
38702      # First separate the path from the arguments. This will split at the first
38703      # space.
38704      complete="$LIPO"
38705      path="${complete%% *}"
38706      tmp="$complete EOL"
38707      arguments="${tmp#* }"
38708
38709      # Cannot rely on the command "which" here since it doesn't always work.
38710      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38711      if test -z "$is_absolute_path"; then
38712        # Path to executable is not absolute. Find it.
38713        IFS_save="$IFS"
38714        IFS=:
38715        for p in $PATH; do
38716          if test -f "$p/$path" && test -x "$p/$path"; then
38717            new_path="$p/$path"
38718            break
38719          fi
38720        done
38721        IFS="$IFS_save"
38722      else
38723        # This is an absolute path, we can use it without further modifications.
38724        new_path="$path"
38725      fi
38726
38727      if test "x$new_path" = x; then
38728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38729$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38730        has_space=`$ECHO "$complete" | $GREP " "`
38731        if test "x$has_space" != x; then
38732          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38734        fi
38735        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38736      fi
38737    fi
38738
38739    # Now join together the path and the arguments once again
38740    if test "x$arguments" != xEOL; then
38741      new_complete="$new_path ${arguments% *}"
38742    else
38743      new_complete="$new_path"
38744    fi
38745
38746    if test "x$complete" != "x$new_complete"; then
38747      LIPO="$new_complete"
38748      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38749$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38750    fi
38751  fi
38752
38753  fi
38754
38755  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38756    # Extract the first word of "mt", so it can be a program name with args.
38757set dummy mt; ac_word=$2
38758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38759$as_echo_n "checking for $ac_word... " >&6; }
38760if ${ac_cv_prog_MT+:} false; then :
38761  $as_echo_n "(cached) " >&6
38762else
38763  if test -n "$MT"; then
38764  ac_cv_prog_MT="$MT" # Let the user override the test.
38765else
38766  ac_prog_rejected=no
38767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38768for as_dir in $PATH
38769do
38770  IFS=$as_save_IFS
38771  test -z "$as_dir" && as_dir=.
38772    for ac_exec_ext in '' $ac_executable_extensions; do
38773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38774    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38775       ac_prog_rejected=yes
38776       continue
38777     fi
38778    ac_cv_prog_MT="mt"
38779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38780    break 2
38781  fi
38782done
38783  done
38784IFS=$as_save_IFS
38785
38786if test $ac_prog_rejected = yes; then
38787  # We found a bogon in the path, so make sure we never use it.
38788  set dummy $ac_cv_prog_MT
38789  shift
38790  if test $# != 0; then
38791    # We chose a different compiler from the bogus one.
38792    # However, it has the same basename, so the bogon will be chosen
38793    # first if we set MT to just the basename; use the full file name.
38794    shift
38795    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38796  fi
38797fi
38798fi
38799fi
38800MT=$ac_cv_prog_MT
38801if test -n "$MT"; then
38802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38803$as_echo "$MT" >&6; }
38804else
38805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38806$as_echo "no" >&6; }
38807fi
38808
38809
38810
38811  # Only process if variable expands to non-empty
38812
38813  if test "x$MT" != x; then
38814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38815
38816  # First separate the path from the arguments. This will split at the first
38817  # space.
38818  complete="$MT"
38819  path="${complete%% *}"
38820  tmp="$complete EOL"
38821  arguments="${tmp#* }"
38822
38823  # Input might be given as Windows format, start by converting to
38824  # unix format.
38825  new_path=`$CYGPATH -u "$path"`
38826
38827  # Now try to locate executable using which
38828  new_path=`$WHICH "$new_path" 2> /dev/null`
38829  # bat and cmd files are not always considered executable in cygwin causing which
38830  # to not find them
38831  if test "x$new_path" = x \
38832      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38833      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38834    new_path=`$CYGPATH -u "$path"`
38835  fi
38836  if test "x$new_path" = x; then
38837    # Oops. Which didn't find the executable.
38838    # The splitting of arguments from the executable at a space might have been incorrect,
38839    # since paths with space are more likely in Windows. Give it another try with the whole
38840    # argument.
38841    path="$complete"
38842    arguments="EOL"
38843    new_path=`$CYGPATH -u "$path"`
38844    new_path=`$WHICH "$new_path" 2> /dev/null`
38845    # bat and cmd files are not always considered executable in cygwin causing which
38846    # to not find them
38847    if test "x$new_path" = x \
38848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38850      new_path=`$CYGPATH -u "$path"`
38851    fi
38852    if test "x$new_path" = x; then
38853      # It's still not found. Now this is an unrecoverable error.
38854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38855$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38856      has_space=`$ECHO "$complete" | $GREP " "`
38857      if test "x$has_space" != x; then
38858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38860      fi
38861      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38862    fi
38863  fi
38864
38865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38868  # "foo.exe" is OK but "foo" is an error.
38869  #
38870  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38871  # It is also a way to make sure we got the proper file name for the real test later on.
38872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38873  if test "x$test_shortpath" = x; then
38874    # Short path failed, file does not exist as specified.
38875    # Try adding .exe or .cmd
38876    if test -f "${new_path}.exe"; then
38877      input_to_shortpath="${new_path}.exe"
38878    elif test -f "${new_path}.cmd"; then
38879      input_to_shortpath="${new_path}.cmd"
38880    else
38881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38882$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38883      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38884$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38885      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38886    fi
38887  else
38888    input_to_shortpath="$new_path"
38889  fi
38890
38891  # Call helper function which possibly converts this using DOS-style short mode.
38892  # If so, the updated path is stored in $new_path.
38893  new_path="$input_to_shortpath"
38894
38895  input_path="$input_to_shortpath"
38896  # Check if we need to convert this using DOS-style short mode. If the path
38897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38898  # take no chances and rewrite it.
38899  # Note: m4 eats our [], so we need to use [ and ] instead.
38900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38901  if test "x$has_forbidden_chars" != x; then
38902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38906      # Going to short mode and back again did indeed matter. Since short mode is
38907      # case insensitive, let's make it lowercase to improve readability.
38908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38909      # Now convert it back to Unix-style (cygpath)
38910      input_path=`$CYGPATH -u "$shortmode_path"`
38911      new_path="$input_path"
38912    fi
38913  fi
38914
38915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38916  if test "x$test_cygdrive_prefix" = x; then
38917    # As a simple fix, exclude /usr/bin since it's not a real path.
38918    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38920      # a path prefixed by /cygdrive for fixpath to work.
38921      new_path="$CYGWIN_ROOT_PATH$input_path"
38922    fi
38923  fi
38924
38925  # remove trailing .exe if any
38926  new_path="${new_path/%.exe/}"
38927
38928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38929
38930  # First separate the path from the arguments. This will split at the first
38931  # space.
38932  complete="$MT"
38933  path="${complete%% *}"
38934  tmp="$complete EOL"
38935  arguments="${tmp#* }"
38936
38937  # Input might be given as Windows format, start by converting to
38938  # unix format.
38939  new_path="$path"
38940
38941  windows_path="$new_path"
38942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38943    unix_path=`$CYGPATH -u "$windows_path"`
38944    new_path="$unix_path"
38945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38947    new_path="$unix_path"
38948  fi
38949
38950
38951  # Now try to locate executable using which
38952  new_path=`$WHICH "$new_path" 2> /dev/null`
38953
38954  if test "x$new_path" = x; then
38955    # Oops. Which didn't find the executable.
38956    # The splitting of arguments from the executable at a space might have been incorrect,
38957    # since paths with space are more likely in Windows. Give it another try with the whole
38958    # argument.
38959    path="$complete"
38960    arguments="EOL"
38961    new_path="$path"
38962
38963  windows_path="$new_path"
38964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38965    unix_path=`$CYGPATH -u "$windows_path"`
38966    new_path="$unix_path"
38967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38969    new_path="$unix_path"
38970  fi
38971
38972
38973    new_path=`$WHICH "$new_path" 2> /dev/null`
38974    # bat and cmd files are not always considered executable in MSYS causing which
38975    # to not find them
38976    if test "x$new_path" = x \
38977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38979      new_path="$path"
38980
38981  windows_path="$new_path"
38982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38983    unix_path=`$CYGPATH -u "$windows_path"`
38984    new_path="$unix_path"
38985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38987    new_path="$unix_path"
38988  fi
38989
38990    fi
38991
38992    if test "x$new_path" = x; then
38993      # It's still not found. Now this is an unrecoverable error.
38994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38995$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38996      has_space=`$ECHO "$complete" | $GREP " "`
38997      if test "x$has_space" != x; then
38998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39000      fi
39001      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39002    fi
39003  fi
39004
39005  # Now new_path has a complete unix path to the binary
39006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39007    # Keep paths in /bin as-is, but remove trailing .exe if any
39008    new_path="${new_path/%.exe/}"
39009    # Do not save /bin paths to all_fixpath_prefixes!
39010  else
39011    # Not in mixed or Windows style, start by that.
39012    new_path=`cmd //c echo $new_path`
39013
39014  input_path="$new_path"
39015  # Check if we need to convert this using DOS-style short mode. If the path
39016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39017  # take no chances and rewrite it.
39018  # Note: m4 eats our [], so we need to use [ and ] instead.
39019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39020  if test "x$has_forbidden_chars" != x; then
39021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39023  fi
39024
39025    # Output is in $new_path
39026
39027  windows_path="$new_path"
39028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39029    unix_path=`$CYGPATH -u "$windows_path"`
39030    new_path="$unix_path"
39031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39033    new_path="$unix_path"
39034  fi
39035
39036    # remove trailing .exe if any
39037    new_path="${new_path/%.exe/}"
39038
39039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39041  fi
39042
39043    else
39044      # We're on a unix platform. Hooray! :)
39045      # First separate the path from the arguments. This will split at the first
39046      # space.
39047      complete="$MT"
39048      path="${complete%% *}"
39049      tmp="$complete EOL"
39050      arguments="${tmp#* }"
39051
39052      # Cannot rely on the command "which" here since it doesn't always work.
39053      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39054      if test -z "$is_absolute_path"; then
39055        # Path to executable is not absolute. Find it.
39056        IFS_save="$IFS"
39057        IFS=:
39058        for p in $PATH; do
39059          if test -f "$p/$path" && test -x "$p/$path"; then
39060            new_path="$p/$path"
39061            break
39062          fi
39063        done
39064        IFS="$IFS_save"
39065      else
39066        # This is an absolute path, we can use it without further modifications.
39067        new_path="$path"
39068      fi
39069
39070      if test "x$new_path" = x; then
39071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39072$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39073        has_space=`$ECHO "$complete" | $GREP " "`
39074        if test "x$has_space" != x; then
39075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39077        fi
39078        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39079      fi
39080    fi
39081
39082    # Now join together the path and the arguments once again
39083    if test "x$arguments" != xEOL; then
39084      new_complete="$new_path ${arguments% *}"
39085    else
39086      new_complete="$new_path"
39087    fi
39088
39089    if test "x$complete" != "x$new_complete"; then
39090      MT="$new_complete"
39091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39092$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39093    fi
39094  fi
39095
39096    # Setup the resource compiler (RC)
39097    # Extract the first word of "rc", so it can be a program name with args.
39098set dummy rc; ac_word=$2
39099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39100$as_echo_n "checking for $ac_word... " >&6; }
39101if ${ac_cv_prog_RC+:} false; then :
39102  $as_echo_n "(cached) " >&6
39103else
39104  if test -n "$RC"; then
39105  ac_cv_prog_RC="$RC" # Let the user override the test.
39106else
39107  ac_prog_rejected=no
39108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39109for as_dir in $PATH
39110do
39111  IFS=$as_save_IFS
39112  test -z "$as_dir" && as_dir=.
39113    for ac_exec_ext in '' $ac_executable_extensions; do
39114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39115    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39116       ac_prog_rejected=yes
39117       continue
39118     fi
39119    ac_cv_prog_RC="rc"
39120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39121    break 2
39122  fi
39123done
39124  done
39125IFS=$as_save_IFS
39126
39127if test $ac_prog_rejected = yes; then
39128  # We found a bogon in the path, so make sure we never use it.
39129  set dummy $ac_cv_prog_RC
39130  shift
39131  if test $# != 0; then
39132    # We chose a different compiler from the bogus one.
39133    # However, it has the same basename, so the bogon will be chosen
39134    # first if we set RC to just the basename; use the full file name.
39135    shift
39136    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39137  fi
39138fi
39139fi
39140fi
39141RC=$ac_cv_prog_RC
39142if test -n "$RC"; then
39143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39144$as_echo "$RC" >&6; }
39145else
39146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39147$as_echo "no" >&6; }
39148fi
39149
39150
39151
39152  # Only process if variable expands to non-empty
39153
39154  if test "x$RC" != x; then
39155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39156
39157  # First separate the path from the arguments. This will split at the first
39158  # space.
39159  complete="$RC"
39160  path="${complete%% *}"
39161  tmp="$complete EOL"
39162  arguments="${tmp#* }"
39163
39164  # Input might be given as Windows format, start by converting to
39165  # unix format.
39166  new_path=`$CYGPATH -u "$path"`
39167
39168  # Now try to locate executable using which
39169  new_path=`$WHICH "$new_path" 2> /dev/null`
39170  # bat and cmd files are not always considered executable in cygwin causing which
39171  # to not find them
39172  if test "x$new_path" = x \
39173      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39174      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39175    new_path=`$CYGPATH -u "$path"`
39176  fi
39177  if test "x$new_path" = x; then
39178    # Oops. Which didn't find the executable.
39179    # The splitting of arguments from the executable at a space might have been incorrect,
39180    # since paths with space are more likely in Windows. Give it another try with the whole
39181    # argument.
39182    path="$complete"
39183    arguments="EOL"
39184    new_path=`$CYGPATH -u "$path"`
39185    new_path=`$WHICH "$new_path" 2> /dev/null`
39186    # bat and cmd files are not always considered executable in cygwin causing which
39187    # to not find them
39188    if test "x$new_path" = x \
39189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39191      new_path=`$CYGPATH -u "$path"`
39192    fi
39193    if test "x$new_path" = x; then
39194      # It's still not found. Now this is an unrecoverable error.
39195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39196$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39197      has_space=`$ECHO "$complete" | $GREP " "`
39198      if test "x$has_space" != x; then
39199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39201      fi
39202      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39203    fi
39204  fi
39205
39206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39209  # "foo.exe" is OK but "foo" is an error.
39210  #
39211  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39212  # It is also a way to make sure we got the proper file name for the real test later on.
39213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39214  if test "x$test_shortpath" = x; then
39215    # Short path failed, file does not exist as specified.
39216    # Try adding .exe or .cmd
39217    if test -f "${new_path}.exe"; then
39218      input_to_shortpath="${new_path}.exe"
39219    elif test -f "${new_path}.cmd"; then
39220      input_to_shortpath="${new_path}.cmd"
39221    else
39222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39223$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39226      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39227    fi
39228  else
39229    input_to_shortpath="$new_path"
39230  fi
39231
39232  # Call helper function which possibly converts this using DOS-style short mode.
39233  # If so, the updated path is stored in $new_path.
39234  new_path="$input_to_shortpath"
39235
39236  input_path="$input_to_shortpath"
39237  # Check if we need to convert this using DOS-style short mode. If the path
39238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39239  # take no chances and rewrite it.
39240  # Note: m4 eats our [], so we need to use [ and ] instead.
39241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39242  if test "x$has_forbidden_chars" != x; then
39243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39247      # Going to short mode and back again did indeed matter. Since short mode is
39248      # case insensitive, let's make it lowercase to improve readability.
39249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39250      # Now convert it back to Unix-style (cygpath)
39251      input_path=`$CYGPATH -u "$shortmode_path"`
39252      new_path="$input_path"
39253    fi
39254  fi
39255
39256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39257  if test "x$test_cygdrive_prefix" = x; then
39258    # As a simple fix, exclude /usr/bin since it's not a real path.
39259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39261      # a path prefixed by /cygdrive for fixpath to work.
39262      new_path="$CYGWIN_ROOT_PATH$input_path"
39263    fi
39264  fi
39265
39266  # remove trailing .exe if any
39267  new_path="${new_path/%.exe/}"
39268
39269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39270
39271  # First separate the path from the arguments. This will split at the first
39272  # space.
39273  complete="$RC"
39274  path="${complete%% *}"
39275  tmp="$complete EOL"
39276  arguments="${tmp#* }"
39277
39278  # Input might be given as Windows format, start by converting to
39279  # unix format.
39280  new_path="$path"
39281
39282  windows_path="$new_path"
39283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39284    unix_path=`$CYGPATH -u "$windows_path"`
39285    new_path="$unix_path"
39286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39288    new_path="$unix_path"
39289  fi
39290
39291
39292  # Now try to locate executable using which
39293  new_path=`$WHICH "$new_path" 2> /dev/null`
39294
39295  if test "x$new_path" = x; then
39296    # Oops. Which didn't find the executable.
39297    # The splitting of arguments from the executable at a space might have been incorrect,
39298    # since paths with space are more likely in Windows. Give it another try with the whole
39299    # argument.
39300    path="$complete"
39301    arguments="EOL"
39302    new_path="$path"
39303
39304  windows_path="$new_path"
39305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39306    unix_path=`$CYGPATH -u "$windows_path"`
39307    new_path="$unix_path"
39308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39310    new_path="$unix_path"
39311  fi
39312
39313
39314    new_path=`$WHICH "$new_path" 2> /dev/null`
39315    # bat and cmd files are not always considered executable in MSYS causing which
39316    # to not find them
39317    if test "x$new_path" = x \
39318        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39319        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39320      new_path="$path"
39321
39322  windows_path="$new_path"
39323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39324    unix_path=`$CYGPATH -u "$windows_path"`
39325    new_path="$unix_path"
39326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39328    new_path="$unix_path"
39329  fi
39330
39331    fi
39332
39333    if test "x$new_path" = x; then
39334      # It's still not found. Now this is an unrecoverable error.
39335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39336$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39337      has_space=`$ECHO "$complete" | $GREP " "`
39338      if test "x$has_space" != x; then
39339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39341      fi
39342      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39343    fi
39344  fi
39345
39346  # Now new_path has a complete unix path to the binary
39347  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39348    # Keep paths in /bin as-is, but remove trailing .exe if any
39349    new_path="${new_path/%.exe/}"
39350    # Do not save /bin paths to all_fixpath_prefixes!
39351  else
39352    # Not in mixed or Windows style, start by that.
39353    new_path=`cmd //c echo $new_path`
39354
39355  input_path="$new_path"
39356  # Check if we need to convert this using DOS-style short mode. If the path
39357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39358  # take no chances and rewrite it.
39359  # Note: m4 eats our [], so we need to use [ and ] instead.
39360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39361  if test "x$has_forbidden_chars" != x; then
39362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39364  fi
39365
39366    # Output is in $new_path
39367
39368  windows_path="$new_path"
39369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39370    unix_path=`$CYGPATH -u "$windows_path"`
39371    new_path="$unix_path"
39372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39374    new_path="$unix_path"
39375  fi
39376
39377    # remove trailing .exe if any
39378    new_path="${new_path/%.exe/}"
39379
39380    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39381    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39382  fi
39383
39384    else
39385      # We're on a unix platform. Hooray! :)
39386      # First separate the path from the arguments. This will split at the first
39387      # space.
39388      complete="$RC"
39389      path="${complete%% *}"
39390      tmp="$complete EOL"
39391      arguments="${tmp#* }"
39392
39393      # Cannot rely on the command "which" here since it doesn't always work.
39394      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39395      if test -z "$is_absolute_path"; then
39396        # Path to executable is not absolute. Find it.
39397        IFS_save="$IFS"
39398        IFS=:
39399        for p in $PATH; do
39400          if test -f "$p/$path" && test -x "$p/$path"; then
39401            new_path="$p/$path"
39402            break
39403          fi
39404        done
39405        IFS="$IFS_save"
39406      else
39407        # This is an absolute path, we can use it without further modifications.
39408        new_path="$path"
39409      fi
39410
39411      if test "x$new_path" = x; then
39412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39413$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39414        has_space=`$ECHO "$complete" | $GREP " "`
39415        if test "x$has_space" != x; then
39416          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39417$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39418        fi
39419        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39420      fi
39421    fi
39422
39423    # Now join together the path and the arguments once again
39424    if test "x$arguments" != xEOL; then
39425      new_complete="$new_path ${arguments% *}"
39426    else
39427      new_complete="$new_path"
39428    fi
39429
39430    if test "x$complete" != "x$new_complete"; then
39431      RC="$new_complete"
39432      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39433$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39434    fi
39435  fi
39436
39437    # Extract the first word of "dumpbin", so it can be a program name with args.
39438set dummy dumpbin; ac_word=$2
39439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39440$as_echo_n "checking for $ac_word... " >&6; }
39441if ${ac_cv_prog_DUMPBIN+:} false; then :
39442  $as_echo_n "(cached) " >&6
39443else
39444  if test -n "$DUMPBIN"; then
39445  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39446else
39447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39448for as_dir in $PATH
39449do
39450  IFS=$as_save_IFS
39451  test -z "$as_dir" && as_dir=.
39452    for ac_exec_ext in '' $ac_executable_extensions; do
39453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39454    ac_cv_prog_DUMPBIN="dumpbin"
39455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39456    break 2
39457  fi
39458done
39459  done
39460IFS=$as_save_IFS
39461
39462fi
39463fi
39464DUMPBIN=$ac_cv_prog_DUMPBIN
39465if test -n "$DUMPBIN"; then
39466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39467$as_echo "$DUMPBIN" >&6; }
39468else
39469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39470$as_echo "no" >&6; }
39471fi
39472
39473
39474
39475  # Only process if variable expands to non-empty
39476
39477  if test "x$DUMPBIN" != x; then
39478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39479
39480  # First separate the path from the arguments. This will split at the first
39481  # space.
39482  complete="$DUMPBIN"
39483  path="${complete%% *}"
39484  tmp="$complete EOL"
39485  arguments="${tmp#* }"
39486
39487  # Input might be given as Windows format, start by converting to
39488  # unix format.
39489  new_path=`$CYGPATH -u "$path"`
39490
39491  # Now try to locate executable using which
39492  new_path=`$WHICH "$new_path" 2> /dev/null`
39493  # bat and cmd files are not always considered executable in cygwin causing which
39494  # to not find them
39495  if test "x$new_path" = x \
39496      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39497      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39498    new_path=`$CYGPATH -u "$path"`
39499  fi
39500  if test "x$new_path" = x; then
39501    # Oops. Which didn't find the executable.
39502    # The splitting of arguments from the executable at a space might have been incorrect,
39503    # since paths with space are more likely in Windows. Give it another try with the whole
39504    # argument.
39505    path="$complete"
39506    arguments="EOL"
39507    new_path=`$CYGPATH -u "$path"`
39508    new_path=`$WHICH "$new_path" 2> /dev/null`
39509    # bat and cmd files are not always considered executable in cygwin causing which
39510    # to not find them
39511    if test "x$new_path" = x \
39512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39514      new_path=`$CYGPATH -u "$path"`
39515    fi
39516    if test "x$new_path" = x; then
39517      # It's still not found. Now this is an unrecoverable error.
39518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39519$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39520      has_space=`$ECHO "$complete" | $GREP " "`
39521      if test "x$has_space" != x; then
39522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39524      fi
39525      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39526    fi
39527  fi
39528
39529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39532  # "foo.exe" is OK but "foo" is an error.
39533  #
39534  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39535  # It is also a way to make sure we got the proper file name for the real test later on.
39536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39537  if test "x$test_shortpath" = x; then
39538    # Short path failed, file does not exist as specified.
39539    # Try adding .exe or .cmd
39540    if test -f "${new_path}.exe"; then
39541      input_to_shortpath="${new_path}.exe"
39542    elif test -f "${new_path}.cmd"; then
39543      input_to_shortpath="${new_path}.cmd"
39544    else
39545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39546$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39549      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39550    fi
39551  else
39552    input_to_shortpath="$new_path"
39553  fi
39554
39555  # Call helper function which possibly converts this using DOS-style short mode.
39556  # If so, the updated path is stored in $new_path.
39557  new_path="$input_to_shortpath"
39558
39559  input_path="$input_to_shortpath"
39560  # Check if we need to convert this using DOS-style short mode. If the path
39561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39562  # take no chances and rewrite it.
39563  # Note: m4 eats our [], so we need to use [ and ] instead.
39564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39565  if test "x$has_forbidden_chars" != x; then
39566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39570      # Going to short mode and back again did indeed matter. Since short mode is
39571      # case insensitive, let's make it lowercase to improve readability.
39572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39573      # Now convert it back to Unix-style (cygpath)
39574      input_path=`$CYGPATH -u "$shortmode_path"`
39575      new_path="$input_path"
39576    fi
39577  fi
39578
39579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39580  if test "x$test_cygdrive_prefix" = x; then
39581    # As a simple fix, exclude /usr/bin since it's not a real path.
39582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39584      # a path prefixed by /cygdrive for fixpath to work.
39585      new_path="$CYGWIN_ROOT_PATH$input_path"
39586    fi
39587  fi
39588
39589  # remove trailing .exe if any
39590  new_path="${new_path/%.exe/}"
39591
39592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39593
39594  # First separate the path from the arguments. This will split at the first
39595  # space.
39596  complete="$DUMPBIN"
39597  path="${complete%% *}"
39598  tmp="$complete EOL"
39599  arguments="${tmp#* }"
39600
39601  # Input might be given as Windows format, start by converting to
39602  # unix format.
39603  new_path="$path"
39604
39605  windows_path="$new_path"
39606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39607    unix_path=`$CYGPATH -u "$windows_path"`
39608    new_path="$unix_path"
39609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39611    new_path="$unix_path"
39612  fi
39613
39614
39615  # Now try to locate executable using which
39616  new_path=`$WHICH "$new_path" 2> /dev/null`
39617
39618  if test "x$new_path" = x; then
39619    # Oops. Which didn't find the executable.
39620    # The splitting of arguments from the executable at a space might have been incorrect,
39621    # since paths with space are more likely in Windows. Give it another try with the whole
39622    # argument.
39623    path="$complete"
39624    arguments="EOL"
39625    new_path="$path"
39626
39627  windows_path="$new_path"
39628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39629    unix_path=`$CYGPATH -u "$windows_path"`
39630    new_path="$unix_path"
39631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39633    new_path="$unix_path"
39634  fi
39635
39636
39637    new_path=`$WHICH "$new_path" 2> /dev/null`
39638    # bat and cmd files are not always considered executable in MSYS causing which
39639    # to not find them
39640    if test "x$new_path" = x \
39641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39643      new_path="$path"
39644
39645  windows_path="$new_path"
39646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39647    unix_path=`$CYGPATH -u "$windows_path"`
39648    new_path="$unix_path"
39649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39651    new_path="$unix_path"
39652  fi
39653
39654    fi
39655
39656    if test "x$new_path" = x; then
39657      # It's still not found. Now this is an unrecoverable error.
39658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39659$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39660      has_space=`$ECHO "$complete" | $GREP " "`
39661      if test "x$has_space" != x; then
39662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39664      fi
39665      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39666    fi
39667  fi
39668
39669  # Now new_path has a complete unix path to the binary
39670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39671    # Keep paths in /bin as-is, but remove trailing .exe if any
39672    new_path="${new_path/%.exe/}"
39673    # Do not save /bin paths to all_fixpath_prefixes!
39674  else
39675    # Not in mixed or Windows style, start by that.
39676    new_path=`cmd //c echo $new_path`
39677
39678  input_path="$new_path"
39679  # Check if we need to convert this using DOS-style short mode. If the path
39680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39681  # take no chances and rewrite it.
39682  # Note: m4 eats our [], so we need to use [ and ] instead.
39683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39684  if test "x$has_forbidden_chars" != x; then
39685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39687  fi
39688
39689    # Output is in $new_path
39690
39691  windows_path="$new_path"
39692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39693    unix_path=`$CYGPATH -u "$windows_path"`
39694    new_path="$unix_path"
39695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39697    new_path="$unix_path"
39698  fi
39699
39700    # remove trailing .exe if any
39701    new_path="${new_path/%.exe/}"
39702
39703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39705  fi
39706
39707    else
39708      # We're on a unix platform. Hooray! :)
39709      # First separate the path from the arguments. This will split at the first
39710      # space.
39711      complete="$DUMPBIN"
39712      path="${complete%% *}"
39713      tmp="$complete EOL"
39714      arguments="${tmp#* }"
39715
39716      # Cannot rely on the command "which" here since it doesn't always work.
39717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39718      if test -z "$is_absolute_path"; then
39719        # Path to executable is not absolute. Find it.
39720        IFS_save="$IFS"
39721        IFS=:
39722        for p in $PATH; do
39723          if test -f "$p/$path" && test -x "$p/$path"; then
39724            new_path="$p/$path"
39725            break
39726          fi
39727        done
39728        IFS="$IFS_save"
39729      else
39730        # This is an absolute path, we can use it without further modifications.
39731        new_path="$path"
39732      fi
39733
39734      if test "x$new_path" = x; then
39735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39736$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39737        has_space=`$ECHO "$complete" | $GREP " "`
39738        if test "x$has_space" != x; then
39739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39741        fi
39742        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39743      fi
39744    fi
39745
39746    # Now join together the path and the arguments once again
39747    if test "x$arguments" != xEOL; then
39748      new_complete="$new_path ${arguments% *}"
39749    else
39750      new_complete="$new_path"
39751    fi
39752
39753    if test "x$complete" != "x$new_complete"; then
39754      DUMPBIN="$new_complete"
39755      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39756$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39757    fi
39758  fi
39759
39760    # We need to check for 'msbuild.exe' because at the place where we expect to
39761    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39762    # won't find the 'msbuild.exe' executable in that case (and the
39763    # 'ac_executable_extensions' is unusable due to performance reasons).
39764    # Notice that we intentionally don't fix up the path to MSBUILD because we
39765    # will call it in a DOS shell during freetype detection on Windows (see
39766    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39767    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39768set dummy msbuild.exe; ac_word=$2
39769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39770$as_echo_n "checking for $ac_word... " >&6; }
39771if ${ac_cv_prog_MSBUILD+:} false; then :
39772  $as_echo_n "(cached) " >&6
39773else
39774  if test -n "$MSBUILD"; then
39775  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39776else
39777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39778for as_dir in $PATH
39779do
39780  IFS=$as_save_IFS
39781  test -z "$as_dir" && as_dir=.
39782    for ac_exec_ext in '' $ac_executable_extensions; do
39783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39784    ac_cv_prog_MSBUILD="msbuild.exe"
39785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39786    break 2
39787  fi
39788done
39789  done
39790IFS=$as_save_IFS
39791
39792fi
39793fi
39794MSBUILD=$ac_cv_prog_MSBUILD
39795if test -n "$MSBUILD"; then
39796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39797$as_echo "$MSBUILD" >&6; }
39798else
39799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39800$as_echo "no" >&6; }
39801fi
39802
39803
39804  fi
39805
39806  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39807
39808
39809  # Publish this variable in the help.
39810
39811
39812  if [ -z "${STRIP+x}" ]; then
39813    # The variable is not set by user, try to locate tool using the code snippet
39814    for ac_prog in strip
39815do
39816  # Extract the first word of "$ac_prog", so it can be a program name with args.
39817set dummy $ac_prog; ac_word=$2
39818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39819$as_echo_n "checking for $ac_word... " >&6; }
39820if ${ac_cv_path_STRIP+:} false; then :
39821  $as_echo_n "(cached) " >&6
39822else
39823  case $STRIP in
39824  [\\/]* | ?:[\\/]*)
39825  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39826  ;;
39827  *)
39828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39829for as_dir in $PATH
39830do
39831  IFS=$as_save_IFS
39832  test -z "$as_dir" && as_dir=.
39833    for ac_exec_ext in '' $ac_executable_extensions; do
39834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39835    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39837    break 2
39838  fi
39839done
39840  done
39841IFS=$as_save_IFS
39842
39843  ;;
39844esac
39845fi
39846STRIP=$ac_cv_path_STRIP
39847if test -n "$STRIP"; then
39848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39849$as_echo "$STRIP" >&6; }
39850else
39851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39852$as_echo "no" >&6; }
39853fi
39854
39855
39856  test -n "$STRIP" && break
39857done
39858
39859  else
39860    # The variable is set, but is it from the command line or the environment?
39861
39862    # Try to remove the string !STRIP! from our list.
39863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39865      # If it failed, the variable was not from the command line. Ignore it,
39866      # but warn the user (except for BASH, which is always set by the calling BASH).
39867      if test "xSTRIP" != xBASH; then
39868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39869$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39870      fi
39871      # Try to locate tool using the code snippet
39872      for ac_prog in strip
39873do
39874  # Extract the first word of "$ac_prog", so it can be a program name with args.
39875set dummy $ac_prog; ac_word=$2
39876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39877$as_echo_n "checking for $ac_word... " >&6; }
39878if ${ac_cv_path_STRIP+:} false; then :
39879  $as_echo_n "(cached) " >&6
39880else
39881  case $STRIP in
39882  [\\/]* | ?:[\\/]*)
39883  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39884  ;;
39885  *)
39886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39887for as_dir in $PATH
39888do
39889  IFS=$as_save_IFS
39890  test -z "$as_dir" && as_dir=.
39891    for ac_exec_ext in '' $ac_executable_extensions; do
39892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39893    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39895    break 2
39896  fi
39897done
39898  done
39899IFS=$as_save_IFS
39900
39901  ;;
39902esac
39903fi
39904STRIP=$ac_cv_path_STRIP
39905if test -n "$STRIP"; then
39906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39907$as_echo "$STRIP" >&6; }
39908else
39909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39910$as_echo "no" >&6; }
39911fi
39912
39913
39914  test -n "$STRIP" && break
39915done
39916
39917    else
39918      # If it succeeded, then it was overridden by the user. We will use it
39919      # for the tool.
39920
39921      # First remove it from the list of overridden variables, so we can test
39922      # for unknown variables in the end.
39923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39924
39925      # Check if we try to supply an empty value
39926      if test "x$STRIP" = x; then
39927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39928$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39930$as_echo_n "checking for STRIP... " >&6; }
39931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39932$as_echo "disabled" >&6; }
39933      else
39934        # Check if the provided tool contains a complete path.
39935        tool_specified="$STRIP"
39936        tool_basename="${tool_specified##*/}"
39937        if test "x$tool_basename" = "x$tool_specified"; then
39938          # A command without a complete path is provided, search $PATH.
39939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39940$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39941          # Extract the first word of "$tool_basename", so it can be a program name with args.
39942set dummy $tool_basename; ac_word=$2
39943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39944$as_echo_n "checking for $ac_word... " >&6; }
39945if ${ac_cv_path_STRIP+:} false; then :
39946  $as_echo_n "(cached) " >&6
39947else
39948  case $STRIP in
39949  [\\/]* | ?:[\\/]*)
39950  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39951  ;;
39952  *)
39953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39954for as_dir in $PATH
39955do
39956  IFS=$as_save_IFS
39957  test -z "$as_dir" && as_dir=.
39958    for ac_exec_ext in '' $ac_executable_extensions; do
39959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39960    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39962    break 2
39963  fi
39964done
39965  done
39966IFS=$as_save_IFS
39967
39968  ;;
39969esac
39970fi
39971STRIP=$ac_cv_path_STRIP
39972if test -n "$STRIP"; then
39973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39974$as_echo "$STRIP" >&6; }
39975else
39976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39977$as_echo "no" >&6; }
39978fi
39979
39980
39981          if test "x$STRIP" = x; then
39982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39983          fi
39984        else
39985          # Otherwise we believe it is a complete path. Use it as it is.
39986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39987$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39989$as_echo_n "checking for STRIP... " >&6; }
39990          if test ! -x "$tool_specified"; then
39991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39992$as_echo "not found" >&6; }
39993            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39994          fi
39995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39996$as_echo "$tool_specified" >&6; }
39997        fi
39998      fi
39999    fi
40000
40001  fi
40002
40003
40004
40005  # Only process if variable expands to non-empty
40006
40007  if test "x$STRIP" != x; then
40008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40009
40010  # First separate the path from the arguments. This will split at the first
40011  # space.
40012  complete="$STRIP"
40013  path="${complete%% *}"
40014  tmp="$complete EOL"
40015  arguments="${tmp#* }"
40016
40017  # Input might be given as Windows format, start by converting to
40018  # unix format.
40019  new_path=`$CYGPATH -u "$path"`
40020
40021  # Now try to locate executable using which
40022  new_path=`$WHICH "$new_path" 2> /dev/null`
40023  # bat and cmd files are not always considered executable in cygwin causing which
40024  # to not find them
40025  if test "x$new_path" = x \
40026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40028    new_path=`$CYGPATH -u "$path"`
40029  fi
40030  if test "x$new_path" = x; then
40031    # Oops. Which didn't find the executable.
40032    # The splitting of arguments from the executable at a space might have been incorrect,
40033    # since paths with space are more likely in Windows. Give it another try with the whole
40034    # argument.
40035    path="$complete"
40036    arguments="EOL"
40037    new_path=`$CYGPATH -u "$path"`
40038    new_path=`$WHICH "$new_path" 2> /dev/null`
40039    # bat and cmd files are not always considered executable in cygwin causing which
40040    # to not find them
40041    if test "x$new_path" = x \
40042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40044      new_path=`$CYGPATH -u "$path"`
40045    fi
40046    if test "x$new_path" = x; then
40047      # It's still not found. Now this is an unrecoverable error.
40048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40049$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40050      has_space=`$ECHO "$complete" | $GREP " "`
40051      if test "x$has_space" != x; then
40052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40054      fi
40055      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40056    fi
40057  fi
40058
40059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40062  # "foo.exe" is OK but "foo" is an error.
40063  #
40064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40065  # It is also a way to make sure we got the proper file name for the real test later on.
40066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40067  if test "x$test_shortpath" = x; then
40068    # Short path failed, file does not exist as specified.
40069    # Try adding .exe or .cmd
40070    if test -f "${new_path}.exe"; then
40071      input_to_shortpath="${new_path}.exe"
40072    elif test -f "${new_path}.cmd"; then
40073      input_to_shortpath="${new_path}.cmd"
40074    else
40075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40076$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40079      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40080    fi
40081  else
40082    input_to_shortpath="$new_path"
40083  fi
40084
40085  # Call helper function which possibly converts this using DOS-style short mode.
40086  # If so, the updated path is stored in $new_path.
40087  new_path="$input_to_shortpath"
40088
40089  input_path="$input_to_shortpath"
40090  # Check if we need to convert this using DOS-style short mode. If the path
40091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40092  # take no chances and rewrite it.
40093  # Note: m4 eats our [], so we need to use [ and ] instead.
40094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40095  if test "x$has_forbidden_chars" != x; then
40096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40100      # Going to short mode and back again did indeed matter. Since short mode is
40101      # case insensitive, let's make it lowercase to improve readability.
40102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40103      # Now convert it back to Unix-style (cygpath)
40104      input_path=`$CYGPATH -u "$shortmode_path"`
40105      new_path="$input_path"
40106    fi
40107  fi
40108
40109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40110  if test "x$test_cygdrive_prefix" = x; then
40111    # As a simple fix, exclude /usr/bin since it's not a real path.
40112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40114      # a path prefixed by /cygdrive for fixpath to work.
40115      new_path="$CYGWIN_ROOT_PATH$input_path"
40116    fi
40117  fi
40118
40119  # remove trailing .exe if any
40120  new_path="${new_path/%.exe/}"
40121
40122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40123
40124  # First separate the path from the arguments. This will split at the first
40125  # space.
40126  complete="$STRIP"
40127  path="${complete%% *}"
40128  tmp="$complete EOL"
40129  arguments="${tmp#* }"
40130
40131  # Input might be given as Windows format, start by converting to
40132  # unix format.
40133  new_path="$path"
40134
40135  windows_path="$new_path"
40136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40137    unix_path=`$CYGPATH -u "$windows_path"`
40138    new_path="$unix_path"
40139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40141    new_path="$unix_path"
40142  fi
40143
40144
40145  # Now try to locate executable using which
40146  new_path=`$WHICH "$new_path" 2> /dev/null`
40147
40148  if test "x$new_path" = x; then
40149    # Oops. Which didn't find the executable.
40150    # The splitting of arguments from the executable at a space might have been incorrect,
40151    # since paths with space are more likely in Windows. Give it another try with the whole
40152    # argument.
40153    path="$complete"
40154    arguments="EOL"
40155    new_path="$path"
40156
40157  windows_path="$new_path"
40158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40159    unix_path=`$CYGPATH -u "$windows_path"`
40160    new_path="$unix_path"
40161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40163    new_path="$unix_path"
40164  fi
40165
40166
40167    new_path=`$WHICH "$new_path" 2> /dev/null`
40168    # bat and cmd files are not always considered executable in MSYS causing which
40169    # to not find them
40170    if test "x$new_path" = x \
40171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40173      new_path="$path"
40174
40175  windows_path="$new_path"
40176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40177    unix_path=`$CYGPATH -u "$windows_path"`
40178    new_path="$unix_path"
40179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40181    new_path="$unix_path"
40182  fi
40183
40184    fi
40185
40186    if test "x$new_path" = x; then
40187      # It's still not found. Now this is an unrecoverable error.
40188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40189$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40190      has_space=`$ECHO "$complete" | $GREP " "`
40191      if test "x$has_space" != x; then
40192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40194      fi
40195      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40196    fi
40197  fi
40198
40199  # Now new_path has a complete unix path to the binary
40200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40201    # Keep paths in /bin as-is, but remove trailing .exe if any
40202    new_path="${new_path/%.exe/}"
40203    # Do not save /bin paths to all_fixpath_prefixes!
40204  else
40205    # Not in mixed or Windows style, start by that.
40206    new_path=`cmd //c echo $new_path`
40207
40208  input_path="$new_path"
40209  # Check if we need to convert this using DOS-style short mode. If the path
40210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40211  # take no chances and rewrite it.
40212  # Note: m4 eats our [], so we need to use [ and ] instead.
40213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40214  if test "x$has_forbidden_chars" != x; then
40215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40217  fi
40218
40219    # Output is in $new_path
40220
40221  windows_path="$new_path"
40222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40223    unix_path=`$CYGPATH -u "$windows_path"`
40224    new_path="$unix_path"
40225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40227    new_path="$unix_path"
40228  fi
40229
40230    # remove trailing .exe if any
40231    new_path="${new_path/%.exe/}"
40232
40233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40235  fi
40236
40237    else
40238      # We're on a unix platform. Hooray! :)
40239      # First separate the path from the arguments. This will split at the first
40240      # space.
40241      complete="$STRIP"
40242      path="${complete%% *}"
40243      tmp="$complete EOL"
40244      arguments="${tmp#* }"
40245
40246      # Cannot rely on the command "which" here since it doesn't always work.
40247      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40248      if test -z "$is_absolute_path"; then
40249        # Path to executable is not absolute. Find it.
40250        IFS_save="$IFS"
40251        IFS=:
40252        for p in $PATH; do
40253          if test -f "$p/$path" && test -x "$p/$path"; then
40254            new_path="$p/$path"
40255            break
40256          fi
40257        done
40258        IFS="$IFS_save"
40259      else
40260        # This is an absolute path, we can use it without further modifications.
40261        new_path="$path"
40262      fi
40263
40264      if test "x$new_path" = x; then
40265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40266$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40267        has_space=`$ECHO "$complete" | $GREP " "`
40268        if test "x$has_space" != x; then
40269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40271        fi
40272        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40273      fi
40274    fi
40275
40276    # Now join together the path and the arguments once again
40277    if test "x$arguments" != xEOL; then
40278      new_complete="$new_path ${arguments% *}"
40279    else
40280      new_complete="$new_path"
40281    fi
40282
40283    if test "x$complete" != "x$new_complete"; then
40284      STRIP="$new_complete"
40285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40286$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40287    fi
40288  fi
40289
40290
40291
40292  # Publish this variable in the help.
40293
40294
40295  if [ -z "${NM+x}" ]; then
40296    # The variable is not set by user, try to locate tool using the code snippet
40297    for ac_prog in nm
40298do
40299  # Extract the first word of "$ac_prog", so it can be a program name with args.
40300set dummy $ac_prog; ac_word=$2
40301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40302$as_echo_n "checking for $ac_word... " >&6; }
40303if ${ac_cv_path_NM+:} false; then :
40304  $as_echo_n "(cached) " >&6
40305else
40306  case $NM in
40307  [\\/]* | ?:[\\/]*)
40308  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40309  ;;
40310  *)
40311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40312for as_dir in $PATH
40313do
40314  IFS=$as_save_IFS
40315  test -z "$as_dir" && as_dir=.
40316    for ac_exec_ext in '' $ac_executable_extensions; do
40317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40318    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40320    break 2
40321  fi
40322done
40323  done
40324IFS=$as_save_IFS
40325
40326  ;;
40327esac
40328fi
40329NM=$ac_cv_path_NM
40330if test -n "$NM"; then
40331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40332$as_echo "$NM" >&6; }
40333else
40334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40335$as_echo "no" >&6; }
40336fi
40337
40338
40339  test -n "$NM" && break
40340done
40341
40342  else
40343    # The variable is set, but is it from the command line or the environment?
40344
40345    # Try to remove the string !NM! from our list.
40346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40348      # If it failed, the variable was not from the command line. Ignore it,
40349      # but warn the user (except for BASH, which is always set by the calling BASH).
40350      if test "xNM" != xBASH; then
40351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40352$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40353      fi
40354      # Try to locate tool using the code snippet
40355      for ac_prog in nm
40356do
40357  # Extract the first word of "$ac_prog", so it can be a program name with args.
40358set dummy $ac_prog; ac_word=$2
40359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40360$as_echo_n "checking for $ac_word... " >&6; }
40361if ${ac_cv_path_NM+:} false; then :
40362  $as_echo_n "(cached) " >&6
40363else
40364  case $NM in
40365  [\\/]* | ?:[\\/]*)
40366  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40367  ;;
40368  *)
40369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40370for as_dir in $PATH
40371do
40372  IFS=$as_save_IFS
40373  test -z "$as_dir" && as_dir=.
40374    for ac_exec_ext in '' $ac_executable_extensions; do
40375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40376    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40378    break 2
40379  fi
40380done
40381  done
40382IFS=$as_save_IFS
40383
40384  ;;
40385esac
40386fi
40387NM=$ac_cv_path_NM
40388if test -n "$NM"; then
40389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40390$as_echo "$NM" >&6; }
40391else
40392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40393$as_echo "no" >&6; }
40394fi
40395
40396
40397  test -n "$NM" && break
40398done
40399
40400    else
40401      # If it succeeded, then it was overridden by the user. We will use it
40402      # for the tool.
40403
40404      # First remove it from the list of overridden variables, so we can test
40405      # for unknown variables in the end.
40406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40407
40408      # Check if we try to supply an empty value
40409      if test "x$NM" = x; then
40410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40411$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40413$as_echo_n "checking for NM... " >&6; }
40414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40415$as_echo "disabled" >&6; }
40416      else
40417        # Check if the provided tool contains a complete path.
40418        tool_specified="$NM"
40419        tool_basename="${tool_specified##*/}"
40420        if test "x$tool_basename" = "x$tool_specified"; then
40421          # A command without a complete path is provided, search $PATH.
40422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40423$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40424          # Extract the first word of "$tool_basename", so it can be a program name with args.
40425set dummy $tool_basename; ac_word=$2
40426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40427$as_echo_n "checking for $ac_word... " >&6; }
40428if ${ac_cv_path_NM+:} false; then :
40429  $as_echo_n "(cached) " >&6
40430else
40431  case $NM in
40432  [\\/]* | ?:[\\/]*)
40433  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40434  ;;
40435  *)
40436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40437for as_dir in $PATH
40438do
40439  IFS=$as_save_IFS
40440  test -z "$as_dir" && as_dir=.
40441    for ac_exec_ext in '' $ac_executable_extensions; do
40442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40443    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40445    break 2
40446  fi
40447done
40448  done
40449IFS=$as_save_IFS
40450
40451  ;;
40452esac
40453fi
40454NM=$ac_cv_path_NM
40455if test -n "$NM"; then
40456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40457$as_echo "$NM" >&6; }
40458else
40459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40460$as_echo "no" >&6; }
40461fi
40462
40463
40464          if test "x$NM" = x; then
40465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40466          fi
40467        else
40468          # Otherwise we believe it is a complete path. Use it as it is.
40469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40470$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40472$as_echo_n "checking for NM... " >&6; }
40473          if test ! -x "$tool_specified"; then
40474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40475$as_echo "not found" >&6; }
40476            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40477          fi
40478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40479$as_echo "$tool_specified" >&6; }
40480        fi
40481      fi
40482    fi
40483
40484  fi
40485
40486
40487
40488  # Only process if variable expands to non-empty
40489
40490  if test "x$NM" != x; then
40491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40492
40493  # First separate the path from the arguments. This will split at the first
40494  # space.
40495  complete="$NM"
40496  path="${complete%% *}"
40497  tmp="$complete EOL"
40498  arguments="${tmp#* }"
40499
40500  # Input might be given as Windows format, start by converting to
40501  # unix format.
40502  new_path=`$CYGPATH -u "$path"`
40503
40504  # Now try to locate executable using which
40505  new_path=`$WHICH "$new_path" 2> /dev/null`
40506  # bat and cmd files are not always considered executable in cygwin causing which
40507  # to not find them
40508  if test "x$new_path" = x \
40509      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40510      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40511    new_path=`$CYGPATH -u "$path"`
40512  fi
40513  if test "x$new_path" = x; then
40514    # Oops. Which didn't find the executable.
40515    # The splitting of arguments from the executable at a space might have been incorrect,
40516    # since paths with space are more likely in Windows. Give it another try with the whole
40517    # argument.
40518    path="$complete"
40519    arguments="EOL"
40520    new_path=`$CYGPATH -u "$path"`
40521    new_path=`$WHICH "$new_path" 2> /dev/null`
40522    # bat and cmd files are not always considered executable in cygwin causing which
40523    # to not find them
40524    if test "x$new_path" = x \
40525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40527      new_path=`$CYGPATH -u "$path"`
40528    fi
40529    if test "x$new_path" = x; then
40530      # It's still not found. Now this is an unrecoverable error.
40531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40532$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40533      has_space=`$ECHO "$complete" | $GREP " "`
40534      if test "x$has_space" != x; then
40535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40537      fi
40538      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40539    fi
40540  fi
40541
40542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40545  # "foo.exe" is OK but "foo" is an error.
40546  #
40547  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40548  # It is also a way to make sure we got the proper file name for the real test later on.
40549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40550  if test "x$test_shortpath" = x; then
40551    # Short path failed, file does not exist as specified.
40552    # Try adding .exe or .cmd
40553    if test -f "${new_path}.exe"; then
40554      input_to_shortpath="${new_path}.exe"
40555    elif test -f "${new_path}.cmd"; then
40556      input_to_shortpath="${new_path}.cmd"
40557    else
40558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40559$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40562      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40563    fi
40564  else
40565    input_to_shortpath="$new_path"
40566  fi
40567
40568  # Call helper function which possibly converts this using DOS-style short mode.
40569  # If so, the updated path is stored in $new_path.
40570  new_path="$input_to_shortpath"
40571
40572  input_path="$input_to_shortpath"
40573  # Check if we need to convert this using DOS-style short mode. If the path
40574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40575  # take no chances and rewrite it.
40576  # Note: m4 eats our [], so we need to use [ and ] instead.
40577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40578  if test "x$has_forbidden_chars" != x; then
40579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40583      # Going to short mode and back again did indeed matter. Since short mode is
40584      # case insensitive, let's make it lowercase to improve readability.
40585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40586      # Now convert it back to Unix-style (cygpath)
40587      input_path=`$CYGPATH -u "$shortmode_path"`
40588      new_path="$input_path"
40589    fi
40590  fi
40591
40592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40593  if test "x$test_cygdrive_prefix" = x; then
40594    # As a simple fix, exclude /usr/bin since it's not a real path.
40595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40597      # a path prefixed by /cygdrive for fixpath to work.
40598      new_path="$CYGWIN_ROOT_PATH$input_path"
40599    fi
40600  fi
40601
40602  # remove trailing .exe if any
40603  new_path="${new_path/%.exe/}"
40604
40605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40606
40607  # First separate the path from the arguments. This will split at the first
40608  # space.
40609  complete="$NM"
40610  path="${complete%% *}"
40611  tmp="$complete EOL"
40612  arguments="${tmp#* }"
40613
40614  # Input might be given as Windows format, start by converting to
40615  # unix format.
40616  new_path="$path"
40617
40618  windows_path="$new_path"
40619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40620    unix_path=`$CYGPATH -u "$windows_path"`
40621    new_path="$unix_path"
40622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40624    new_path="$unix_path"
40625  fi
40626
40627
40628  # Now try to locate executable using which
40629  new_path=`$WHICH "$new_path" 2> /dev/null`
40630
40631  if test "x$new_path" = x; then
40632    # Oops. Which didn't find the executable.
40633    # The splitting of arguments from the executable at a space might have been incorrect,
40634    # since paths with space are more likely in Windows. Give it another try with the whole
40635    # argument.
40636    path="$complete"
40637    arguments="EOL"
40638    new_path="$path"
40639
40640  windows_path="$new_path"
40641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40642    unix_path=`$CYGPATH -u "$windows_path"`
40643    new_path="$unix_path"
40644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40646    new_path="$unix_path"
40647  fi
40648
40649
40650    new_path=`$WHICH "$new_path" 2> /dev/null`
40651    # bat and cmd files are not always considered executable in MSYS causing which
40652    # to not find them
40653    if test "x$new_path" = x \
40654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40656      new_path="$path"
40657
40658  windows_path="$new_path"
40659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40660    unix_path=`$CYGPATH -u "$windows_path"`
40661    new_path="$unix_path"
40662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40664    new_path="$unix_path"
40665  fi
40666
40667    fi
40668
40669    if test "x$new_path" = x; then
40670      # It's still not found. Now this is an unrecoverable error.
40671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40672$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40673      has_space=`$ECHO "$complete" | $GREP " "`
40674      if test "x$has_space" != x; then
40675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40677      fi
40678      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40679    fi
40680  fi
40681
40682  # Now new_path has a complete unix path to the binary
40683  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40684    # Keep paths in /bin as-is, but remove trailing .exe if any
40685    new_path="${new_path/%.exe/}"
40686    # Do not save /bin paths to all_fixpath_prefixes!
40687  else
40688    # Not in mixed or Windows style, start by that.
40689    new_path=`cmd //c echo $new_path`
40690
40691  input_path="$new_path"
40692  # Check if we need to convert this using DOS-style short mode. If the path
40693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40694  # take no chances and rewrite it.
40695  # Note: m4 eats our [], so we need to use [ and ] instead.
40696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40697  if test "x$has_forbidden_chars" != x; then
40698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40700  fi
40701
40702    # Output is in $new_path
40703
40704  windows_path="$new_path"
40705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40706    unix_path=`$CYGPATH -u "$windows_path"`
40707    new_path="$unix_path"
40708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40710    new_path="$unix_path"
40711  fi
40712
40713    # remove trailing .exe if any
40714    new_path="${new_path/%.exe/}"
40715
40716    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40717    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40718  fi
40719
40720    else
40721      # We're on a unix platform. Hooray! :)
40722      # First separate the path from the arguments. This will split at the first
40723      # space.
40724      complete="$NM"
40725      path="${complete%% *}"
40726      tmp="$complete EOL"
40727      arguments="${tmp#* }"
40728
40729      # Cannot rely on the command "which" here since it doesn't always work.
40730      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40731      if test -z "$is_absolute_path"; then
40732        # Path to executable is not absolute. Find it.
40733        IFS_save="$IFS"
40734        IFS=:
40735        for p in $PATH; do
40736          if test -f "$p/$path" && test -x "$p/$path"; then
40737            new_path="$p/$path"
40738            break
40739          fi
40740        done
40741        IFS="$IFS_save"
40742      else
40743        # This is an absolute path, we can use it without further modifications.
40744        new_path="$path"
40745      fi
40746
40747      if test "x$new_path" = x; then
40748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40749$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40750        has_space=`$ECHO "$complete" | $GREP " "`
40751        if test "x$has_space" != x; then
40752          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40754        fi
40755        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40756      fi
40757    fi
40758
40759    # Now join together the path and the arguments once again
40760    if test "x$arguments" != xEOL; then
40761      new_complete="$new_path ${arguments% *}"
40762    else
40763      new_complete="$new_path"
40764    fi
40765
40766    if test "x$complete" != "x$new_complete"; then
40767      NM="$new_complete"
40768      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40769$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40770    fi
40771  fi
40772
40773
40774
40775  # Publish this variable in the help.
40776
40777
40778  if [ -z "${GNM+x}" ]; then
40779    # The variable is not set by user, try to locate tool using the code snippet
40780    for ac_prog in gnm
40781do
40782  # Extract the first word of "$ac_prog", so it can be a program name with args.
40783set dummy $ac_prog; ac_word=$2
40784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40785$as_echo_n "checking for $ac_word... " >&6; }
40786if ${ac_cv_path_GNM+:} false; then :
40787  $as_echo_n "(cached) " >&6
40788else
40789  case $GNM in
40790  [\\/]* | ?:[\\/]*)
40791  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40792  ;;
40793  *)
40794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40795for as_dir in $PATH
40796do
40797  IFS=$as_save_IFS
40798  test -z "$as_dir" && as_dir=.
40799    for ac_exec_ext in '' $ac_executable_extensions; do
40800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40801    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40803    break 2
40804  fi
40805done
40806  done
40807IFS=$as_save_IFS
40808
40809  ;;
40810esac
40811fi
40812GNM=$ac_cv_path_GNM
40813if test -n "$GNM"; then
40814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40815$as_echo "$GNM" >&6; }
40816else
40817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40818$as_echo "no" >&6; }
40819fi
40820
40821
40822  test -n "$GNM" && break
40823done
40824
40825  else
40826    # The variable is set, but is it from the command line or the environment?
40827
40828    # Try to remove the string !GNM! from our list.
40829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40831      # If it failed, the variable was not from the command line. Ignore it,
40832      # but warn the user (except for BASH, which is always set by the calling BASH).
40833      if test "xGNM" != xBASH; then
40834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40835$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40836      fi
40837      # Try to locate tool using the code snippet
40838      for ac_prog in gnm
40839do
40840  # Extract the first word of "$ac_prog", so it can be a program name with args.
40841set dummy $ac_prog; ac_word=$2
40842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40843$as_echo_n "checking for $ac_word... " >&6; }
40844if ${ac_cv_path_GNM+:} false; then :
40845  $as_echo_n "(cached) " >&6
40846else
40847  case $GNM in
40848  [\\/]* | ?:[\\/]*)
40849  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40850  ;;
40851  *)
40852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40853for as_dir in $PATH
40854do
40855  IFS=$as_save_IFS
40856  test -z "$as_dir" && as_dir=.
40857    for ac_exec_ext in '' $ac_executable_extensions; do
40858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40859    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40861    break 2
40862  fi
40863done
40864  done
40865IFS=$as_save_IFS
40866
40867  ;;
40868esac
40869fi
40870GNM=$ac_cv_path_GNM
40871if test -n "$GNM"; then
40872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40873$as_echo "$GNM" >&6; }
40874else
40875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40876$as_echo "no" >&6; }
40877fi
40878
40879
40880  test -n "$GNM" && break
40881done
40882
40883    else
40884      # If it succeeded, then it was overridden by the user. We will use it
40885      # for the tool.
40886
40887      # First remove it from the list of overridden variables, so we can test
40888      # for unknown variables in the end.
40889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40890
40891      # Check if we try to supply an empty value
40892      if test "x$GNM" = x; then
40893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40894$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40896$as_echo_n "checking for GNM... " >&6; }
40897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40898$as_echo "disabled" >&6; }
40899      else
40900        # Check if the provided tool contains a complete path.
40901        tool_specified="$GNM"
40902        tool_basename="${tool_specified##*/}"
40903        if test "x$tool_basename" = "x$tool_specified"; then
40904          # A command without a complete path is provided, search $PATH.
40905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40906$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40907          # Extract the first word of "$tool_basename", so it can be a program name with args.
40908set dummy $tool_basename; ac_word=$2
40909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40910$as_echo_n "checking for $ac_word... " >&6; }
40911if ${ac_cv_path_GNM+:} false; then :
40912  $as_echo_n "(cached) " >&6
40913else
40914  case $GNM in
40915  [\\/]* | ?:[\\/]*)
40916  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40917  ;;
40918  *)
40919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40920for as_dir in $PATH
40921do
40922  IFS=$as_save_IFS
40923  test -z "$as_dir" && as_dir=.
40924    for ac_exec_ext in '' $ac_executable_extensions; do
40925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40926    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40928    break 2
40929  fi
40930done
40931  done
40932IFS=$as_save_IFS
40933
40934  ;;
40935esac
40936fi
40937GNM=$ac_cv_path_GNM
40938if test -n "$GNM"; then
40939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40940$as_echo "$GNM" >&6; }
40941else
40942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40943$as_echo "no" >&6; }
40944fi
40945
40946
40947          if test "x$GNM" = x; then
40948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40949          fi
40950        else
40951          # Otherwise we believe it is a complete path. Use it as it is.
40952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40953$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40955$as_echo_n "checking for GNM... " >&6; }
40956          if test ! -x "$tool_specified"; then
40957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40958$as_echo "not found" >&6; }
40959            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40960          fi
40961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40962$as_echo "$tool_specified" >&6; }
40963        fi
40964      fi
40965    fi
40966
40967  fi
40968
40969
40970
40971  # Only process if variable expands to non-empty
40972
40973  if test "x$GNM" != x; then
40974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40975
40976  # First separate the path from the arguments. This will split at the first
40977  # space.
40978  complete="$GNM"
40979  path="${complete%% *}"
40980  tmp="$complete EOL"
40981  arguments="${tmp#* }"
40982
40983  # Input might be given as Windows format, start by converting to
40984  # unix format.
40985  new_path=`$CYGPATH -u "$path"`
40986
40987  # Now try to locate executable using which
40988  new_path=`$WHICH "$new_path" 2> /dev/null`
40989  # bat and cmd files are not always considered executable in cygwin causing which
40990  # to not find them
40991  if test "x$new_path" = x \
40992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40994    new_path=`$CYGPATH -u "$path"`
40995  fi
40996  if test "x$new_path" = x; then
40997    # Oops. Which didn't find the executable.
40998    # The splitting of arguments from the executable at a space might have been incorrect,
40999    # since paths with space are more likely in Windows. Give it another try with the whole
41000    # argument.
41001    path="$complete"
41002    arguments="EOL"
41003    new_path=`$CYGPATH -u "$path"`
41004    new_path=`$WHICH "$new_path" 2> /dev/null`
41005    # bat and cmd files are not always considered executable in cygwin causing which
41006    # to not find them
41007    if test "x$new_path" = x \
41008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41010      new_path=`$CYGPATH -u "$path"`
41011    fi
41012    if test "x$new_path" = x; then
41013      # It's still not found. Now this is an unrecoverable error.
41014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41015$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41016      has_space=`$ECHO "$complete" | $GREP " "`
41017      if test "x$has_space" != x; then
41018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41020      fi
41021      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41022    fi
41023  fi
41024
41025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41028  # "foo.exe" is OK but "foo" is an error.
41029  #
41030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41031  # It is also a way to make sure we got the proper file name for the real test later on.
41032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41033  if test "x$test_shortpath" = x; then
41034    # Short path failed, file does not exist as specified.
41035    # Try adding .exe or .cmd
41036    if test -f "${new_path}.exe"; then
41037      input_to_shortpath="${new_path}.exe"
41038    elif test -f "${new_path}.cmd"; then
41039      input_to_shortpath="${new_path}.cmd"
41040    else
41041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41042$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41045      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41046    fi
41047  else
41048    input_to_shortpath="$new_path"
41049  fi
41050
41051  # Call helper function which possibly converts this using DOS-style short mode.
41052  # If so, the updated path is stored in $new_path.
41053  new_path="$input_to_shortpath"
41054
41055  input_path="$input_to_shortpath"
41056  # Check if we need to convert this using DOS-style short mode. If the path
41057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41058  # take no chances and rewrite it.
41059  # Note: m4 eats our [], so we need to use [ and ] instead.
41060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41061  if test "x$has_forbidden_chars" != x; then
41062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41066      # Going to short mode and back again did indeed matter. Since short mode is
41067      # case insensitive, let's make it lowercase to improve readability.
41068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41069      # Now convert it back to Unix-style (cygpath)
41070      input_path=`$CYGPATH -u "$shortmode_path"`
41071      new_path="$input_path"
41072    fi
41073  fi
41074
41075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41076  if test "x$test_cygdrive_prefix" = x; then
41077    # As a simple fix, exclude /usr/bin since it's not a real path.
41078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41080      # a path prefixed by /cygdrive for fixpath to work.
41081      new_path="$CYGWIN_ROOT_PATH$input_path"
41082    fi
41083  fi
41084
41085  # remove trailing .exe if any
41086  new_path="${new_path/%.exe/}"
41087
41088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41089
41090  # First separate the path from the arguments. This will split at the first
41091  # space.
41092  complete="$GNM"
41093  path="${complete%% *}"
41094  tmp="$complete EOL"
41095  arguments="${tmp#* }"
41096
41097  # Input might be given as Windows format, start by converting to
41098  # unix format.
41099  new_path="$path"
41100
41101  windows_path="$new_path"
41102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41103    unix_path=`$CYGPATH -u "$windows_path"`
41104    new_path="$unix_path"
41105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41107    new_path="$unix_path"
41108  fi
41109
41110
41111  # Now try to locate executable using which
41112  new_path=`$WHICH "$new_path" 2> /dev/null`
41113
41114  if test "x$new_path" = x; then
41115    # Oops. Which didn't find the executable.
41116    # The splitting of arguments from the executable at a space might have been incorrect,
41117    # since paths with space are more likely in Windows. Give it another try with the whole
41118    # argument.
41119    path="$complete"
41120    arguments="EOL"
41121    new_path="$path"
41122
41123  windows_path="$new_path"
41124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41125    unix_path=`$CYGPATH -u "$windows_path"`
41126    new_path="$unix_path"
41127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41129    new_path="$unix_path"
41130  fi
41131
41132
41133    new_path=`$WHICH "$new_path" 2> /dev/null`
41134    # bat and cmd files are not always considered executable in MSYS causing which
41135    # to not find them
41136    if test "x$new_path" = x \
41137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41139      new_path="$path"
41140
41141  windows_path="$new_path"
41142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41143    unix_path=`$CYGPATH -u "$windows_path"`
41144    new_path="$unix_path"
41145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41147    new_path="$unix_path"
41148  fi
41149
41150    fi
41151
41152    if test "x$new_path" = x; then
41153      # It's still not found. Now this is an unrecoverable error.
41154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41155$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41156      has_space=`$ECHO "$complete" | $GREP " "`
41157      if test "x$has_space" != x; then
41158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41160      fi
41161      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41162    fi
41163  fi
41164
41165  # Now new_path has a complete unix path to the binary
41166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41167    # Keep paths in /bin as-is, but remove trailing .exe if any
41168    new_path="${new_path/%.exe/}"
41169    # Do not save /bin paths to all_fixpath_prefixes!
41170  else
41171    # Not in mixed or Windows style, start by that.
41172    new_path=`cmd //c echo $new_path`
41173
41174  input_path="$new_path"
41175  # Check if we need to convert this using DOS-style short mode. If the path
41176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41177  # take no chances and rewrite it.
41178  # Note: m4 eats our [], so we need to use [ and ] instead.
41179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41180  if test "x$has_forbidden_chars" != x; then
41181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41183  fi
41184
41185    # Output is in $new_path
41186
41187  windows_path="$new_path"
41188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41189    unix_path=`$CYGPATH -u "$windows_path"`
41190    new_path="$unix_path"
41191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41193    new_path="$unix_path"
41194  fi
41195
41196    # remove trailing .exe if any
41197    new_path="${new_path/%.exe/}"
41198
41199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41201  fi
41202
41203    else
41204      # We're on a unix platform. Hooray! :)
41205      # First separate the path from the arguments. This will split at the first
41206      # space.
41207      complete="$GNM"
41208      path="${complete%% *}"
41209      tmp="$complete EOL"
41210      arguments="${tmp#* }"
41211
41212      # Cannot rely on the command "which" here since it doesn't always work.
41213      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41214      if test -z "$is_absolute_path"; then
41215        # Path to executable is not absolute. Find it.
41216        IFS_save="$IFS"
41217        IFS=:
41218        for p in $PATH; do
41219          if test -f "$p/$path" && test -x "$p/$path"; then
41220            new_path="$p/$path"
41221            break
41222          fi
41223        done
41224        IFS="$IFS_save"
41225      else
41226        # This is an absolute path, we can use it without further modifications.
41227        new_path="$path"
41228      fi
41229
41230      if test "x$new_path" = x; then
41231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41232$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41233        has_space=`$ECHO "$complete" | $GREP " "`
41234        if test "x$has_space" != x; then
41235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41237        fi
41238        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41239      fi
41240    fi
41241
41242    # Now join together the path and the arguments once again
41243    if test "x$arguments" != xEOL; then
41244      new_complete="$new_path ${arguments% *}"
41245    else
41246      new_complete="$new_path"
41247    fi
41248
41249    if test "x$complete" != "x$new_complete"; then
41250      GNM="$new_complete"
41251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41252$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41253    fi
41254  fi
41255
41256  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41257    # FIXME: we should unify this with the solaris case above.
41258
41259
41260  # Publish this variable in the help.
41261
41262
41263  if [ -z "${STRIP+x}" ]; then
41264    # The variable is not set by user, try to locate tool using the code snippet
41265    if test -n "$ac_tool_prefix"; then
41266  for ac_prog in strip
41267  do
41268    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41269set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41271$as_echo_n "checking for $ac_word... " >&6; }
41272if ${ac_cv_prog_STRIP+:} false; then :
41273  $as_echo_n "(cached) " >&6
41274else
41275  if test -n "$STRIP"; then
41276  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41277else
41278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41279for as_dir in $PATH
41280do
41281  IFS=$as_save_IFS
41282  test -z "$as_dir" && as_dir=.
41283    for ac_exec_ext in '' $ac_executable_extensions; do
41284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41285    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41287    break 2
41288  fi
41289done
41290  done
41291IFS=$as_save_IFS
41292
41293fi
41294fi
41295STRIP=$ac_cv_prog_STRIP
41296if test -n "$STRIP"; then
41297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41298$as_echo "$STRIP" >&6; }
41299else
41300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41301$as_echo "no" >&6; }
41302fi
41303
41304
41305    test -n "$STRIP" && break
41306  done
41307fi
41308if test -z "$STRIP"; then
41309  ac_ct_STRIP=$STRIP
41310  for ac_prog in strip
41311do
41312  # Extract the first word of "$ac_prog", so it can be a program name with args.
41313set dummy $ac_prog; ac_word=$2
41314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41315$as_echo_n "checking for $ac_word... " >&6; }
41316if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41317  $as_echo_n "(cached) " >&6
41318else
41319  if test -n "$ac_ct_STRIP"; then
41320  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41321else
41322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41323for as_dir in $PATH
41324do
41325  IFS=$as_save_IFS
41326  test -z "$as_dir" && as_dir=.
41327    for ac_exec_ext in '' $ac_executable_extensions; do
41328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41329    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41331    break 2
41332  fi
41333done
41334  done
41335IFS=$as_save_IFS
41336
41337fi
41338fi
41339ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41340if test -n "$ac_ct_STRIP"; then
41341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41342$as_echo "$ac_ct_STRIP" >&6; }
41343else
41344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41345$as_echo "no" >&6; }
41346fi
41347
41348
41349  test -n "$ac_ct_STRIP" && break
41350done
41351
41352  if test "x$ac_ct_STRIP" = x; then
41353    STRIP=""
41354  else
41355    case $cross_compiling:$ac_tool_warned in
41356yes:)
41357{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41358$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41359ac_tool_warned=yes ;;
41360esac
41361    STRIP=$ac_ct_STRIP
41362  fi
41363fi
41364
41365  else
41366    # The variable is set, but is it from the command line or the environment?
41367
41368    # Try to remove the string !STRIP! from our list.
41369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41371      # If it failed, the variable was not from the command line. Ignore it,
41372      # but warn the user (except for BASH, which is always set by the calling BASH).
41373      if test "xSTRIP" != xBASH; then
41374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41375$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41376      fi
41377      # Try to locate tool using the code snippet
41378      if test -n "$ac_tool_prefix"; then
41379  for ac_prog in strip
41380  do
41381    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41382set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41384$as_echo_n "checking for $ac_word... " >&6; }
41385if ${ac_cv_prog_STRIP+:} false; then :
41386  $as_echo_n "(cached) " >&6
41387else
41388  if test -n "$STRIP"; then
41389  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41390else
41391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41392for as_dir in $PATH
41393do
41394  IFS=$as_save_IFS
41395  test -z "$as_dir" && as_dir=.
41396    for ac_exec_ext in '' $ac_executable_extensions; do
41397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41398    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41400    break 2
41401  fi
41402done
41403  done
41404IFS=$as_save_IFS
41405
41406fi
41407fi
41408STRIP=$ac_cv_prog_STRIP
41409if test -n "$STRIP"; then
41410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41411$as_echo "$STRIP" >&6; }
41412else
41413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41414$as_echo "no" >&6; }
41415fi
41416
41417
41418    test -n "$STRIP" && break
41419  done
41420fi
41421if test -z "$STRIP"; then
41422  ac_ct_STRIP=$STRIP
41423  for ac_prog in strip
41424do
41425  # Extract the first word of "$ac_prog", so it can be a program name with args.
41426set dummy $ac_prog; ac_word=$2
41427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41428$as_echo_n "checking for $ac_word... " >&6; }
41429if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41430  $as_echo_n "(cached) " >&6
41431else
41432  if test -n "$ac_ct_STRIP"; then
41433  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41434else
41435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41436for as_dir in $PATH
41437do
41438  IFS=$as_save_IFS
41439  test -z "$as_dir" && as_dir=.
41440    for ac_exec_ext in '' $ac_executable_extensions; do
41441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41442    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41444    break 2
41445  fi
41446done
41447  done
41448IFS=$as_save_IFS
41449
41450fi
41451fi
41452ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41453if test -n "$ac_ct_STRIP"; then
41454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41455$as_echo "$ac_ct_STRIP" >&6; }
41456else
41457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41458$as_echo "no" >&6; }
41459fi
41460
41461
41462  test -n "$ac_ct_STRIP" && break
41463done
41464
41465  if test "x$ac_ct_STRIP" = x; then
41466    STRIP=""
41467  else
41468    case $cross_compiling:$ac_tool_warned in
41469yes:)
41470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41472ac_tool_warned=yes ;;
41473esac
41474    STRIP=$ac_ct_STRIP
41475  fi
41476fi
41477
41478    else
41479      # If it succeeded, then it was overridden by the user. We will use it
41480      # for the tool.
41481
41482      # First remove it from the list of overridden variables, so we can test
41483      # for unknown variables in the end.
41484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41485
41486      # Check if we try to supply an empty value
41487      if test "x$STRIP" = x; then
41488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41489$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41491$as_echo_n "checking for STRIP... " >&6; }
41492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41493$as_echo "disabled" >&6; }
41494      else
41495        # Check if the provided tool contains a complete path.
41496        tool_specified="$STRIP"
41497        tool_basename="${tool_specified##*/}"
41498        if test "x$tool_basename" = "x$tool_specified"; then
41499          # A command without a complete path is provided, search $PATH.
41500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41501$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41502          # Extract the first word of "$tool_basename", so it can be a program name with args.
41503set dummy $tool_basename; ac_word=$2
41504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41505$as_echo_n "checking for $ac_word... " >&6; }
41506if ${ac_cv_path_STRIP+:} false; then :
41507  $as_echo_n "(cached) " >&6
41508else
41509  case $STRIP in
41510  [\\/]* | ?:[\\/]*)
41511  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41512  ;;
41513  *)
41514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41515for as_dir in $PATH
41516do
41517  IFS=$as_save_IFS
41518  test -z "$as_dir" && as_dir=.
41519    for ac_exec_ext in '' $ac_executable_extensions; do
41520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41521    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41523    break 2
41524  fi
41525done
41526  done
41527IFS=$as_save_IFS
41528
41529  ;;
41530esac
41531fi
41532STRIP=$ac_cv_path_STRIP
41533if test -n "$STRIP"; then
41534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41535$as_echo "$STRIP" >&6; }
41536else
41537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41538$as_echo "no" >&6; }
41539fi
41540
41541
41542          if test "x$STRIP" = x; then
41543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41544          fi
41545        else
41546          # Otherwise we believe it is a complete path. Use it as it is.
41547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41548$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41550$as_echo_n "checking for STRIP... " >&6; }
41551          if test ! -x "$tool_specified"; then
41552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41553$as_echo "not found" >&6; }
41554            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41555          fi
41556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41557$as_echo "$tool_specified" >&6; }
41558        fi
41559      fi
41560    fi
41561
41562  fi
41563
41564
41565
41566  # Only process if variable expands to non-empty
41567
41568  if test "x$STRIP" != x; then
41569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41570
41571  # First separate the path from the arguments. This will split at the first
41572  # space.
41573  complete="$STRIP"
41574  path="${complete%% *}"
41575  tmp="$complete EOL"
41576  arguments="${tmp#* }"
41577
41578  # Input might be given as Windows format, start by converting to
41579  # unix format.
41580  new_path=`$CYGPATH -u "$path"`
41581
41582  # Now try to locate executable using which
41583  new_path=`$WHICH "$new_path" 2> /dev/null`
41584  # bat and cmd files are not always considered executable in cygwin causing which
41585  # to not find them
41586  if test "x$new_path" = x \
41587      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41588      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41589    new_path=`$CYGPATH -u "$path"`
41590  fi
41591  if test "x$new_path" = x; then
41592    # Oops. Which didn't find the executable.
41593    # The splitting of arguments from the executable at a space might have been incorrect,
41594    # since paths with space are more likely in Windows. Give it another try with the whole
41595    # argument.
41596    path="$complete"
41597    arguments="EOL"
41598    new_path=`$CYGPATH -u "$path"`
41599    new_path=`$WHICH "$new_path" 2> /dev/null`
41600    # bat and cmd files are not always considered executable in cygwin causing which
41601    # to not find them
41602    if test "x$new_path" = x \
41603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41605      new_path=`$CYGPATH -u "$path"`
41606    fi
41607    if test "x$new_path" = x; then
41608      # It's still not found. Now this is an unrecoverable error.
41609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41610$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41611      has_space=`$ECHO "$complete" | $GREP " "`
41612      if test "x$has_space" != x; then
41613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41615      fi
41616      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41617    fi
41618  fi
41619
41620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41623  # "foo.exe" is OK but "foo" is an error.
41624  #
41625  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41626  # It is also a way to make sure we got the proper file name for the real test later on.
41627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41628  if test "x$test_shortpath" = x; then
41629    # Short path failed, file does not exist as specified.
41630    # Try adding .exe or .cmd
41631    if test -f "${new_path}.exe"; then
41632      input_to_shortpath="${new_path}.exe"
41633    elif test -f "${new_path}.cmd"; then
41634      input_to_shortpath="${new_path}.cmd"
41635    else
41636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41637$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41640      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41641    fi
41642  else
41643    input_to_shortpath="$new_path"
41644  fi
41645
41646  # Call helper function which possibly converts this using DOS-style short mode.
41647  # If so, the updated path is stored in $new_path.
41648  new_path="$input_to_shortpath"
41649
41650  input_path="$input_to_shortpath"
41651  # Check if we need to convert this using DOS-style short mode. If the path
41652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41653  # take no chances and rewrite it.
41654  # Note: m4 eats our [], so we need to use [ and ] instead.
41655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41656  if test "x$has_forbidden_chars" != x; then
41657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41661      # Going to short mode and back again did indeed matter. Since short mode is
41662      # case insensitive, let's make it lowercase to improve readability.
41663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41664      # Now convert it back to Unix-style (cygpath)
41665      input_path=`$CYGPATH -u "$shortmode_path"`
41666      new_path="$input_path"
41667    fi
41668  fi
41669
41670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41671  if test "x$test_cygdrive_prefix" = x; then
41672    # As a simple fix, exclude /usr/bin since it's not a real path.
41673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41675      # a path prefixed by /cygdrive for fixpath to work.
41676      new_path="$CYGWIN_ROOT_PATH$input_path"
41677    fi
41678  fi
41679
41680  # remove trailing .exe if any
41681  new_path="${new_path/%.exe/}"
41682
41683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41684
41685  # First separate the path from the arguments. This will split at the first
41686  # space.
41687  complete="$STRIP"
41688  path="${complete%% *}"
41689  tmp="$complete EOL"
41690  arguments="${tmp#* }"
41691
41692  # Input might be given as Windows format, start by converting to
41693  # unix format.
41694  new_path="$path"
41695
41696  windows_path="$new_path"
41697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41698    unix_path=`$CYGPATH -u "$windows_path"`
41699    new_path="$unix_path"
41700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41702    new_path="$unix_path"
41703  fi
41704
41705
41706  # Now try to locate executable using which
41707  new_path=`$WHICH "$new_path" 2> /dev/null`
41708
41709  if test "x$new_path" = x; then
41710    # Oops. Which didn't find the executable.
41711    # The splitting of arguments from the executable at a space might have been incorrect,
41712    # since paths with space are more likely in Windows. Give it another try with the whole
41713    # argument.
41714    path="$complete"
41715    arguments="EOL"
41716    new_path="$path"
41717
41718  windows_path="$new_path"
41719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41720    unix_path=`$CYGPATH -u "$windows_path"`
41721    new_path="$unix_path"
41722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41724    new_path="$unix_path"
41725  fi
41726
41727
41728    new_path=`$WHICH "$new_path" 2> /dev/null`
41729    # bat and cmd files are not always considered executable in MSYS causing which
41730    # to not find them
41731    if test "x$new_path" = x \
41732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41734      new_path="$path"
41735
41736  windows_path="$new_path"
41737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41738    unix_path=`$CYGPATH -u "$windows_path"`
41739    new_path="$unix_path"
41740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41742    new_path="$unix_path"
41743  fi
41744
41745    fi
41746
41747    if test "x$new_path" = x; then
41748      # It's still not found. Now this is an unrecoverable error.
41749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41750$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41751      has_space=`$ECHO "$complete" | $GREP " "`
41752      if test "x$has_space" != x; then
41753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41755      fi
41756      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41757    fi
41758  fi
41759
41760  # Now new_path has a complete unix path to the binary
41761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41762    # Keep paths in /bin as-is, but remove trailing .exe if any
41763    new_path="${new_path/%.exe/}"
41764    # Do not save /bin paths to all_fixpath_prefixes!
41765  else
41766    # Not in mixed or Windows style, start by that.
41767    new_path=`cmd //c echo $new_path`
41768
41769  input_path="$new_path"
41770  # Check if we need to convert this using DOS-style short mode. If the path
41771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41772  # take no chances and rewrite it.
41773  # Note: m4 eats our [], so we need to use [ and ] instead.
41774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41775  if test "x$has_forbidden_chars" != x; then
41776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41778  fi
41779
41780    # Output is in $new_path
41781
41782  windows_path="$new_path"
41783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41784    unix_path=`$CYGPATH -u "$windows_path"`
41785    new_path="$unix_path"
41786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41788    new_path="$unix_path"
41789  fi
41790
41791    # remove trailing .exe if any
41792    new_path="${new_path/%.exe/}"
41793
41794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41796  fi
41797
41798    else
41799      # We're on a unix platform. Hooray! :)
41800      # First separate the path from the arguments. This will split at the first
41801      # space.
41802      complete="$STRIP"
41803      path="${complete%% *}"
41804      tmp="$complete EOL"
41805      arguments="${tmp#* }"
41806
41807      # Cannot rely on the command "which" here since it doesn't always work.
41808      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41809      if test -z "$is_absolute_path"; then
41810        # Path to executable is not absolute. Find it.
41811        IFS_save="$IFS"
41812        IFS=:
41813        for p in $PATH; do
41814          if test -f "$p/$path" && test -x "$p/$path"; then
41815            new_path="$p/$path"
41816            break
41817          fi
41818        done
41819        IFS="$IFS_save"
41820      else
41821        # This is an absolute path, we can use it without further modifications.
41822        new_path="$path"
41823      fi
41824
41825      if test "x$new_path" = x; then
41826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41827$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41828        has_space=`$ECHO "$complete" | $GREP " "`
41829        if test "x$has_space" != x; then
41830          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41832        fi
41833        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41834      fi
41835    fi
41836
41837    # Now join together the path and the arguments once again
41838    if test "x$arguments" != xEOL; then
41839      new_complete="$new_path ${arguments% *}"
41840    else
41841      new_complete="$new_path"
41842    fi
41843
41844    if test "x$complete" != "x$new_complete"; then
41845      STRIP="$new_complete"
41846      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41847$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41848    fi
41849  fi
41850
41851    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41852
41853
41854  # Publish this variable in the help.
41855
41856
41857  if [ -z "${NM+x}" ]; then
41858    # The variable is not set by user, try to locate tool using the code snippet
41859    if test -n "$ac_tool_prefix"; then
41860  for ac_prog in nm gcc-nm
41861  do
41862    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41863set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41865$as_echo_n "checking for $ac_word... " >&6; }
41866if ${ac_cv_prog_NM+:} false; then :
41867  $as_echo_n "(cached) " >&6
41868else
41869  if test -n "$NM"; then
41870  ac_cv_prog_NM="$NM" # Let the user override the test.
41871else
41872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41873for as_dir in $PATH
41874do
41875  IFS=$as_save_IFS
41876  test -z "$as_dir" && as_dir=.
41877    for ac_exec_ext in '' $ac_executable_extensions; do
41878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41879    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41881    break 2
41882  fi
41883done
41884  done
41885IFS=$as_save_IFS
41886
41887fi
41888fi
41889NM=$ac_cv_prog_NM
41890if test -n "$NM"; then
41891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41892$as_echo "$NM" >&6; }
41893else
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41895$as_echo "no" >&6; }
41896fi
41897
41898
41899    test -n "$NM" && break
41900  done
41901fi
41902if test -z "$NM"; then
41903  ac_ct_NM=$NM
41904  for ac_prog in nm gcc-nm
41905do
41906  # Extract the first word of "$ac_prog", so it can be a program name with args.
41907set dummy $ac_prog; ac_word=$2
41908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41909$as_echo_n "checking for $ac_word... " >&6; }
41910if ${ac_cv_prog_ac_ct_NM+:} false; then :
41911  $as_echo_n "(cached) " >&6
41912else
41913  if test -n "$ac_ct_NM"; then
41914  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41915else
41916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41917for as_dir in $PATH
41918do
41919  IFS=$as_save_IFS
41920  test -z "$as_dir" && as_dir=.
41921    for ac_exec_ext in '' $ac_executable_extensions; do
41922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41923    ac_cv_prog_ac_ct_NM="$ac_prog"
41924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41925    break 2
41926  fi
41927done
41928  done
41929IFS=$as_save_IFS
41930
41931fi
41932fi
41933ac_ct_NM=$ac_cv_prog_ac_ct_NM
41934if test -n "$ac_ct_NM"; then
41935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41936$as_echo "$ac_ct_NM" >&6; }
41937else
41938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41939$as_echo "no" >&6; }
41940fi
41941
41942
41943  test -n "$ac_ct_NM" && break
41944done
41945
41946  if test "x$ac_ct_NM" = x; then
41947    NM=""
41948  else
41949    case $cross_compiling:$ac_tool_warned in
41950yes:)
41951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41953ac_tool_warned=yes ;;
41954esac
41955    NM=$ac_ct_NM
41956  fi
41957fi
41958
41959  else
41960    # The variable is set, but is it from the command line or the environment?
41961
41962    # Try to remove the string !NM! from our list.
41963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41965      # If it failed, the variable was not from the command line. Ignore it,
41966      # but warn the user (except for BASH, which is always set by the calling BASH).
41967      if test "xNM" != xBASH; then
41968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41969$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41970      fi
41971      # Try to locate tool using the code snippet
41972      if test -n "$ac_tool_prefix"; then
41973  for ac_prog in nm gcc-nm
41974  do
41975    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41976set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41978$as_echo_n "checking for $ac_word... " >&6; }
41979if ${ac_cv_prog_NM+:} false; then :
41980  $as_echo_n "(cached) " >&6
41981else
41982  if test -n "$NM"; then
41983  ac_cv_prog_NM="$NM" # Let the user override the test.
41984else
41985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41986for as_dir in $PATH
41987do
41988  IFS=$as_save_IFS
41989  test -z "$as_dir" && as_dir=.
41990    for ac_exec_ext in '' $ac_executable_extensions; do
41991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41992    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41994    break 2
41995  fi
41996done
41997  done
41998IFS=$as_save_IFS
41999
42000fi
42001fi
42002NM=$ac_cv_prog_NM
42003if test -n "$NM"; then
42004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42005$as_echo "$NM" >&6; }
42006else
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42008$as_echo "no" >&6; }
42009fi
42010
42011
42012    test -n "$NM" && break
42013  done
42014fi
42015if test -z "$NM"; then
42016  ac_ct_NM=$NM
42017  for ac_prog in nm gcc-nm
42018do
42019  # Extract the first word of "$ac_prog", so it can be a program name with args.
42020set dummy $ac_prog; ac_word=$2
42021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42022$as_echo_n "checking for $ac_word... " >&6; }
42023if ${ac_cv_prog_ac_ct_NM+:} false; then :
42024  $as_echo_n "(cached) " >&6
42025else
42026  if test -n "$ac_ct_NM"; then
42027  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42028else
42029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42030for as_dir in $PATH
42031do
42032  IFS=$as_save_IFS
42033  test -z "$as_dir" && as_dir=.
42034    for ac_exec_ext in '' $ac_executable_extensions; do
42035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42036    ac_cv_prog_ac_ct_NM="$ac_prog"
42037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42038    break 2
42039  fi
42040done
42041  done
42042IFS=$as_save_IFS
42043
42044fi
42045fi
42046ac_ct_NM=$ac_cv_prog_ac_ct_NM
42047if test -n "$ac_ct_NM"; then
42048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42049$as_echo "$ac_ct_NM" >&6; }
42050else
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42052$as_echo "no" >&6; }
42053fi
42054
42055
42056  test -n "$ac_ct_NM" && break
42057done
42058
42059  if test "x$ac_ct_NM" = x; then
42060    NM=""
42061  else
42062    case $cross_compiling:$ac_tool_warned in
42063yes:)
42064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42066ac_tool_warned=yes ;;
42067esac
42068    NM=$ac_ct_NM
42069  fi
42070fi
42071
42072    else
42073      # If it succeeded, then it was overridden by the user. We will use it
42074      # for the tool.
42075
42076      # First remove it from the list of overridden variables, so we can test
42077      # for unknown variables in the end.
42078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42079
42080      # Check if we try to supply an empty value
42081      if test "x$NM" = x; then
42082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42083$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42085$as_echo_n "checking for NM... " >&6; }
42086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42087$as_echo "disabled" >&6; }
42088      else
42089        # Check if the provided tool contains a complete path.
42090        tool_specified="$NM"
42091        tool_basename="${tool_specified##*/}"
42092        if test "x$tool_basename" = "x$tool_specified"; then
42093          # A command without a complete path is provided, search $PATH.
42094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42095$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42096          # Extract the first word of "$tool_basename", so it can be a program name with args.
42097set dummy $tool_basename; ac_word=$2
42098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42099$as_echo_n "checking for $ac_word... " >&6; }
42100if ${ac_cv_path_NM+:} false; then :
42101  $as_echo_n "(cached) " >&6
42102else
42103  case $NM in
42104  [\\/]* | ?:[\\/]*)
42105  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42106  ;;
42107  *)
42108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42109for as_dir in $PATH
42110do
42111  IFS=$as_save_IFS
42112  test -z "$as_dir" && as_dir=.
42113    for ac_exec_ext in '' $ac_executable_extensions; do
42114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42115    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42117    break 2
42118  fi
42119done
42120  done
42121IFS=$as_save_IFS
42122
42123  ;;
42124esac
42125fi
42126NM=$ac_cv_path_NM
42127if test -n "$NM"; then
42128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42129$as_echo "$NM" >&6; }
42130else
42131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42132$as_echo "no" >&6; }
42133fi
42134
42135
42136          if test "x$NM" = x; then
42137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42138          fi
42139        else
42140          # Otherwise we believe it is a complete path. Use it as it is.
42141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42142$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42144$as_echo_n "checking for NM... " >&6; }
42145          if test ! -x "$tool_specified"; then
42146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42147$as_echo "not found" >&6; }
42148            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42149          fi
42150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42151$as_echo "$tool_specified" >&6; }
42152        fi
42153      fi
42154    fi
42155
42156  fi
42157
42158
42159    else
42160
42161
42162  # Publish this variable in the help.
42163
42164
42165  if [ -z "${NM+x}" ]; then
42166    # The variable is not set by user, try to locate tool using the code snippet
42167    if test -n "$ac_tool_prefix"; then
42168  for ac_prog in nm
42169  do
42170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42173$as_echo_n "checking for $ac_word... " >&6; }
42174if ${ac_cv_prog_NM+:} false; then :
42175  $as_echo_n "(cached) " >&6
42176else
42177  if test -n "$NM"; then
42178  ac_cv_prog_NM="$NM" # Let the user override the test.
42179else
42180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42181for as_dir in $PATH
42182do
42183  IFS=$as_save_IFS
42184  test -z "$as_dir" && as_dir=.
42185    for ac_exec_ext in '' $ac_executable_extensions; do
42186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42187    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42189    break 2
42190  fi
42191done
42192  done
42193IFS=$as_save_IFS
42194
42195fi
42196fi
42197NM=$ac_cv_prog_NM
42198if test -n "$NM"; then
42199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42200$as_echo "$NM" >&6; }
42201else
42202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42203$as_echo "no" >&6; }
42204fi
42205
42206
42207    test -n "$NM" && break
42208  done
42209fi
42210if test -z "$NM"; then
42211  ac_ct_NM=$NM
42212  for ac_prog in nm
42213do
42214  # Extract the first word of "$ac_prog", so it can be a program name with args.
42215set dummy $ac_prog; ac_word=$2
42216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42217$as_echo_n "checking for $ac_word... " >&6; }
42218if ${ac_cv_prog_ac_ct_NM+:} false; then :
42219  $as_echo_n "(cached) " >&6
42220else
42221  if test -n "$ac_ct_NM"; then
42222  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42223else
42224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42225for as_dir in $PATH
42226do
42227  IFS=$as_save_IFS
42228  test -z "$as_dir" && as_dir=.
42229    for ac_exec_ext in '' $ac_executable_extensions; do
42230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42231    ac_cv_prog_ac_ct_NM="$ac_prog"
42232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42233    break 2
42234  fi
42235done
42236  done
42237IFS=$as_save_IFS
42238
42239fi
42240fi
42241ac_ct_NM=$ac_cv_prog_ac_ct_NM
42242if test -n "$ac_ct_NM"; then
42243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42244$as_echo "$ac_ct_NM" >&6; }
42245else
42246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42247$as_echo "no" >&6; }
42248fi
42249
42250
42251  test -n "$ac_ct_NM" && break
42252done
42253
42254  if test "x$ac_ct_NM" = x; then
42255    NM=""
42256  else
42257    case $cross_compiling:$ac_tool_warned in
42258yes:)
42259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42261ac_tool_warned=yes ;;
42262esac
42263    NM=$ac_ct_NM
42264  fi
42265fi
42266
42267  else
42268    # The variable is set, but is it from the command line or the environment?
42269
42270    # Try to remove the string !NM! from our list.
42271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42273      # If it failed, the variable was not from the command line. Ignore it,
42274      # but warn the user (except for BASH, which is always set by the calling BASH).
42275      if test "xNM" != xBASH; then
42276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42277$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42278      fi
42279      # Try to locate tool using the code snippet
42280      if test -n "$ac_tool_prefix"; then
42281  for ac_prog in nm
42282  do
42283    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42284set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42286$as_echo_n "checking for $ac_word... " >&6; }
42287if ${ac_cv_prog_NM+:} false; then :
42288  $as_echo_n "(cached) " >&6
42289else
42290  if test -n "$NM"; then
42291  ac_cv_prog_NM="$NM" # Let the user override the test.
42292else
42293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42294for as_dir in $PATH
42295do
42296  IFS=$as_save_IFS
42297  test -z "$as_dir" && as_dir=.
42298    for ac_exec_ext in '' $ac_executable_extensions; do
42299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42300    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42302    break 2
42303  fi
42304done
42305  done
42306IFS=$as_save_IFS
42307
42308fi
42309fi
42310NM=$ac_cv_prog_NM
42311if test -n "$NM"; then
42312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42313$as_echo "$NM" >&6; }
42314else
42315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42316$as_echo "no" >&6; }
42317fi
42318
42319
42320    test -n "$NM" && break
42321  done
42322fi
42323if test -z "$NM"; then
42324  ac_ct_NM=$NM
42325  for ac_prog in nm
42326do
42327  # Extract the first word of "$ac_prog", so it can be a program name with args.
42328set dummy $ac_prog; ac_word=$2
42329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42330$as_echo_n "checking for $ac_word... " >&6; }
42331if ${ac_cv_prog_ac_ct_NM+:} false; then :
42332  $as_echo_n "(cached) " >&6
42333else
42334  if test -n "$ac_ct_NM"; then
42335  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42336else
42337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42338for as_dir in $PATH
42339do
42340  IFS=$as_save_IFS
42341  test -z "$as_dir" && as_dir=.
42342    for ac_exec_ext in '' $ac_executable_extensions; do
42343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42344    ac_cv_prog_ac_ct_NM="$ac_prog"
42345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42346    break 2
42347  fi
42348done
42349  done
42350IFS=$as_save_IFS
42351
42352fi
42353fi
42354ac_ct_NM=$ac_cv_prog_ac_ct_NM
42355if test -n "$ac_ct_NM"; then
42356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42357$as_echo "$ac_ct_NM" >&6; }
42358else
42359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42360$as_echo "no" >&6; }
42361fi
42362
42363
42364  test -n "$ac_ct_NM" && break
42365done
42366
42367  if test "x$ac_ct_NM" = x; then
42368    NM=""
42369  else
42370    case $cross_compiling:$ac_tool_warned in
42371yes:)
42372{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42373$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42374ac_tool_warned=yes ;;
42375esac
42376    NM=$ac_ct_NM
42377  fi
42378fi
42379
42380    else
42381      # If it succeeded, then it was overridden by the user. We will use it
42382      # for the tool.
42383
42384      # First remove it from the list of overridden variables, so we can test
42385      # for unknown variables in the end.
42386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42387
42388      # Check if we try to supply an empty value
42389      if test "x$NM" = x; then
42390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42391$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42393$as_echo_n "checking for NM... " >&6; }
42394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42395$as_echo "disabled" >&6; }
42396      else
42397        # Check if the provided tool contains a complete path.
42398        tool_specified="$NM"
42399        tool_basename="${tool_specified##*/}"
42400        if test "x$tool_basename" = "x$tool_specified"; then
42401          # A command without a complete path is provided, search $PATH.
42402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42403$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42404          # Extract the first word of "$tool_basename", so it can be a program name with args.
42405set dummy $tool_basename; ac_word=$2
42406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42407$as_echo_n "checking for $ac_word... " >&6; }
42408if ${ac_cv_path_NM+:} false; then :
42409  $as_echo_n "(cached) " >&6
42410else
42411  case $NM in
42412  [\\/]* | ?:[\\/]*)
42413  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42414  ;;
42415  *)
42416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42417for as_dir in $PATH
42418do
42419  IFS=$as_save_IFS
42420  test -z "$as_dir" && as_dir=.
42421    for ac_exec_ext in '' $ac_executable_extensions; do
42422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42423    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42425    break 2
42426  fi
42427done
42428  done
42429IFS=$as_save_IFS
42430
42431  ;;
42432esac
42433fi
42434NM=$ac_cv_path_NM
42435if test -n "$NM"; then
42436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42437$as_echo "$NM" >&6; }
42438else
42439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42440$as_echo "no" >&6; }
42441fi
42442
42443
42444          if test "x$NM" = x; then
42445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42446          fi
42447        else
42448          # Otherwise we believe it is a complete path. Use it as it is.
42449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42450$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42452$as_echo_n "checking for NM... " >&6; }
42453          if test ! -x "$tool_specified"; then
42454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42455$as_echo "not found" >&6; }
42456            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42457          fi
42458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42459$as_echo "$tool_specified" >&6; }
42460        fi
42461      fi
42462    fi
42463
42464  fi
42465
42466
42467    fi
42468
42469  # Only process if variable expands to non-empty
42470
42471  if test "x$NM" != x; then
42472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42473
42474  # First separate the path from the arguments. This will split at the first
42475  # space.
42476  complete="$NM"
42477  path="${complete%% *}"
42478  tmp="$complete EOL"
42479  arguments="${tmp#* }"
42480
42481  # Input might be given as Windows format, start by converting to
42482  # unix format.
42483  new_path=`$CYGPATH -u "$path"`
42484
42485  # Now try to locate executable using which
42486  new_path=`$WHICH "$new_path" 2> /dev/null`
42487  # bat and cmd files are not always considered executable in cygwin causing which
42488  # to not find them
42489  if test "x$new_path" = x \
42490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42492    new_path=`$CYGPATH -u "$path"`
42493  fi
42494  if test "x$new_path" = x; then
42495    # Oops. Which didn't find the executable.
42496    # The splitting of arguments from the executable at a space might have been incorrect,
42497    # since paths with space are more likely in Windows. Give it another try with the whole
42498    # argument.
42499    path="$complete"
42500    arguments="EOL"
42501    new_path=`$CYGPATH -u "$path"`
42502    new_path=`$WHICH "$new_path" 2> /dev/null`
42503    # bat and cmd files are not always considered executable in cygwin causing which
42504    # to not find them
42505    if test "x$new_path" = x \
42506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42508      new_path=`$CYGPATH -u "$path"`
42509    fi
42510    if test "x$new_path" = x; then
42511      # It's still not found. Now this is an unrecoverable error.
42512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42513$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42514      has_space=`$ECHO "$complete" | $GREP " "`
42515      if test "x$has_space" != x; then
42516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42518      fi
42519      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42520    fi
42521  fi
42522
42523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42526  # "foo.exe" is OK but "foo" is an error.
42527  #
42528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42529  # It is also a way to make sure we got the proper file name for the real test later on.
42530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42531  if test "x$test_shortpath" = x; then
42532    # Short path failed, file does not exist as specified.
42533    # Try adding .exe or .cmd
42534    if test -f "${new_path}.exe"; then
42535      input_to_shortpath="${new_path}.exe"
42536    elif test -f "${new_path}.cmd"; then
42537      input_to_shortpath="${new_path}.cmd"
42538    else
42539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42540$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42543      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42544    fi
42545  else
42546    input_to_shortpath="$new_path"
42547  fi
42548
42549  # Call helper function which possibly converts this using DOS-style short mode.
42550  # If so, the updated path is stored in $new_path.
42551  new_path="$input_to_shortpath"
42552
42553  input_path="$input_to_shortpath"
42554  # Check if we need to convert this using DOS-style short mode. If the path
42555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42556  # take no chances and rewrite it.
42557  # Note: m4 eats our [], so we need to use [ and ] instead.
42558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42559  if test "x$has_forbidden_chars" != x; then
42560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42564      # Going to short mode and back again did indeed matter. Since short mode is
42565      # case insensitive, let's make it lowercase to improve readability.
42566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42567      # Now convert it back to Unix-style (cygpath)
42568      input_path=`$CYGPATH -u "$shortmode_path"`
42569      new_path="$input_path"
42570    fi
42571  fi
42572
42573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42574  if test "x$test_cygdrive_prefix" = x; then
42575    # As a simple fix, exclude /usr/bin since it's not a real path.
42576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42578      # a path prefixed by /cygdrive for fixpath to work.
42579      new_path="$CYGWIN_ROOT_PATH$input_path"
42580    fi
42581  fi
42582
42583  # remove trailing .exe if any
42584  new_path="${new_path/%.exe/}"
42585
42586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42587
42588  # First separate the path from the arguments. This will split at the first
42589  # space.
42590  complete="$NM"
42591  path="${complete%% *}"
42592  tmp="$complete EOL"
42593  arguments="${tmp#* }"
42594
42595  # Input might be given as Windows format, start by converting to
42596  # unix format.
42597  new_path="$path"
42598
42599  windows_path="$new_path"
42600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42601    unix_path=`$CYGPATH -u "$windows_path"`
42602    new_path="$unix_path"
42603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42605    new_path="$unix_path"
42606  fi
42607
42608
42609  # Now try to locate executable using which
42610  new_path=`$WHICH "$new_path" 2> /dev/null`
42611
42612  if test "x$new_path" = x; then
42613    # Oops. Which didn't find the executable.
42614    # The splitting of arguments from the executable at a space might have been incorrect,
42615    # since paths with space are more likely in Windows. Give it another try with the whole
42616    # argument.
42617    path="$complete"
42618    arguments="EOL"
42619    new_path="$path"
42620
42621  windows_path="$new_path"
42622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42623    unix_path=`$CYGPATH -u "$windows_path"`
42624    new_path="$unix_path"
42625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42627    new_path="$unix_path"
42628  fi
42629
42630
42631    new_path=`$WHICH "$new_path" 2> /dev/null`
42632    # bat and cmd files are not always considered executable in MSYS causing which
42633    # to not find them
42634    if test "x$new_path" = x \
42635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42637      new_path="$path"
42638
42639  windows_path="$new_path"
42640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42641    unix_path=`$CYGPATH -u "$windows_path"`
42642    new_path="$unix_path"
42643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42645    new_path="$unix_path"
42646  fi
42647
42648    fi
42649
42650    if test "x$new_path" = x; then
42651      # It's still not found. Now this is an unrecoverable error.
42652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42653$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42654      has_space=`$ECHO "$complete" | $GREP " "`
42655      if test "x$has_space" != x; then
42656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42658      fi
42659      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42660    fi
42661  fi
42662
42663  # Now new_path has a complete unix path to the binary
42664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42665    # Keep paths in /bin as-is, but remove trailing .exe if any
42666    new_path="${new_path/%.exe/}"
42667    # Do not save /bin paths to all_fixpath_prefixes!
42668  else
42669    # Not in mixed or Windows style, start by that.
42670    new_path=`cmd //c echo $new_path`
42671
42672  input_path="$new_path"
42673  # Check if we need to convert this using DOS-style short mode. If the path
42674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42675  # take no chances and rewrite it.
42676  # Note: m4 eats our [], so we need to use [ and ] instead.
42677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42678  if test "x$has_forbidden_chars" != x; then
42679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42681  fi
42682
42683    # Output is in $new_path
42684
42685  windows_path="$new_path"
42686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42687    unix_path=`$CYGPATH -u "$windows_path"`
42688    new_path="$unix_path"
42689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42691    new_path="$unix_path"
42692  fi
42693
42694    # remove trailing .exe if any
42695    new_path="${new_path/%.exe/}"
42696
42697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42699  fi
42700
42701    else
42702      # We're on a unix platform. Hooray! :)
42703      # First separate the path from the arguments. This will split at the first
42704      # space.
42705      complete="$NM"
42706      path="${complete%% *}"
42707      tmp="$complete EOL"
42708      arguments="${tmp#* }"
42709
42710      # Cannot rely on the command "which" here since it doesn't always work.
42711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42712      if test -z "$is_absolute_path"; then
42713        # Path to executable is not absolute. Find it.
42714        IFS_save="$IFS"
42715        IFS=:
42716        for p in $PATH; do
42717          if test -f "$p/$path" && test -x "$p/$path"; then
42718            new_path="$p/$path"
42719            break
42720          fi
42721        done
42722        IFS="$IFS_save"
42723      else
42724        # This is an absolute path, we can use it without further modifications.
42725        new_path="$path"
42726      fi
42727
42728      if test "x$new_path" = x; then
42729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42730$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42731        has_space=`$ECHO "$complete" | $GREP " "`
42732        if test "x$has_space" != x; then
42733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42735        fi
42736        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42737      fi
42738    fi
42739
42740    # Now join together the path and the arguments once again
42741    if test "x$arguments" != xEOL; then
42742      new_complete="$new_path ${arguments% *}"
42743    else
42744      new_complete="$new_path"
42745    fi
42746
42747    if test "x$complete" != "x$new_complete"; then
42748      NM="$new_complete"
42749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42750$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42751    fi
42752  fi
42753
42754    GNM="$NM"
42755
42756  fi
42757
42758  # objcopy is used for moving debug symbols to separate files when
42759  # full debug symbols are enabled.
42760  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42761
42762
42763  # Publish this variable in the help.
42764
42765
42766  if [ -z "${OBJCOPY+x}" ]; then
42767    # The variable is not set by user, try to locate tool using the code snippet
42768    if test -n "$ac_tool_prefix"; then
42769  for ac_prog in gobjcopy objcopy
42770  do
42771    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42774$as_echo_n "checking for $ac_word... " >&6; }
42775if ${ac_cv_prog_OBJCOPY+:} false; then :
42776  $as_echo_n "(cached) " >&6
42777else
42778  if test -n "$OBJCOPY"; then
42779  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42780else
42781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42782for as_dir in $PATH
42783do
42784  IFS=$as_save_IFS
42785  test -z "$as_dir" && as_dir=.
42786    for ac_exec_ext in '' $ac_executable_extensions; do
42787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42788    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42790    break 2
42791  fi
42792done
42793  done
42794IFS=$as_save_IFS
42795
42796fi
42797fi
42798OBJCOPY=$ac_cv_prog_OBJCOPY
42799if test -n "$OBJCOPY"; then
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42801$as_echo "$OBJCOPY" >&6; }
42802else
42803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42804$as_echo "no" >&6; }
42805fi
42806
42807
42808    test -n "$OBJCOPY" && break
42809  done
42810fi
42811if test -z "$OBJCOPY"; then
42812  ac_ct_OBJCOPY=$OBJCOPY
42813  for ac_prog in gobjcopy objcopy
42814do
42815  # Extract the first word of "$ac_prog", so it can be a program name with args.
42816set dummy $ac_prog; ac_word=$2
42817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42818$as_echo_n "checking for $ac_word... " >&6; }
42819if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42820  $as_echo_n "(cached) " >&6
42821else
42822  if test -n "$ac_ct_OBJCOPY"; then
42823  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42824else
42825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42826for as_dir in $PATH
42827do
42828  IFS=$as_save_IFS
42829  test -z "$as_dir" && as_dir=.
42830    for ac_exec_ext in '' $ac_executable_extensions; do
42831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42832    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42834    break 2
42835  fi
42836done
42837  done
42838IFS=$as_save_IFS
42839
42840fi
42841fi
42842ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42843if test -n "$ac_ct_OBJCOPY"; then
42844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42845$as_echo "$ac_ct_OBJCOPY" >&6; }
42846else
42847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42848$as_echo "no" >&6; }
42849fi
42850
42851
42852  test -n "$ac_ct_OBJCOPY" && break
42853done
42854
42855  if test "x$ac_ct_OBJCOPY" = x; then
42856    OBJCOPY=""
42857  else
42858    case $cross_compiling:$ac_tool_warned in
42859yes:)
42860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42862ac_tool_warned=yes ;;
42863esac
42864    OBJCOPY=$ac_ct_OBJCOPY
42865  fi
42866fi
42867
42868  else
42869    # The variable is set, but is it from the command line or the environment?
42870
42871    # Try to remove the string !OBJCOPY! from our list.
42872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42874      # If it failed, the variable was not from the command line. Ignore it,
42875      # but warn the user (except for BASH, which is always set by the calling BASH).
42876      if test "xOBJCOPY" != xBASH; then
42877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42878$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42879      fi
42880      # Try to locate tool using the code snippet
42881      if test -n "$ac_tool_prefix"; then
42882  for ac_prog in gobjcopy objcopy
42883  do
42884    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42885set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42887$as_echo_n "checking for $ac_word... " >&6; }
42888if ${ac_cv_prog_OBJCOPY+:} false; then :
42889  $as_echo_n "(cached) " >&6
42890else
42891  if test -n "$OBJCOPY"; then
42892  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42893else
42894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42895for as_dir in $PATH
42896do
42897  IFS=$as_save_IFS
42898  test -z "$as_dir" && as_dir=.
42899    for ac_exec_ext in '' $ac_executable_extensions; do
42900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42901    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42903    break 2
42904  fi
42905done
42906  done
42907IFS=$as_save_IFS
42908
42909fi
42910fi
42911OBJCOPY=$ac_cv_prog_OBJCOPY
42912if test -n "$OBJCOPY"; then
42913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42914$as_echo "$OBJCOPY" >&6; }
42915else
42916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42917$as_echo "no" >&6; }
42918fi
42919
42920
42921    test -n "$OBJCOPY" && break
42922  done
42923fi
42924if test -z "$OBJCOPY"; then
42925  ac_ct_OBJCOPY=$OBJCOPY
42926  for ac_prog in gobjcopy objcopy
42927do
42928  # Extract the first word of "$ac_prog", so it can be a program name with args.
42929set dummy $ac_prog; ac_word=$2
42930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42931$as_echo_n "checking for $ac_word... " >&6; }
42932if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42933  $as_echo_n "(cached) " >&6
42934else
42935  if test -n "$ac_ct_OBJCOPY"; then
42936  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42937else
42938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42939for as_dir in $PATH
42940do
42941  IFS=$as_save_IFS
42942  test -z "$as_dir" && as_dir=.
42943    for ac_exec_ext in '' $ac_executable_extensions; do
42944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42945    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42947    break 2
42948  fi
42949done
42950  done
42951IFS=$as_save_IFS
42952
42953fi
42954fi
42955ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42956if test -n "$ac_ct_OBJCOPY"; then
42957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42958$as_echo "$ac_ct_OBJCOPY" >&6; }
42959else
42960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42961$as_echo "no" >&6; }
42962fi
42963
42964
42965  test -n "$ac_ct_OBJCOPY" && break
42966done
42967
42968  if test "x$ac_ct_OBJCOPY" = x; then
42969    OBJCOPY=""
42970  else
42971    case $cross_compiling:$ac_tool_warned in
42972yes:)
42973{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42974$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42975ac_tool_warned=yes ;;
42976esac
42977    OBJCOPY=$ac_ct_OBJCOPY
42978  fi
42979fi
42980
42981    else
42982      # If it succeeded, then it was overridden by the user. We will use it
42983      # for the tool.
42984
42985      # First remove it from the list of overridden variables, so we can test
42986      # for unknown variables in the end.
42987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42988
42989      # Check if we try to supply an empty value
42990      if test "x$OBJCOPY" = x; then
42991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42992$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42994$as_echo_n "checking for OBJCOPY... " >&6; }
42995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42996$as_echo "disabled" >&6; }
42997      else
42998        # Check if the provided tool contains a complete path.
42999        tool_specified="$OBJCOPY"
43000        tool_basename="${tool_specified##*/}"
43001        if test "x$tool_basename" = "x$tool_specified"; then
43002          # A command without a complete path is provided, search $PATH.
43003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43004$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43005          # Extract the first word of "$tool_basename", so it can be a program name with args.
43006set dummy $tool_basename; ac_word=$2
43007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43008$as_echo_n "checking for $ac_word... " >&6; }
43009if ${ac_cv_path_OBJCOPY+:} false; then :
43010  $as_echo_n "(cached) " >&6
43011else
43012  case $OBJCOPY in
43013  [\\/]* | ?:[\\/]*)
43014  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43015  ;;
43016  *)
43017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43018for as_dir in $PATH
43019do
43020  IFS=$as_save_IFS
43021  test -z "$as_dir" && as_dir=.
43022    for ac_exec_ext in '' $ac_executable_extensions; do
43023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43024    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43026    break 2
43027  fi
43028done
43029  done
43030IFS=$as_save_IFS
43031
43032  ;;
43033esac
43034fi
43035OBJCOPY=$ac_cv_path_OBJCOPY
43036if test -n "$OBJCOPY"; then
43037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43038$as_echo "$OBJCOPY" >&6; }
43039else
43040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43041$as_echo "no" >&6; }
43042fi
43043
43044
43045          if test "x$OBJCOPY" = x; then
43046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43047          fi
43048        else
43049          # Otherwise we believe it is a complete path. Use it as it is.
43050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43051$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43053$as_echo_n "checking for OBJCOPY... " >&6; }
43054          if test ! -x "$tool_specified"; then
43055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43056$as_echo "not found" >&6; }
43057            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43058          fi
43059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43060$as_echo "$tool_specified" >&6; }
43061        fi
43062      fi
43063    fi
43064
43065  fi
43066
43067
43068    # Only call fixup if objcopy was found.
43069    if test -n "$OBJCOPY"; then
43070
43071  # Only process if variable expands to non-empty
43072
43073  if test "x$OBJCOPY" != x; then
43074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43075
43076  # First separate the path from the arguments. This will split at the first
43077  # space.
43078  complete="$OBJCOPY"
43079  path="${complete%% *}"
43080  tmp="$complete EOL"
43081  arguments="${tmp#* }"
43082
43083  # Input might be given as Windows format, start by converting to
43084  # unix format.
43085  new_path=`$CYGPATH -u "$path"`
43086
43087  # Now try to locate executable using which
43088  new_path=`$WHICH "$new_path" 2> /dev/null`
43089  # bat and cmd files are not always considered executable in cygwin causing which
43090  # to not find them
43091  if test "x$new_path" = x \
43092      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43093      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43094    new_path=`$CYGPATH -u "$path"`
43095  fi
43096  if test "x$new_path" = x; then
43097    # Oops. Which didn't find the executable.
43098    # The splitting of arguments from the executable at a space might have been incorrect,
43099    # since paths with space are more likely in Windows. Give it another try with the whole
43100    # argument.
43101    path="$complete"
43102    arguments="EOL"
43103    new_path=`$CYGPATH -u "$path"`
43104    new_path=`$WHICH "$new_path" 2> /dev/null`
43105    # bat and cmd files are not always considered executable in cygwin causing which
43106    # to not find them
43107    if test "x$new_path" = x \
43108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43110      new_path=`$CYGPATH -u "$path"`
43111    fi
43112    if test "x$new_path" = x; then
43113      # It's still not found. Now this is an unrecoverable error.
43114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43115$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43116      has_space=`$ECHO "$complete" | $GREP " "`
43117      if test "x$has_space" != x; then
43118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43120      fi
43121      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43122    fi
43123  fi
43124
43125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43128  # "foo.exe" is OK but "foo" is an error.
43129  #
43130  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43131  # It is also a way to make sure we got the proper file name for the real test later on.
43132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43133  if test "x$test_shortpath" = x; then
43134    # Short path failed, file does not exist as specified.
43135    # Try adding .exe or .cmd
43136    if test -f "${new_path}.exe"; then
43137      input_to_shortpath="${new_path}.exe"
43138    elif test -f "${new_path}.cmd"; then
43139      input_to_shortpath="${new_path}.cmd"
43140    else
43141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43142$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43143      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43144$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43145      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43146    fi
43147  else
43148    input_to_shortpath="$new_path"
43149  fi
43150
43151  # Call helper function which possibly converts this using DOS-style short mode.
43152  # If so, the updated path is stored in $new_path.
43153  new_path="$input_to_shortpath"
43154
43155  input_path="$input_to_shortpath"
43156  # Check if we need to convert this using DOS-style short mode. If the path
43157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43158  # take no chances and rewrite it.
43159  # Note: m4 eats our [], so we need to use [ and ] instead.
43160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43161  if test "x$has_forbidden_chars" != x; then
43162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43166      # Going to short mode and back again did indeed matter. Since short mode is
43167      # case insensitive, let's make it lowercase to improve readability.
43168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43169      # Now convert it back to Unix-style (cygpath)
43170      input_path=`$CYGPATH -u "$shortmode_path"`
43171      new_path="$input_path"
43172    fi
43173  fi
43174
43175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43176  if test "x$test_cygdrive_prefix" = x; then
43177    # As a simple fix, exclude /usr/bin since it's not a real path.
43178    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43180      # a path prefixed by /cygdrive for fixpath to work.
43181      new_path="$CYGWIN_ROOT_PATH$input_path"
43182    fi
43183  fi
43184
43185  # remove trailing .exe if any
43186  new_path="${new_path/%.exe/}"
43187
43188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43189
43190  # First separate the path from the arguments. This will split at the first
43191  # space.
43192  complete="$OBJCOPY"
43193  path="${complete%% *}"
43194  tmp="$complete EOL"
43195  arguments="${tmp#* }"
43196
43197  # Input might be given as Windows format, start by converting to
43198  # unix format.
43199  new_path="$path"
43200
43201  windows_path="$new_path"
43202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43203    unix_path=`$CYGPATH -u "$windows_path"`
43204    new_path="$unix_path"
43205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43207    new_path="$unix_path"
43208  fi
43209
43210
43211  # Now try to locate executable using which
43212  new_path=`$WHICH "$new_path" 2> /dev/null`
43213
43214  if test "x$new_path" = x; then
43215    # Oops. Which didn't find the executable.
43216    # The splitting of arguments from the executable at a space might have been incorrect,
43217    # since paths with space are more likely in Windows. Give it another try with the whole
43218    # argument.
43219    path="$complete"
43220    arguments="EOL"
43221    new_path="$path"
43222
43223  windows_path="$new_path"
43224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43225    unix_path=`$CYGPATH -u "$windows_path"`
43226    new_path="$unix_path"
43227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43229    new_path="$unix_path"
43230  fi
43231
43232
43233    new_path=`$WHICH "$new_path" 2> /dev/null`
43234    # bat and cmd files are not always considered executable in MSYS causing which
43235    # to not find them
43236    if test "x$new_path" = x \
43237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43239      new_path="$path"
43240
43241  windows_path="$new_path"
43242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43243    unix_path=`$CYGPATH -u "$windows_path"`
43244    new_path="$unix_path"
43245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43247    new_path="$unix_path"
43248  fi
43249
43250    fi
43251
43252    if test "x$new_path" = x; then
43253      # It's still not found. Now this is an unrecoverable error.
43254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43255$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43256      has_space=`$ECHO "$complete" | $GREP " "`
43257      if test "x$has_space" != x; then
43258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43260      fi
43261      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43262    fi
43263  fi
43264
43265  # Now new_path has a complete unix path to the binary
43266  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43267    # Keep paths in /bin as-is, but remove trailing .exe if any
43268    new_path="${new_path/%.exe/}"
43269    # Do not save /bin paths to all_fixpath_prefixes!
43270  else
43271    # Not in mixed or Windows style, start by that.
43272    new_path=`cmd //c echo $new_path`
43273
43274  input_path="$new_path"
43275  # Check if we need to convert this using DOS-style short mode. If the path
43276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43277  # take no chances and rewrite it.
43278  # Note: m4 eats our [], so we need to use [ and ] instead.
43279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43280  if test "x$has_forbidden_chars" != x; then
43281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43283  fi
43284
43285    # Output is in $new_path
43286
43287  windows_path="$new_path"
43288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43289    unix_path=`$CYGPATH -u "$windows_path"`
43290    new_path="$unix_path"
43291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43293    new_path="$unix_path"
43294  fi
43295
43296    # remove trailing .exe if any
43297    new_path="${new_path/%.exe/}"
43298
43299    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43300    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43301  fi
43302
43303    else
43304      # We're on a unix platform. Hooray! :)
43305      # First separate the path from the arguments. This will split at the first
43306      # space.
43307      complete="$OBJCOPY"
43308      path="${complete%% *}"
43309      tmp="$complete EOL"
43310      arguments="${tmp#* }"
43311
43312      # Cannot rely on the command "which" here since it doesn't always work.
43313      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43314      if test -z "$is_absolute_path"; then
43315        # Path to executable is not absolute. Find it.
43316        IFS_save="$IFS"
43317        IFS=:
43318        for p in $PATH; do
43319          if test -f "$p/$path" && test -x "$p/$path"; then
43320            new_path="$p/$path"
43321            break
43322          fi
43323        done
43324        IFS="$IFS_save"
43325      else
43326        # This is an absolute path, we can use it without further modifications.
43327        new_path="$path"
43328      fi
43329
43330      if test "x$new_path" = x; then
43331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43332$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43333        has_space=`$ECHO "$complete" | $GREP " "`
43334        if test "x$has_space" != x; then
43335          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43336$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43337        fi
43338        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43339      fi
43340    fi
43341
43342    # Now join together the path and the arguments once again
43343    if test "x$arguments" != xEOL; then
43344      new_complete="$new_path ${arguments% *}"
43345    else
43346      new_complete="$new_path"
43347    fi
43348
43349    if test "x$complete" != "x$new_complete"; then
43350      OBJCOPY="$new_complete"
43351      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43352$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43353    fi
43354  fi
43355
43356      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43357        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43358        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43359        # - version number is last blank separate word on first line
43360        # - version number formats that have been seen:
43361        #   - <major>.<minor>
43362        #   - <major>.<minor>.<micro>
43363        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43364        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43365         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43366              -e 's/.* //' \
43367              -e '/^[01]\./b bad' \
43368              -e '/^2\./{' \
43369              -e '  s/^2\.//' \
43370              -e '  /^[0-9]$/b bad' \
43371              -e '  /^[0-9]\./b bad' \
43372              -e '  /^1[0-9]$/b bad' \
43373              -e '  /^1[0-9]\./b bad' \
43374              -e '  /^20\./b bad' \
43375              -e '  /^21\.0$/b bad' \
43376              -e '  /^21\.0\./b bad' \
43377              -e '}' \
43378              -e ':good' \
43379              -e 's/.*/VALID_VERSION/p' \
43380              -e 'q' \
43381              -e ':bad' \
43382              -e 's/.*/BAD_VERSION/p' \
43383              -e 'q'`
43384        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43385          OBJCOPY=
43386          { $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
43387$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43388          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43389$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43390          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43391$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43392          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43393$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43394          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43395$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43396        fi
43397      fi
43398    fi
43399  fi
43400
43401
43402
43403  # Publish this variable in the help.
43404
43405
43406  if [ -z "${OBJDUMP+x}" ]; then
43407    # The variable is not set by user, try to locate tool using the code snippet
43408    if test -n "$ac_tool_prefix"; then
43409  for ac_prog in gobjdump objdump
43410  do
43411    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43412set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43414$as_echo_n "checking for $ac_word... " >&6; }
43415if ${ac_cv_prog_OBJDUMP+:} false; then :
43416  $as_echo_n "(cached) " >&6
43417else
43418  if test -n "$OBJDUMP"; then
43419  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43420else
43421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43422for as_dir in $PATH
43423do
43424  IFS=$as_save_IFS
43425  test -z "$as_dir" && as_dir=.
43426    for ac_exec_ext in '' $ac_executable_extensions; do
43427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43428    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43430    break 2
43431  fi
43432done
43433  done
43434IFS=$as_save_IFS
43435
43436fi
43437fi
43438OBJDUMP=$ac_cv_prog_OBJDUMP
43439if test -n "$OBJDUMP"; then
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43441$as_echo "$OBJDUMP" >&6; }
43442else
43443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43444$as_echo "no" >&6; }
43445fi
43446
43447
43448    test -n "$OBJDUMP" && break
43449  done
43450fi
43451if test -z "$OBJDUMP"; then
43452  ac_ct_OBJDUMP=$OBJDUMP
43453  for ac_prog in gobjdump objdump
43454do
43455  # Extract the first word of "$ac_prog", so it can be a program name with args.
43456set dummy $ac_prog; ac_word=$2
43457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43458$as_echo_n "checking for $ac_word... " >&6; }
43459if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43460  $as_echo_n "(cached) " >&6
43461else
43462  if test -n "$ac_ct_OBJDUMP"; then
43463  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43464else
43465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43466for as_dir in $PATH
43467do
43468  IFS=$as_save_IFS
43469  test -z "$as_dir" && as_dir=.
43470    for ac_exec_ext in '' $ac_executable_extensions; do
43471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43472    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43474    break 2
43475  fi
43476done
43477  done
43478IFS=$as_save_IFS
43479
43480fi
43481fi
43482ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43483if test -n "$ac_ct_OBJDUMP"; then
43484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43485$as_echo "$ac_ct_OBJDUMP" >&6; }
43486else
43487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43488$as_echo "no" >&6; }
43489fi
43490
43491
43492  test -n "$ac_ct_OBJDUMP" && break
43493done
43494
43495  if test "x$ac_ct_OBJDUMP" = x; then
43496    OBJDUMP=""
43497  else
43498    case $cross_compiling:$ac_tool_warned in
43499yes:)
43500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43502ac_tool_warned=yes ;;
43503esac
43504    OBJDUMP=$ac_ct_OBJDUMP
43505  fi
43506fi
43507
43508  else
43509    # The variable is set, but is it from the command line or the environment?
43510
43511    # Try to remove the string !OBJDUMP! from our list.
43512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43514      # If it failed, the variable was not from the command line. Ignore it,
43515      # but warn the user (except for BASH, which is always set by the calling BASH).
43516      if test "xOBJDUMP" != xBASH; then
43517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43518$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43519      fi
43520      # Try to locate tool using the code snippet
43521      if test -n "$ac_tool_prefix"; then
43522  for ac_prog in gobjdump objdump
43523  do
43524    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43525set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43527$as_echo_n "checking for $ac_word... " >&6; }
43528if ${ac_cv_prog_OBJDUMP+:} false; then :
43529  $as_echo_n "(cached) " >&6
43530else
43531  if test -n "$OBJDUMP"; then
43532  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43533else
43534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43535for as_dir in $PATH
43536do
43537  IFS=$as_save_IFS
43538  test -z "$as_dir" && as_dir=.
43539    for ac_exec_ext in '' $ac_executable_extensions; do
43540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43541    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43543    break 2
43544  fi
43545done
43546  done
43547IFS=$as_save_IFS
43548
43549fi
43550fi
43551OBJDUMP=$ac_cv_prog_OBJDUMP
43552if test -n "$OBJDUMP"; then
43553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43554$as_echo "$OBJDUMP" >&6; }
43555else
43556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43557$as_echo "no" >&6; }
43558fi
43559
43560
43561    test -n "$OBJDUMP" && break
43562  done
43563fi
43564if test -z "$OBJDUMP"; then
43565  ac_ct_OBJDUMP=$OBJDUMP
43566  for ac_prog in gobjdump objdump
43567do
43568  # Extract the first word of "$ac_prog", so it can be a program name with args.
43569set dummy $ac_prog; ac_word=$2
43570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43571$as_echo_n "checking for $ac_word... " >&6; }
43572if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43573  $as_echo_n "(cached) " >&6
43574else
43575  if test -n "$ac_ct_OBJDUMP"; then
43576  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43577else
43578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43579for as_dir in $PATH
43580do
43581  IFS=$as_save_IFS
43582  test -z "$as_dir" && as_dir=.
43583    for ac_exec_ext in '' $ac_executable_extensions; do
43584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43585    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43587    break 2
43588  fi
43589done
43590  done
43591IFS=$as_save_IFS
43592
43593fi
43594fi
43595ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43596if test -n "$ac_ct_OBJDUMP"; then
43597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43598$as_echo "$ac_ct_OBJDUMP" >&6; }
43599else
43600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43601$as_echo "no" >&6; }
43602fi
43603
43604
43605  test -n "$ac_ct_OBJDUMP" && break
43606done
43607
43608  if test "x$ac_ct_OBJDUMP" = x; then
43609    OBJDUMP=""
43610  else
43611    case $cross_compiling:$ac_tool_warned in
43612yes:)
43613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43615ac_tool_warned=yes ;;
43616esac
43617    OBJDUMP=$ac_ct_OBJDUMP
43618  fi
43619fi
43620
43621    else
43622      # If it succeeded, then it was overridden by the user. We will use it
43623      # for the tool.
43624
43625      # First remove it from the list of overridden variables, so we can test
43626      # for unknown variables in the end.
43627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43628
43629      # Check if we try to supply an empty value
43630      if test "x$OBJDUMP" = x; then
43631        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43632$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43634$as_echo_n "checking for OBJDUMP... " >&6; }
43635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43636$as_echo "disabled" >&6; }
43637      else
43638        # Check if the provided tool contains a complete path.
43639        tool_specified="$OBJDUMP"
43640        tool_basename="${tool_specified##*/}"
43641        if test "x$tool_basename" = "x$tool_specified"; then
43642          # A command without a complete path is provided, search $PATH.
43643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43644$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43645          # Extract the first word of "$tool_basename", so it can be a program name with args.
43646set dummy $tool_basename; ac_word=$2
43647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43648$as_echo_n "checking for $ac_word... " >&6; }
43649if ${ac_cv_path_OBJDUMP+:} false; then :
43650  $as_echo_n "(cached) " >&6
43651else
43652  case $OBJDUMP in
43653  [\\/]* | ?:[\\/]*)
43654  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43655  ;;
43656  *)
43657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43658for as_dir in $PATH
43659do
43660  IFS=$as_save_IFS
43661  test -z "$as_dir" && as_dir=.
43662    for ac_exec_ext in '' $ac_executable_extensions; do
43663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43664    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43666    break 2
43667  fi
43668done
43669  done
43670IFS=$as_save_IFS
43671
43672  ;;
43673esac
43674fi
43675OBJDUMP=$ac_cv_path_OBJDUMP
43676if test -n "$OBJDUMP"; then
43677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43678$as_echo "$OBJDUMP" >&6; }
43679else
43680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43681$as_echo "no" >&6; }
43682fi
43683
43684
43685          if test "x$OBJDUMP" = x; then
43686            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43687          fi
43688        else
43689          # Otherwise we believe it is a complete path. Use it as it is.
43690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43691$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43692          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43693$as_echo_n "checking for OBJDUMP... " >&6; }
43694          if test ! -x "$tool_specified"; then
43695            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43696$as_echo "not found" >&6; }
43697            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43698          fi
43699          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43700$as_echo "$tool_specified" >&6; }
43701        fi
43702      fi
43703    fi
43704
43705  fi
43706
43707
43708  if test "x$OBJDUMP" != x; then
43709    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43710    # bails if argument is missing.
43711
43712  # Only process if variable expands to non-empty
43713
43714  if test "x$OBJDUMP" != x; then
43715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43716
43717  # First separate the path from the arguments. This will split at the first
43718  # space.
43719  complete="$OBJDUMP"
43720  path="${complete%% *}"
43721  tmp="$complete EOL"
43722  arguments="${tmp#* }"
43723
43724  # Input might be given as Windows format, start by converting to
43725  # unix format.
43726  new_path=`$CYGPATH -u "$path"`
43727
43728  # Now try to locate executable using which
43729  new_path=`$WHICH "$new_path" 2> /dev/null`
43730  # bat and cmd files are not always considered executable in cygwin causing which
43731  # to not find them
43732  if test "x$new_path" = x \
43733      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43734      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43735    new_path=`$CYGPATH -u "$path"`
43736  fi
43737  if test "x$new_path" = x; then
43738    # Oops. Which didn't find the executable.
43739    # The splitting of arguments from the executable at a space might have been incorrect,
43740    # since paths with space are more likely in Windows. Give it another try with the whole
43741    # argument.
43742    path="$complete"
43743    arguments="EOL"
43744    new_path=`$CYGPATH -u "$path"`
43745    new_path=`$WHICH "$new_path" 2> /dev/null`
43746    # bat and cmd files are not always considered executable in cygwin causing which
43747    # to not find them
43748    if test "x$new_path" = x \
43749        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43750        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43751      new_path=`$CYGPATH -u "$path"`
43752    fi
43753    if test "x$new_path" = x; then
43754      # It's still not found. Now this is an unrecoverable error.
43755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43756$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43757      has_space=`$ECHO "$complete" | $GREP " "`
43758      if test "x$has_space" != x; then
43759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43761      fi
43762      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43763    fi
43764  fi
43765
43766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43769  # "foo.exe" is OK but "foo" is an error.
43770  #
43771  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43772  # It is also a way to make sure we got the proper file name for the real test later on.
43773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43774  if test "x$test_shortpath" = x; then
43775    # Short path failed, file does not exist as specified.
43776    # Try adding .exe or .cmd
43777    if test -f "${new_path}.exe"; then
43778      input_to_shortpath="${new_path}.exe"
43779    elif test -f "${new_path}.cmd"; then
43780      input_to_shortpath="${new_path}.cmd"
43781    else
43782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43783$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43786      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43787    fi
43788  else
43789    input_to_shortpath="$new_path"
43790  fi
43791
43792  # Call helper function which possibly converts this using DOS-style short mode.
43793  # If so, the updated path is stored in $new_path.
43794  new_path="$input_to_shortpath"
43795
43796  input_path="$input_to_shortpath"
43797  # Check if we need to convert this using DOS-style short mode. If the path
43798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43799  # take no chances and rewrite it.
43800  # Note: m4 eats our [], so we need to use [ and ] instead.
43801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43802  if test "x$has_forbidden_chars" != x; then
43803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43807      # Going to short mode and back again did indeed matter. Since short mode is
43808      # case insensitive, let's make it lowercase to improve readability.
43809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43810      # Now convert it back to Unix-style (cygpath)
43811      input_path=`$CYGPATH -u "$shortmode_path"`
43812      new_path="$input_path"
43813    fi
43814  fi
43815
43816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43817  if test "x$test_cygdrive_prefix" = x; then
43818    # As a simple fix, exclude /usr/bin since it's not a real path.
43819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43821      # a path prefixed by /cygdrive for fixpath to work.
43822      new_path="$CYGWIN_ROOT_PATH$input_path"
43823    fi
43824  fi
43825
43826  # remove trailing .exe if any
43827  new_path="${new_path/%.exe/}"
43828
43829    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43830
43831  # First separate the path from the arguments. This will split at the first
43832  # space.
43833  complete="$OBJDUMP"
43834  path="${complete%% *}"
43835  tmp="$complete EOL"
43836  arguments="${tmp#* }"
43837
43838  # Input might be given as Windows format, start by converting to
43839  # unix format.
43840  new_path="$path"
43841
43842  windows_path="$new_path"
43843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43844    unix_path=`$CYGPATH -u "$windows_path"`
43845    new_path="$unix_path"
43846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43848    new_path="$unix_path"
43849  fi
43850
43851
43852  # Now try to locate executable using which
43853  new_path=`$WHICH "$new_path" 2> /dev/null`
43854
43855  if test "x$new_path" = x; then
43856    # Oops. Which didn't find the executable.
43857    # The splitting of arguments from the executable at a space might have been incorrect,
43858    # since paths with space are more likely in Windows. Give it another try with the whole
43859    # argument.
43860    path="$complete"
43861    arguments="EOL"
43862    new_path="$path"
43863
43864  windows_path="$new_path"
43865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43866    unix_path=`$CYGPATH -u "$windows_path"`
43867    new_path="$unix_path"
43868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43870    new_path="$unix_path"
43871  fi
43872
43873
43874    new_path=`$WHICH "$new_path" 2> /dev/null`
43875    # bat and cmd files are not always considered executable in MSYS causing which
43876    # to not find them
43877    if test "x$new_path" = x \
43878        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43879        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43880      new_path="$path"
43881
43882  windows_path="$new_path"
43883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43884    unix_path=`$CYGPATH -u "$windows_path"`
43885    new_path="$unix_path"
43886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43888    new_path="$unix_path"
43889  fi
43890
43891    fi
43892
43893    if test "x$new_path" = x; then
43894      # It's still not found. Now this is an unrecoverable error.
43895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43896$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43897      has_space=`$ECHO "$complete" | $GREP " "`
43898      if test "x$has_space" != x; then
43899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43901      fi
43902      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43903    fi
43904  fi
43905
43906  # Now new_path has a complete unix path to the binary
43907  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43908    # Keep paths in /bin as-is, but remove trailing .exe if any
43909    new_path="${new_path/%.exe/}"
43910    # Do not save /bin paths to all_fixpath_prefixes!
43911  else
43912    # Not in mixed or Windows style, start by that.
43913    new_path=`cmd //c echo $new_path`
43914
43915  input_path="$new_path"
43916  # Check if we need to convert this using DOS-style short mode. If the path
43917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43918  # take no chances and rewrite it.
43919  # Note: m4 eats our [], so we need to use [ and ] instead.
43920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43921  if test "x$has_forbidden_chars" != x; then
43922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43924  fi
43925
43926    # Output is in $new_path
43927
43928  windows_path="$new_path"
43929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43930    unix_path=`$CYGPATH -u "$windows_path"`
43931    new_path="$unix_path"
43932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43934    new_path="$unix_path"
43935  fi
43936
43937    # remove trailing .exe if any
43938    new_path="${new_path/%.exe/}"
43939
43940    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43941    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43942  fi
43943
43944    else
43945      # We're on a unix platform. Hooray! :)
43946      # First separate the path from the arguments. This will split at the first
43947      # space.
43948      complete="$OBJDUMP"
43949      path="${complete%% *}"
43950      tmp="$complete EOL"
43951      arguments="${tmp#* }"
43952
43953      # Cannot rely on the command "which" here since it doesn't always work.
43954      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43955      if test -z "$is_absolute_path"; then
43956        # Path to executable is not absolute. Find it.
43957        IFS_save="$IFS"
43958        IFS=:
43959        for p in $PATH; do
43960          if test -f "$p/$path" && test -x "$p/$path"; then
43961            new_path="$p/$path"
43962            break
43963          fi
43964        done
43965        IFS="$IFS_save"
43966      else
43967        # This is an absolute path, we can use it without further modifications.
43968        new_path="$path"
43969      fi
43970
43971      if test "x$new_path" = x; then
43972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43973$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43974        has_space=`$ECHO "$complete" | $GREP " "`
43975        if test "x$has_space" != x; then
43976          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43977$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43978        fi
43979        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43980      fi
43981    fi
43982
43983    # Now join together the path and the arguments once again
43984    if test "x$arguments" != xEOL; then
43985      new_complete="$new_path ${arguments% *}"
43986    else
43987      new_complete="$new_path"
43988    fi
43989
43990    if test "x$complete" != "x$new_complete"; then
43991      OBJDUMP="$new_complete"
43992      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43993$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43994    fi
43995  fi
43996
43997  fi
43998
43999
44000  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44001  # to remain in place. Otherwise the compiler will not work in some siutations
44002  # in later configure checks.
44003  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44004    PATH="$OLD_PATH"
44005  fi
44006
44007  # Restore the flags to the user specified values.
44008  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44009  CFLAGS="$ORG_CFLAGS"
44010  CXXFLAGS="$ORG_CXXFLAGS"
44011
44012
44013# Finally do some processing after the detection phase
44014
44015  if test "x$COMPILE_TYPE" = "xcross"; then
44016    # Now we need to find a C/C++ compiler that can build executables for the
44017    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44018    # used once. Also, we need to do this without adding a tools dir to the
44019    # path, otherwise we might pick up cross-compilers which don't use standard
44020    # naming.
44021
44022    OLDPATH="$PATH"
44023
44024
44025# Check whether --with-build-devkit was given.
44026if test "${with_build_devkit+set}" = set; then :
44027  withval=$with_build_devkit;
44028fi
44029
44030    if test "x$with_build_devkit" = "xyes"; then
44031      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44032    elif test -n "$with_build_devkit"; then
44033      if test ! -d "$with_build_devkit"; then
44034        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44035      else
44036
44037  # Only process if variable expands to non-empty
44038
44039  if test "x$with_build_devkit" != x; then
44040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44041
44042  # Input might be given as Windows format, start by converting to
44043  # unix format.
44044  path="$with_build_devkit"
44045  new_path=`$CYGPATH -u "$path"`
44046
44047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44050  # "foo.exe" is OK but "foo" is an error.
44051  #
44052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44053  # It is also a way to make sure we got the proper file name for the real test later on.
44054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44055  if test "x$test_shortpath" = x; then
44056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44057$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44058    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44059  fi
44060
44061  # Call helper function which possibly converts this using DOS-style short mode.
44062  # If so, the updated path is stored in $new_path.
44063
44064  input_path="$new_path"
44065  # Check if we need to convert this using DOS-style short mode. If the path
44066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44067  # take no chances and rewrite it.
44068  # Note: m4 eats our [], so we need to use [ and ] instead.
44069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44070  if test "x$has_forbidden_chars" != x; then
44071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44075      # Going to short mode and back again did indeed matter. Since short mode is
44076      # case insensitive, let's make it lowercase to improve readability.
44077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44078      # Now convert it back to Unix-style (cygpath)
44079      input_path=`$CYGPATH -u "$shortmode_path"`
44080      new_path="$input_path"
44081    fi
44082  fi
44083
44084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44085  if test "x$test_cygdrive_prefix" = x; then
44086    # As a simple fix, exclude /usr/bin since it's not a real path.
44087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44089      # a path prefixed by /cygdrive for fixpath to work.
44090      new_path="$CYGWIN_ROOT_PATH$input_path"
44091    fi
44092  fi
44093
44094
44095  if test "x$path" != "x$new_path"; then
44096    with_build_devkit="$new_path"
44097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44098$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44099  fi
44100
44101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44102
44103  path="$with_build_devkit"
44104  has_colon=`$ECHO $path | $GREP ^.:`
44105  new_path="$path"
44106  if test "x$has_colon" = x; then
44107    # Not in mixed or Windows style, start by that.
44108    new_path=`cmd //c echo $path`
44109  fi
44110
44111
44112  input_path="$new_path"
44113  # Check if we need to convert this using DOS-style short mode. If the path
44114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44115  # take no chances and rewrite it.
44116  # Note: m4 eats our [], so we need to use [ and ] instead.
44117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44118  if test "x$has_forbidden_chars" != x; then
44119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44121  fi
44122
44123
44124  windows_path="$new_path"
44125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44126    unix_path=`$CYGPATH -u "$windows_path"`
44127    new_path="$unix_path"
44128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44130    new_path="$unix_path"
44131  fi
44132
44133  if test "x$path" != "x$new_path"; then
44134    with_build_devkit="$new_path"
44135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44136$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44137  fi
44138
44139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44141
44142    else
44143      # We're on a unix platform. Hooray! :)
44144      path="$with_build_devkit"
44145      has_space=`$ECHO "$path" | $GREP " "`
44146      if test "x$has_space" != x; then
44147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44148$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44150      fi
44151
44152      # Use eval to expand a potential ~
44153      eval path="$path"
44154      if test ! -f "$path" && test ! -d "$path"; then
44155        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44156      fi
44157
44158      if test -d "$path"; then
44159        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44160      else
44161        dir="`$DIRNAME "$path"`"
44162        base="`$BASENAME "$path"`"
44163        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44164      fi
44165    fi
44166  fi
44167
44168        BUILD_DEVKIT_ROOT="$with_build_devkit"
44169        # Check for a meta data info file in the root of the devkit
44170        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44171          # Process devkit.info so that existing devkit variables are not
44172          # modified by this
44173          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44174              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44175              -e "s/\$host/\$build/g" \
44176              $BUILD_DEVKIT_ROOT/devkit.info \
44177              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44178          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44179          # This potentially sets the following:
44180          # A descriptive name of the devkit
44181
44182  if test "x$BUILD_DEVKIT_NAME" = x; then
44183    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44184  fi
44185
44186          # Corresponds to --with-extra-path
44187
44188  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44189    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44190  fi
44191
44192          # Corresponds to --with-toolchain-path
44193
44194  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44195    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44196  fi
44197
44198          # Corresponds to --with-sysroot
44199
44200  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44201    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44202  fi
44203
44204          # Skip the Window specific parts
44205        fi
44206
44207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44208$as_echo_n "checking for build platform devkit... " >&6; }
44209        if test "x$BUILD_DEVKIT_NAME" != x; then
44210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44211$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44212        else
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44214$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44215        fi
44216
44217        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44218
44219  if test "x$BUILD_SYSROOT" != "x"; then
44220    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44221      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44222        # Solaris Studio does not have a concept of sysroot. Instead we must
44223        # make sure the default include and lib dirs are appended to each
44224        # compile and link command line. Must also add -I-xbuiltin to enable
44225        # inlining of system functions and intrinsics.
44226        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44227        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44228            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44229      fi
44230    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44231      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44232      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44233    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44234      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44235      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44236    fi
44237    # The global CFLAGS and LDFLAGS variables need these for configure to function
44238    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44239    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44240    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44241    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44242  fi
44243
44244  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44245    # We also need -iframework<path>/System/Library/Frameworks
44246    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44247    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44248    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44249    # set this here so it doesn't have to be peppered throughout the forest
44250    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44251    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44252  fi
44253
44254
44255
44256
44257
44258         # Fallback default of just /bin if DEVKIT_PATH is not defined
44259        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44260          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44261        fi
44262        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44263      fi
44264    fi
44265
44266    # FIXME: we should list the discovered compilers as an exclude pattern!
44267    # If we do that, we can do this detection before POST_DETECTION, and still
44268    # find the build compilers in the tools dir, if needed.
44269
44270
44271
44272  # Publish this variable in the help.
44273
44274
44275  if [ -z "${BUILD_CC+x}" ]; then
44276    # The variable is not set by user, try to locate tool using the code snippet
44277    for ac_prog in cl cc gcc
44278do
44279  # Extract the first word of "$ac_prog", so it can be a program name with args.
44280set dummy $ac_prog; ac_word=$2
44281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44282$as_echo_n "checking for $ac_word... " >&6; }
44283if ${ac_cv_path_BUILD_CC+:} false; then :
44284  $as_echo_n "(cached) " >&6
44285else
44286  case $BUILD_CC in
44287  [\\/]* | ?:[\\/]*)
44288  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44289  ;;
44290  *)
44291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44292for as_dir in $PATH
44293do
44294  IFS=$as_save_IFS
44295  test -z "$as_dir" && as_dir=.
44296    for ac_exec_ext in '' $ac_executable_extensions; do
44297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44298    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44300    break 2
44301  fi
44302done
44303  done
44304IFS=$as_save_IFS
44305
44306  ;;
44307esac
44308fi
44309BUILD_CC=$ac_cv_path_BUILD_CC
44310if test -n "$BUILD_CC"; then
44311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44312$as_echo "$BUILD_CC" >&6; }
44313else
44314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44315$as_echo "no" >&6; }
44316fi
44317
44318
44319  test -n "$BUILD_CC" && break
44320done
44321
44322  else
44323    # The variable is set, but is it from the command line or the environment?
44324
44325    # Try to remove the string !BUILD_CC! from our list.
44326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44328      # If it failed, the variable was not from the command line. Ignore it,
44329      # but warn the user (except for BASH, which is always set by the calling BASH).
44330      if test "xBUILD_CC" != xBASH; then
44331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44332$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44333      fi
44334      # Try to locate tool using the code snippet
44335      for ac_prog in cl cc gcc
44336do
44337  # Extract the first word of "$ac_prog", so it can be a program name with args.
44338set dummy $ac_prog; ac_word=$2
44339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44340$as_echo_n "checking for $ac_word... " >&6; }
44341if ${ac_cv_path_BUILD_CC+:} false; then :
44342  $as_echo_n "(cached) " >&6
44343else
44344  case $BUILD_CC in
44345  [\\/]* | ?:[\\/]*)
44346  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44347  ;;
44348  *)
44349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44350for as_dir in $PATH
44351do
44352  IFS=$as_save_IFS
44353  test -z "$as_dir" && as_dir=.
44354    for ac_exec_ext in '' $ac_executable_extensions; do
44355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44356    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44358    break 2
44359  fi
44360done
44361  done
44362IFS=$as_save_IFS
44363
44364  ;;
44365esac
44366fi
44367BUILD_CC=$ac_cv_path_BUILD_CC
44368if test -n "$BUILD_CC"; then
44369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44370$as_echo "$BUILD_CC" >&6; }
44371else
44372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44373$as_echo "no" >&6; }
44374fi
44375
44376
44377  test -n "$BUILD_CC" && break
44378done
44379
44380    else
44381      # If it succeeded, then it was overridden by the user. We will use it
44382      # for the tool.
44383
44384      # First remove it from the list of overridden variables, so we can test
44385      # for unknown variables in the end.
44386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44387
44388      # Check if we try to supply an empty value
44389      if test "x$BUILD_CC" = x; then
44390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44391$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44393$as_echo_n "checking for BUILD_CC... " >&6; }
44394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44395$as_echo "disabled" >&6; }
44396      else
44397        # Check if the provided tool contains a complete path.
44398        tool_specified="$BUILD_CC"
44399        tool_basename="${tool_specified##*/}"
44400        if test "x$tool_basename" = "x$tool_specified"; then
44401          # A command without a complete path is provided, search $PATH.
44402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44403$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44404          # Extract the first word of "$tool_basename", so it can be a program name with args.
44405set dummy $tool_basename; ac_word=$2
44406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44407$as_echo_n "checking for $ac_word... " >&6; }
44408if ${ac_cv_path_BUILD_CC+:} false; then :
44409  $as_echo_n "(cached) " >&6
44410else
44411  case $BUILD_CC in
44412  [\\/]* | ?:[\\/]*)
44413  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44414  ;;
44415  *)
44416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44417for as_dir in $PATH
44418do
44419  IFS=$as_save_IFS
44420  test -z "$as_dir" && as_dir=.
44421    for ac_exec_ext in '' $ac_executable_extensions; do
44422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44423    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44425    break 2
44426  fi
44427done
44428  done
44429IFS=$as_save_IFS
44430
44431  ;;
44432esac
44433fi
44434BUILD_CC=$ac_cv_path_BUILD_CC
44435if test -n "$BUILD_CC"; then
44436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44437$as_echo "$BUILD_CC" >&6; }
44438else
44439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44440$as_echo "no" >&6; }
44441fi
44442
44443
44444          if test "x$BUILD_CC" = x; then
44445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44446          fi
44447        else
44448          # Otherwise we believe it is a complete path. Use it as it is.
44449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44450$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44452$as_echo_n "checking for BUILD_CC... " >&6; }
44453          if test ! -x "$tool_specified"; then
44454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44455$as_echo "not found" >&6; }
44456            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44457          fi
44458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44459$as_echo "$tool_specified" >&6; }
44460        fi
44461      fi
44462    fi
44463
44464  fi
44465
44466
44467
44468  if test "x$BUILD_CC" = x; then
44469    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44470  fi
44471
44472
44473
44474  # Only process if variable expands to non-empty
44475
44476  if test "x$BUILD_CC" != x; then
44477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44478
44479  # First separate the path from the arguments. This will split at the first
44480  # space.
44481  complete="$BUILD_CC"
44482  path="${complete%% *}"
44483  tmp="$complete EOL"
44484  arguments="${tmp#* }"
44485
44486  # Input might be given as Windows format, start by converting to
44487  # unix format.
44488  new_path=`$CYGPATH -u "$path"`
44489
44490  # Now try to locate executable using which
44491  new_path=`$WHICH "$new_path" 2> /dev/null`
44492  # bat and cmd files are not always considered executable in cygwin causing which
44493  # to not find them
44494  if test "x$new_path" = x \
44495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44497    new_path=`$CYGPATH -u "$path"`
44498  fi
44499  if test "x$new_path" = x; then
44500    # Oops. Which didn't find the executable.
44501    # The splitting of arguments from the executable at a space might have been incorrect,
44502    # since paths with space are more likely in Windows. Give it another try with the whole
44503    # argument.
44504    path="$complete"
44505    arguments="EOL"
44506    new_path=`$CYGPATH -u "$path"`
44507    new_path=`$WHICH "$new_path" 2> /dev/null`
44508    # bat and cmd files are not always considered executable in cygwin causing which
44509    # to not find them
44510    if test "x$new_path" = x \
44511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44513      new_path=`$CYGPATH -u "$path"`
44514    fi
44515    if test "x$new_path" = x; then
44516      # It's still not found. Now this is an unrecoverable error.
44517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44518$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44519      has_space=`$ECHO "$complete" | $GREP " "`
44520      if test "x$has_space" != x; then
44521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44523      fi
44524      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44525    fi
44526  fi
44527
44528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44531  # "foo.exe" is OK but "foo" is an error.
44532  #
44533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44534  # It is also a way to make sure we got the proper file name for the real test later on.
44535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44536  if test "x$test_shortpath" = x; then
44537    # Short path failed, file does not exist as specified.
44538    # Try adding .exe or .cmd
44539    if test -f "${new_path}.exe"; then
44540      input_to_shortpath="${new_path}.exe"
44541    elif test -f "${new_path}.cmd"; then
44542      input_to_shortpath="${new_path}.cmd"
44543    else
44544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44545$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44548      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44549    fi
44550  else
44551    input_to_shortpath="$new_path"
44552  fi
44553
44554  # Call helper function which possibly converts this using DOS-style short mode.
44555  # If so, the updated path is stored in $new_path.
44556  new_path="$input_to_shortpath"
44557
44558  input_path="$input_to_shortpath"
44559  # Check if we need to convert this using DOS-style short mode. If the path
44560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44561  # take no chances and rewrite it.
44562  # Note: m4 eats our [], so we need to use [ and ] instead.
44563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44564  if test "x$has_forbidden_chars" != x; then
44565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44569      # Going to short mode and back again did indeed matter. Since short mode is
44570      # case insensitive, let's make it lowercase to improve readability.
44571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44572      # Now convert it back to Unix-style (cygpath)
44573      input_path=`$CYGPATH -u "$shortmode_path"`
44574      new_path="$input_path"
44575    fi
44576  fi
44577
44578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44579  if test "x$test_cygdrive_prefix" = x; then
44580    # As a simple fix, exclude /usr/bin since it's not a real path.
44581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44583      # a path prefixed by /cygdrive for fixpath to work.
44584      new_path="$CYGWIN_ROOT_PATH$input_path"
44585    fi
44586  fi
44587
44588  # remove trailing .exe if any
44589  new_path="${new_path/%.exe/}"
44590
44591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44592
44593  # First separate the path from the arguments. This will split at the first
44594  # space.
44595  complete="$BUILD_CC"
44596  path="${complete%% *}"
44597  tmp="$complete EOL"
44598  arguments="${tmp#* }"
44599
44600  # Input might be given as Windows format, start by converting to
44601  # unix format.
44602  new_path="$path"
44603
44604  windows_path="$new_path"
44605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44606    unix_path=`$CYGPATH -u "$windows_path"`
44607    new_path="$unix_path"
44608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44610    new_path="$unix_path"
44611  fi
44612
44613
44614  # Now try to locate executable using which
44615  new_path=`$WHICH "$new_path" 2> /dev/null`
44616
44617  if test "x$new_path" = x; then
44618    # Oops. Which didn't find the executable.
44619    # The splitting of arguments from the executable at a space might have been incorrect,
44620    # since paths with space are more likely in Windows. Give it another try with the whole
44621    # argument.
44622    path="$complete"
44623    arguments="EOL"
44624    new_path="$path"
44625
44626  windows_path="$new_path"
44627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44628    unix_path=`$CYGPATH -u "$windows_path"`
44629    new_path="$unix_path"
44630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44632    new_path="$unix_path"
44633  fi
44634
44635
44636    new_path=`$WHICH "$new_path" 2> /dev/null`
44637    # bat and cmd files are not always considered executable in MSYS causing which
44638    # to not find them
44639    if test "x$new_path" = x \
44640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44642      new_path="$path"
44643
44644  windows_path="$new_path"
44645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44646    unix_path=`$CYGPATH -u "$windows_path"`
44647    new_path="$unix_path"
44648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44650    new_path="$unix_path"
44651  fi
44652
44653    fi
44654
44655    if test "x$new_path" = x; then
44656      # It's still not found. Now this is an unrecoverable error.
44657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44658$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44659      has_space=`$ECHO "$complete" | $GREP " "`
44660      if test "x$has_space" != x; then
44661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44663      fi
44664      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44665    fi
44666  fi
44667
44668  # Now new_path has a complete unix path to the binary
44669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44670    # Keep paths in /bin as-is, but remove trailing .exe if any
44671    new_path="${new_path/%.exe/}"
44672    # Do not save /bin paths to all_fixpath_prefixes!
44673  else
44674    # Not in mixed or Windows style, start by that.
44675    new_path=`cmd //c echo $new_path`
44676
44677  input_path="$new_path"
44678  # Check if we need to convert this using DOS-style short mode. If the path
44679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44680  # take no chances and rewrite it.
44681  # Note: m4 eats our [], so we need to use [ and ] instead.
44682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44683  if test "x$has_forbidden_chars" != x; then
44684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44686  fi
44687
44688    # Output is in $new_path
44689
44690  windows_path="$new_path"
44691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44692    unix_path=`$CYGPATH -u "$windows_path"`
44693    new_path="$unix_path"
44694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44696    new_path="$unix_path"
44697  fi
44698
44699    # remove trailing .exe if any
44700    new_path="${new_path/%.exe/}"
44701
44702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44704  fi
44705
44706    else
44707      # We're on a unix platform. Hooray! :)
44708      # First separate the path from the arguments. This will split at the first
44709      # space.
44710      complete="$BUILD_CC"
44711      path="${complete%% *}"
44712      tmp="$complete EOL"
44713      arguments="${tmp#* }"
44714
44715      # Cannot rely on the command "which" here since it doesn't always work.
44716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44717      if test -z "$is_absolute_path"; then
44718        # Path to executable is not absolute. Find it.
44719        IFS_save="$IFS"
44720        IFS=:
44721        for p in $PATH; do
44722          if test -f "$p/$path" && test -x "$p/$path"; then
44723            new_path="$p/$path"
44724            break
44725          fi
44726        done
44727        IFS="$IFS_save"
44728      else
44729        # This is an absolute path, we can use it without further modifications.
44730        new_path="$path"
44731      fi
44732
44733      if test "x$new_path" = x; then
44734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44735$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44736        has_space=`$ECHO "$complete" | $GREP " "`
44737        if test "x$has_space" != x; then
44738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44740        fi
44741        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44742      fi
44743    fi
44744
44745    # Now join together the path and the arguments once again
44746    if test "x$arguments" != xEOL; then
44747      new_complete="$new_path ${arguments% *}"
44748    else
44749      new_complete="$new_path"
44750    fi
44751
44752    if test "x$complete" != "x$new_complete"; then
44753      BUILD_CC="$new_complete"
44754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44755$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44756    fi
44757  fi
44758
44759
44760
44761
44762  # Publish this variable in the help.
44763
44764
44765  if [ -z "${BUILD_CXX+x}" ]; then
44766    # The variable is not set by user, try to locate tool using the code snippet
44767    for ac_prog in cl CC g++
44768do
44769  # Extract the first word of "$ac_prog", so it can be a program name with args.
44770set dummy $ac_prog; ac_word=$2
44771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44772$as_echo_n "checking for $ac_word... " >&6; }
44773if ${ac_cv_path_BUILD_CXX+:} false; then :
44774  $as_echo_n "(cached) " >&6
44775else
44776  case $BUILD_CXX in
44777  [\\/]* | ?:[\\/]*)
44778  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44779  ;;
44780  *)
44781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44782for as_dir in $PATH
44783do
44784  IFS=$as_save_IFS
44785  test -z "$as_dir" && as_dir=.
44786    for ac_exec_ext in '' $ac_executable_extensions; do
44787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44788    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44790    break 2
44791  fi
44792done
44793  done
44794IFS=$as_save_IFS
44795
44796  ;;
44797esac
44798fi
44799BUILD_CXX=$ac_cv_path_BUILD_CXX
44800if test -n "$BUILD_CXX"; then
44801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44802$as_echo "$BUILD_CXX" >&6; }
44803else
44804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44805$as_echo "no" >&6; }
44806fi
44807
44808
44809  test -n "$BUILD_CXX" && break
44810done
44811
44812  else
44813    # The variable is set, but is it from the command line or the environment?
44814
44815    # Try to remove the string !BUILD_CXX! from our list.
44816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44818      # If it failed, the variable was not from the command line. Ignore it,
44819      # but warn the user (except for BASH, which is always set by the calling BASH).
44820      if test "xBUILD_CXX" != xBASH; then
44821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44822$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44823      fi
44824      # Try to locate tool using the code snippet
44825      for ac_prog in cl CC g++
44826do
44827  # Extract the first word of "$ac_prog", so it can be a program name with args.
44828set dummy $ac_prog; ac_word=$2
44829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44830$as_echo_n "checking for $ac_word... " >&6; }
44831if ${ac_cv_path_BUILD_CXX+:} false; then :
44832  $as_echo_n "(cached) " >&6
44833else
44834  case $BUILD_CXX in
44835  [\\/]* | ?:[\\/]*)
44836  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44837  ;;
44838  *)
44839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44840for as_dir in $PATH
44841do
44842  IFS=$as_save_IFS
44843  test -z "$as_dir" && as_dir=.
44844    for ac_exec_ext in '' $ac_executable_extensions; do
44845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44846    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44848    break 2
44849  fi
44850done
44851  done
44852IFS=$as_save_IFS
44853
44854  ;;
44855esac
44856fi
44857BUILD_CXX=$ac_cv_path_BUILD_CXX
44858if test -n "$BUILD_CXX"; then
44859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44860$as_echo "$BUILD_CXX" >&6; }
44861else
44862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44863$as_echo "no" >&6; }
44864fi
44865
44866
44867  test -n "$BUILD_CXX" && break
44868done
44869
44870    else
44871      # If it succeeded, then it was overridden by the user. We will use it
44872      # for the tool.
44873
44874      # First remove it from the list of overridden variables, so we can test
44875      # for unknown variables in the end.
44876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44877
44878      # Check if we try to supply an empty value
44879      if test "x$BUILD_CXX" = x; then
44880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44881$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44883$as_echo_n "checking for BUILD_CXX... " >&6; }
44884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44885$as_echo "disabled" >&6; }
44886      else
44887        # Check if the provided tool contains a complete path.
44888        tool_specified="$BUILD_CXX"
44889        tool_basename="${tool_specified##*/}"
44890        if test "x$tool_basename" = "x$tool_specified"; then
44891          # A command without a complete path is provided, search $PATH.
44892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44893$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44894          # Extract the first word of "$tool_basename", so it can be a program name with args.
44895set dummy $tool_basename; ac_word=$2
44896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44897$as_echo_n "checking for $ac_word... " >&6; }
44898if ${ac_cv_path_BUILD_CXX+:} false; then :
44899  $as_echo_n "(cached) " >&6
44900else
44901  case $BUILD_CXX in
44902  [\\/]* | ?:[\\/]*)
44903  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44904  ;;
44905  *)
44906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44907for as_dir in $PATH
44908do
44909  IFS=$as_save_IFS
44910  test -z "$as_dir" && as_dir=.
44911    for ac_exec_ext in '' $ac_executable_extensions; do
44912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44913    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44915    break 2
44916  fi
44917done
44918  done
44919IFS=$as_save_IFS
44920
44921  ;;
44922esac
44923fi
44924BUILD_CXX=$ac_cv_path_BUILD_CXX
44925if test -n "$BUILD_CXX"; then
44926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44927$as_echo "$BUILD_CXX" >&6; }
44928else
44929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44930$as_echo "no" >&6; }
44931fi
44932
44933
44934          if test "x$BUILD_CXX" = x; then
44935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44936          fi
44937        else
44938          # Otherwise we believe it is a complete path. Use it as it is.
44939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44940$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44942$as_echo_n "checking for BUILD_CXX... " >&6; }
44943          if test ! -x "$tool_specified"; then
44944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44945$as_echo "not found" >&6; }
44946            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44947          fi
44948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44949$as_echo "$tool_specified" >&6; }
44950        fi
44951      fi
44952    fi
44953
44954  fi
44955
44956
44957
44958  if test "x$BUILD_CXX" = x; then
44959    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44960  fi
44961
44962
44963
44964  # Only process if variable expands to non-empty
44965
44966  if test "x$BUILD_CXX" != x; then
44967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44968
44969  # First separate the path from the arguments. This will split at the first
44970  # space.
44971  complete="$BUILD_CXX"
44972  path="${complete%% *}"
44973  tmp="$complete EOL"
44974  arguments="${tmp#* }"
44975
44976  # Input might be given as Windows format, start by converting to
44977  # unix format.
44978  new_path=`$CYGPATH -u "$path"`
44979
44980  # Now try to locate executable using which
44981  new_path=`$WHICH "$new_path" 2> /dev/null`
44982  # bat and cmd files are not always considered executable in cygwin causing which
44983  # to not find them
44984  if test "x$new_path" = x \
44985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44987    new_path=`$CYGPATH -u "$path"`
44988  fi
44989  if test "x$new_path" = x; then
44990    # Oops. Which didn't find the executable.
44991    # The splitting of arguments from the executable at a space might have been incorrect,
44992    # since paths with space are more likely in Windows. Give it another try with the whole
44993    # argument.
44994    path="$complete"
44995    arguments="EOL"
44996    new_path=`$CYGPATH -u "$path"`
44997    new_path=`$WHICH "$new_path" 2> /dev/null`
44998    # bat and cmd files are not always considered executable in cygwin causing which
44999    # to not find them
45000    if test "x$new_path" = x \
45001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45003      new_path=`$CYGPATH -u "$path"`
45004    fi
45005    if test "x$new_path" = x; then
45006      # It's still not found. Now this is an unrecoverable error.
45007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45008$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45009      has_space=`$ECHO "$complete" | $GREP " "`
45010      if test "x$has_space" != x; then
45011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45013      fi
45014      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45015    fi
45016  fi
45017
45018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45021  # "foo.exe" is OK but "foo" is an error.
45022  #
45023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45024  # It is also a way to make sure we got the proper file name for the real test later on.
45025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45026  if test "x$test_shortpath" = x; then
45027    # Short path failed, file does not exist as specified.
45028    # Try adding .exe or .cmd
45029    if test -f "${new_path}.exe"; then
45030      input_to_shortpath="${new_path}.exe"
45031    elif test -f "${new_path}.cmd"; then
45032      input_to_shortpath="${new_path}.cmd"
45033    else
45034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45035$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45038      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45039    fi
45040  else
45041    input_to_shortpath="$new_path"
45042  fi
45043
45044  # Call helper function which possibly converts this using DOS-style short mode.
45045  # If so, the updated path is stored in $new_path.
45046  new_path="$input_to_shortpath"
45047
45048  input_path="$input_to_shortpath"
45049  # Check if we need to convert this using DOS-style short mode. If the path
45050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45051  # take no chances and rewrite it.
45052  # Note: m4 eats our [], so we need to use [ and ] instead.
45053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45054  if test "x$has_forbidden_chars" != x; then
45055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45059      # Going to short mode and back again did indeed matter. Since short mode is
45060      # case insensitive, let's make it lowercase to improve readability.
45061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45062      # Now convert it back to Unix-style (cygpath)
45063      input_path=`$CYGPATH -u "$shortmode_path"`
45064      new_path="$input_path"
45065    fi
45066  fi
45067
45068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45069  if test "x$test_cygdrive_prefix" = x; then
45070    # As a simple fix, exclude /usr/bin since it's not a real path.
45071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45073      # a path prefixed by /cygdrive for fixpath to work.
45074      new_path="$CYGWIN_ROOT_PATH$input_path"
45075    fi
45076  fi
45077
45078  # remove trailing .exe if any
45079  new_path="${new_path/%.exe/}"
45080
45081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45082
45083  # First separate the path from the arguments. This will split at the first
45084  # space.
45085  complete="$BUILD_CXX"
45086  path="${complete%% *}"
45087  tmp="$complete EOL"
45088  arguments="${tmp#* }"
45089
45090  # Input might be given as Windows format, start by converting to
45091  # unix format.
45092  new_path="$path"
45093
45094  windows_path="$new_path"
45095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45096    unix_path=`$CYGPATH -u "$windows_path"`
45097    new_path="$unix_path"
45098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45100    new_path="$unix_path"
45101  fi
45102
45103
45104  # Now try to locate executable using which
45105  new_path=`$WHICH "$new_path" 2> /dev/null`
45106
45107  if test "x$new_path" = x; then
45108    # Oops. Which didn't find the executable.
45109    # The splitting of arguments from the executable at a space might have been incorrect,
45110    # since paths with space are more likely in Windows. Give it another try with the whole
45111    # argument.
45112    path="$complete"
45113    arguments="EOL"
45114    new_path="$path"
45115
45116  windows_path="$new_path"
45117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45118    unix_path=`$CYGPATH -u "$windows_path"`
45119    new_path="$unix_path"
45120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45122    new_path="$unix_path"
45123  fi
45124
45125
45126    new_path=`$WHICH "$new_path" 2> /dev/null`
45127    # bat and cmd files are not always considered executable in MSYS causing which
45128    # to not find them
45129    if test "x$new_path" = x \
45130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45132      new_path="$path"
45133
45134  windows_path="$new_path"
45135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45136    unix_path=`$CYGPATH -u "$windows_path"`
45137    new_path="$unix_path"
45138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45140    new_path="$unix_path"
45141  fi
45142
45143    fi
45144
45145    if test "x$new_path" = x; then
45146      # It's still not found. Now this is an unrecoverable error.
45147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45148$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45149      has_space=`$ECHO "$complete" | $GREP " "`
45150      if test "x$has_space" != x; then
45151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45153      fi
45154      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45155    fi
45156  fi
45157
45158  # Now new_path has a complete unix path to the binary
45159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45160    # Keep paths in /bin as-is, but remove trailing .exe if any
45161    new_path="${new_path/%.exe/}"
45162    # Do not save /bin paths to all_fixpath_prefixes!
45163  else
45164    # Not in mixed or Windows style, start by that.
45165    new_path=`cmd //c echo $new_path`
45166
45167  input_path="$new_path"
45168  # Check if we need to convert this using DOS-style short mode. If the path
45169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45170  # take no chances and rewrite it.
45171  # Note: m4 eats our [], so we need to use [ and ] instead.
45172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45173  if test "x$has_forbidden_chars" != x; then
45174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45176  fi
45177
45178    # Output is in $new_path
45179
45180  windows_path="$new_path"
45181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45182    unix_path=`$CYGPATH -u "$windows_path"`
45183    new_path="$unix_path"
45184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45186    new_path="$unix_path"
45187  fi
45188
45189    # remove trailing .exe if any
45190    new_path="${new_path/%.exe/}"
45191
45192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45194  fi
45195
45196    else
45197      # We're on a unix platform. Hooray! :)
45198      # First separate the path from the arguments. This will split at the first
45199      # space.
45200      complete="$BUILD_CXX"
45201      path="${complete%% *}"
45202      tmp="$complete EOL"
45203      arguments="${tmp#* }"
45204
45205      # Cannot rely on the command "which" here since it doesn't always work.
45206      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45207      if test -z "$is_absolute_path"; then
45208        # Path to executable is not absolute. Find it.
45209        IFS_save="$IFS"
45210        IFS=:
45211        for p in $PATH; do
45212          if test -f "$p/$path" && test -x "$p/$path"; then
45213            new_path="$p/$path"
45214            break
45215          fi
45216        done
45217        IFS="$IFS_save"
45218      else
45219        # This is an absolute path, we can use it without further modifications.
45220        new_path="$path"
45221      fi
45222
45223      if test "x$new_path" = x; then
45224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45225$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45226        has_space=`$ECHO "$complete" | $GREP " "`
45227        if test "x$has_space" != x; then
45228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45230        fi
45231        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45232      fi
45233    fi
45234
45235    # Now join together the path and the arguments once again
45236    if test "x$arguments" != xEOL; then
45237      new_complete="$new_path ${arguments% *}"
45238    else
45239      new_complete="$new_path"
45240    fi
45241
45242    if test "x$complete" != "x$new_complete"; then
45243      BUILD_CXX="$new_complete"
45244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45245$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45246    fi
45247  fi
45248
45249
45250
45251  # Publish this variable in the help.
45252
45253
45254  if [ -z "${BUILD_NM+x}" ]; then
45255    # The variable is not set by user, try to locate tool using the code snippet
45256    for ac_prog in nm gcc-nm
45257do
45258  # Extract the first word of "$ac_prog", so it can be a program name with args.
45259set dummy $ac_prog; ac_word=$2
45260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45261$as_echo_n "checking for $ac_word... " >&6; }
45262if ${ac_cv_path_BUILD_NM+:} false; then :
45263  $as_echo_n "(cached) " >&6
45264else
45265  case $BUILD_NM in
45266  [\\/]* | ?:[\\/]*)
45267  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45268  ;;
45269  *)
45270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45271for as_dir in $PATH
45272do
45273  IFS=$as_save_IFS
45274  test -z "$as_dir" && as_dir=.
45275    for ac_exec_ext in '' $ac_executable_extensions; do
45276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45277    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45279    break 2
45280  fi
45281done
45282  done
45283IFS=$as_save_IFS
45284
45285  ;;
45286esac
45287fi
45288BUILD_NM=$ac_cv_path_BUILD_NM
45289if test -n "$BUILD_NM"; then
45290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45291$as_echo "$BUILD_NM" >&6; }
45292else
45293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45294$as_echo "no" >&6; }
45295fi
45296
45297
45298  test -n "$BUILD_NM" && break
45299done
45300
45301  else
45302    # The variable is set, but is it from the command line or the environment?
45303
45304    # Try to remove the string !BUILD_NM! from our list.
45305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45307      # If it failed, the variable was not from the command line. Ignore it,
45308      # but warn the user (except for BASH, which is always set by the calling BASH).
45309      if test "xBUILD_NM" != xBASH; then
45310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45311$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45312      fi
45313      # Try to locate tool using the code snippet
45314      for ac_prog in nm gcc-nm
45315do
45316  # Extract the first word of "$ac_prog", so it can be a program name with args.
45317set dummy $ac_prog; ac_word=$2
45318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45319$as_echo_n "checking for $ac_word... " >&6; }
45320if ${ac_cv_path_BUILD_NM+:} false; then :
45321  $as_echo_n "(cached) " >&6
45322else
45323  case $BUILD_NM in
45324  [\\/]* | ?:[\\/]*)
45325  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45326  ;;
45327  *)
45328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45329for as_dir in $PATH
45330do
45331  IFS=$as_save_IFS
45332  test -z "$as_dir" && as_dir=.
45333    for ac_exec_ext in '' $ac_executable_extensions; do
45334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45335    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45337    break 2
45338  fi
45339done
45340  done
45341IFS=$as_save_IFS
45342
45343  ;;
45344esac
45345fi
45346BUILD_NM=$ac_cv_path_BUILD_NM
45347if test -n "$BUILD_NM"; then
45348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45349$as_echo "$BUILD_NM" >&6; }
45350else
45351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45352$as_echo "no" >&6; }
45353fi
45354
45355
45356  test -n "$BUILD_NM" && break
45357done
45358
45359    else
45360      # If it succeeded, then it was overridden by the user. We will use it
45361      # for the tool.
45362
45363      # First remove it from the list of overridden variables, so we can test
45364      # for unknown variables in the end.
45365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45366
45367      # Check if we try to supply an empty value
45368      if test "x$BUILD_NM" = x; then
45369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45370$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45372$as_echo_n "checking for BUILD_NM... " >&6; }
45373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45374$as_echo "disabled" >&6; }
45375      else
45376        # Check if the provided tool contains a complete path.
45377        tool_specified="$BUILD_NM"
45378        tool_basename="${tool_specified##*/}"
45379        if test "x$tool_basename" = "x$tool_specified"; then
45380          # A command without a complete path is provided, search $PATH.
45381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45382$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45383          # Extract the first word of "$tool_basename", so it can be a program name with args.
45384set dummy $tool_basename; ac_word=$2
45385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45386$as_echo_n "checking for $ac_word... " >&6; }
45387if ${ac_cv_path_BUILD_NM+:} false; then :
45388  $as_echo_n "(cached) " >&6
45389else
45390  case $BUILD_NM in
45391  [\\/]* | ?:[\\/]*)
45392  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45393  ;;
45394  *)
45395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45396for as_dir in $PATH
45397do
45398  IFS=$as_save_IFS
45399  test -z "$as_dir" && as_dir=.
45400    for ac_exec_ext in '' $ac_executable_extensions; do
45401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45402    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45404    break 2
45405  fi
45406done
45407  done
45408IFS=$as_save_IFS
45409
45410  ;;
45411esac
45412fi
45413BUILD_NM=$ac_cv_path_BUILD_NM
45414if test -n "$BUILD_NM"; then
45415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45416$as_echo "$BUILD_NM" >&6; }
45417else
45418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45419$as_echo "no" >&6; }
45420fi
45421
45422
45423          if test "x$BUILD_NM" = x; then
45424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45425          fi
45426        else
45427          # Otherwise we believe it is a complete path. Use it as it is.
45428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45429$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45431$as_echo_n "checking for BUILD_NM... " >&6; }
45432          if test ! -x "$tool_specified"; then
45433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45434$as_echo "not found" >&6; }
45435            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45436          fi
45437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45438$as_echo "$tool_specified" >&6; }
45439        fi
45440      fi
45441    fi
45442
45443  fi
45444
45445
45446
45447  # Only process if variable expands to non-empty
45448
45449  if test "x$BUILD_NM" != x; then
45450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45451
45452  # First separate the path from the arguments. This will split at the first
45453  # space.
45454  complete="$BUILD_NM"
45455  path="${complete%% *}"
45456  tmp="$complete EOL"
45457  arguments="${tmp#* }"
45458
45459  # Input might be given as Windows format, start by converting to
45460  # unix format.
45461  new_path=`$CYGPATH -u "$path"`
45462
45463  # Now try to locate executable using which
45464  new_path=`$WHICH "$new_path" 2> /dev/null`
45465  # bat and cmd files are not always considered executable in cygwin causing which
45466  # to not find them
45467  if test "x$new_path" = x \
45468      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45469      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45470    new_path=`$CYGPATH -u "$path"`
45471  fi
45472  if test "x$new_path" = x; then
45473    # Oops. Which didn't find the executable.
45474    # The splitting of arguments from the executable at a space might have been incorrect,
45475    # since paths with space are more likely in Windows. Give it another try with the whole
45476    # argument.
45477    path="$complete"
45478    arguments="EOL"
45479    new_path=`$CYGPATH -u "$path"`
45480    new_path=`$WHICH "$new_path" 2> /dev/null`
45481    # bat and cmd files are not always considered executable in cygwin causing which
45482    # to not find them
45483    if test "x$new_path" = x \
45484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45486      new_path=`$CYGPATH -u "$path"`
45487    fi
45488    if test "x$new_path" = x; then
45489      # It's still not found. Now this is an unrecoverable error.
45490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45491$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45492      has_space=`$ECHO "$complete" | $GREP " "`
45493      if test "x$has_space" != x; then
45494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45496      fi
45497      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45498    fi
45499  fi
45500
45501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45504  # "foo.exe" is OK but "foo" is an error.
45505  #
45506  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45507  # It is also a way to make sure we got the proper file name for the real test later on.
45508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45509  if test "x$test_shortpath" = x; then
45510    # Short path failed, file does not exist as specified.
45511    # Try adding .exe or .cmd
45512    if test -f "${new_path}.exe"; then
45513      input_to_shortpath="${new_path}.exe"
45514    elif test -f "${new_path}.cmd"; then
45515      input_to_shortpath="${new_path}.cmd"
45516    else
45517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45518$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45521      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45522    fi
45523  else
45524    input_to_shortpath="$new_path"
45525  fi
45526
45527  # Call helper function which possibly converts this using DOS-style short mode.
45528  # If so, the updated path is stored in $new_path.
45529  new_path="$input_to_shortpath"
45530
45531  input_path="$input_to_shortpath"
45532  # Check if we need to convert this using DOS-style short mode. If the path
45533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45534  # take no chances and rewrite it.
45535  # Note: m4 eats our [], so we need to use [ and ] instead.
45536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45537  if test "x$has_forbidden_chars" != x; then
45538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45542      # Going to short mode and back again did indeed matter. Since short mode is
45543      # case insensitive, let's make it lowercase to improve readability.
45544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45545      # Now convert it back to Unix-style (cygpath)
45546      input_path=`$CYGPATH -u "$shortmode_path"`
45547      new_path="$input_path"
45548    fi
45549  fi
45550
45551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45552  if test "x$test_cygdrive_prefix" = x; then
45553    # As a simple fix, exclude /usr/bin since it's not a real path.
45554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45556      # a path prefixed by /cygdrive for fixpath to work.
45557      new_path="$CYGWIN_ROOT_PATH$input_path"
45558    fi
45559  fi
45560
45561  # remove trailing .exe if any
45562  new_path="${new_path/%.exe/}"
45563
45564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45565
45566  # First separate the path from the arguments. This will split at the first
45567  # space.
45568  complete="$BUILD_NM"
45569  path="${complete%% *}"
45570  tmp="$complete EOL"
45571  arguments="${tmp#* }"
45572
45573  # Input might be given as Windows format, start by converting to
45574  # unix format.
45575  new_path="$path"
45576
45577  windows_path="$new_path"
45578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45579    unix_path=`$CYGPATH -u "$windows_path"`
45580    new_path="$unix_path"
45581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45583    new_path="$unix_path"
45584  fi
45585
45586
45587  # Now try to locate executable using which
45588  new_path=`$WHICH "$new_path" 2> /dev/null`
45589
45590  if test "x$new_path" = x; then
45591    # Oops. Which didn't find the executable.
45592    # The splitting of arguments from the executable at a space might have been incorrect,
45593    # since paths with space are more likely in Windows. Give it another try with the whole
45594    # argument.
45595    path="$complete"
45596    arguments="EOL"
45597    new_path="$path"
45598
45599  windows_path="$new_path"
45600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45601    unix_path=`$CYGPATH -u "$windows_path"`
45602    new_path="$unix_path"
45603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45605    new_path="$unix_path"
45606  fi
45607
45608
45609    new_path=`$WHICH "$new_path" 2> /dev/null`
45610    # bat and cmd files are not always considered executable in MSYS causing which
45611    # to not find them
45612    if test "x$new_path" = x \
45613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45615      new_path="$path"
45616
45617  windows_path="$new_path"
45618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45619    unix_path=`$CYGPATH -u "$windows_path"`
45620    new_path="$unix_path"
45621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45623    new_path="$unix_path"
45624  fi
45625
45626    fi
45627
45628    if test "x$new_path" = x; then
45629      # It's still not found. Now this is an unrecoverable error.
45630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45631$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45632      has_space=`$ECHO "$complete" | $GREP " "`
45633      if test "x$has_space" != x; then
45634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45636      fi
45637      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45638    fi
45639  fi
45640
45641  # Now new_path has a complete unix path to the binary
45642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45643    # Keep paths in /bin as-is, but remove trailing .exe if any
45644    new_path="${new_path/%.exe/}"
45645    # Do not save /bin paths to all_fixpath_prefixes!
45646  else
45647    # Not in mixed or Windows style, start by that.
45648    new_path=`cmd //c echo $new_path`
45649
45650  input_path="$new_path"
45651  # Check if we need to convert this using DOS-style short mode. If the path
45652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45653  # take no chances and rewrite it.
45654  # Note: m4 eats our [], so we need to use [ and ] instead.
45655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45656  if test "x$has_forbidden_chars" != x; then
45657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45659  fi
45660
45661    # Output is in $new_path
45662
45663  windows_path="$new_path"
45664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45665    unix_path=`$CYGPATH -u "$windows_path"`
45666    new_path="$unix_path"
45667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45669    new_path="$unix_path"
45670  fi
45671
45672    # remove trailing .exe if any
45673    new_path="${new_path/%.exe/}"
45674
45675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45677  fi
45678
45679    else
45680      # We're on a unix platform. Hooray! :)
45681      # First separate the path from the arguments. This will split at the first
45682      # space.
45683      complete="$BUILD_NM"
45684      path="${complete%% *}"
45685      tmp="$complete EOL"
45686      arguments="${tmp#* }"
45687
45688      # Cannot rely on the command "which" here since it doesn't always work.
45689      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45690      if test -z "$is_absolute_path"; then
45691        # Path to executable is not absolute. Find it.
45692        IFS_save="$IFS"
45693        IFS=:
45694        for p in $PATH; do
45695          if test -f "$p/$path" && test -x "$p/$path"; then
45696            new_path="$p/$path"
45697            break
45698          fi
45699        done
45700        IFS="$IFS_save"
45701      else
45702        # This is an absolute path, we can use it without further modifications.
45703        new_path="$path"
45704      fi
45705
45706      if test "x$new_path" = x; then
45707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45708$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45709        has_space=`$ECHO "$complete" | $GREP " "`
45710        if test "x$has_space" != x; then
45711          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45712$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45713        fi
45714        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45715      fi
45716    fi
45717
45718    # Now join together the path and the arguments once again
45719    if test "x$arguments" != xEOL; then
45720      new_complete="$new_path ${arguments% *}"
45721    else
45722      new_complete="$new_path"
45723    fi
45724
45725    if test "x$complete" != "x$new_complete"; then
45726      BUILD_NM="$new_complete"
45727      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45728$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45729    fi
45730  fi
45731
45732
45733
45734  # Publish this variable in the help.
45735
45736
45737  if [ -z "${BUILD_AR+x}" ]; then
45738    # The variable is not set by user, try to locate tool using the code snippet
45739    for ac_prog in ar gcc-ar
45740do
45741  # Extract the first word of "$ac_prog", so it can be a program name with args.
45742set dummy $ac_prog; ac_word=$2
45743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45744$as_echo_n "checking for $ac_word... " >&6; }
45745if ${ac_cv_path_BUILD_AR+:} false; then :
45746  $as_echo_n "(cached) " >&6
45747else
45748  case $BUILD_AR in
45749  [\\/]* | ?:[\\/]*)
45750  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45751  ;;
45752  *)
45753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45754for as_dir in $PATH
45755do
45756  IFS=$as_save_IFS
45757  test -z "$as_dir" && as_dir=.
45758    for ac_exec_ext in '' $ac_executable_extensions; do
45759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45760    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45762    break 2
45763  fi
45764done
45765  done
45766IFS=$as_save_IFS
45767
45768  ;;
45769esac
45770fi
45771BUILD_AR=$ac_cv_path_BUILD_AR
45772if test -n "$BUILD_AR"; then
45773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45774$as_echo "$BUILD_AR" >&6; }
45775else
45776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45777$as_echo "no" >&6; }
45778fi
45779
45780
45781  test -n "$BUILD_AR" && break
45782done
45783
45784  else
45785    # The variable is set, but is it from the command line or the environment?
45786
45787    # Try to remove the string !BUILD_AR! from our list.
45788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45790      # If it failed, the variable was not from the command line. Ignore it,
45791      # but warn the user (except for BASH, which is always set by the calling BASH).
45792      if test "xBUILD_AR" != xBASH; then
45793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45794$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45795      fi
45796      # Try to locate tool using the code snippet
45797      for ac_prog in ar gcc-ar
45798do
45799  # Extract the first word of "$ac_prog", so it can be a program name with args.
45800set dummy $ac_prog; ac_word=$2
45801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45802$as_echo_n "checking for $ac_word... " >&6; }
45803if ${ac_cv_path_BUILD_AR+:} false; then :
45804  $as_echo_n "(cached) " >&6
45805else
45806  case $BUILD_AR in
45807  [\\/]* | ?:[\\/]*)
45808  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45809  ;;
45810  *)
45811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45812for as_dir in $PATH
45813do
45814  IFS=$as_save_IFS
45815  test -z "$as_dir" && as_dir=.
45816    for ac_exec_ext in '' $ac_executable_extensions; do
45817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45818    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45820    break 2
45821  fi
45822done
45823  done
45824IFS=$as_save_IFS
45825
45826  ;;
45827esac
45828fi
45829BUILD_AR=$ac_cv_path_BUILD_AR
45830if test -n "$BUILD_AR"; then
45831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45832$as_echo "$BUILD_AR" >&6; }
45833else
45834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45835$as_echo "no" >&6; }
45836fi
45837
45838
45839  test -n "$BUILD_AR" && break
45840done
45841
45842    else
45843      # If it succeeded, then it was overridden by the user. We will use it
45844      # for the tool.
45845
45846      # First remove it from the list of overridden variables, so we can test
45847      # for unknown variables in the end.
45848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45849
45850      # Check if we try to supply an empty value
45851      if test "x$BUILD_AR" = x; then
45852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45853$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45855$as_echo_n "checking for BUILD_AR... " >&6; }
45856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45857$as_echo "disabled" >&6; }
45858      else
45859        # Check if the provided tool contains a complete path.
45860        tool_specified="$BUILD_AR"
45861        tool_basename="${tool_specified##*/}"
45862        if test "x$tool_basename" = "x$tool_specified"; then
45863          # A command without a complete path is provided, search $PATH.
45864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45865$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45866          # Extract the first word of "$tool_basename", so it can be a program name with args.
45867set dummy $tool_basename; ac_word=$2
45868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45869$as_echo_n "checking for $ac_word... " >&6; }
45870if ${ac_cv_path_BUILD_AR+:} false; then :
45871  $as_echo_n "(cached) " >&6
45872else
45873  case $BUILD_AR in
45874  [\\/]* | ?:[\\/]*)
45875  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45876  ;;
45877  *)
45878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45879for as_dir in $PATH
45880do
45881  IFS=$as_save_IFS
45882  test -z "$as_dir" && as_dir=.
45883    for ac_exec_ext in '' $ac_executable_extensions; do
45884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45885    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45887    break 2
45888  fi
45889done
45890  done
45891IFS=$as_save_IFS
45892
45893  ;;
45894esac
45895fi
45896BUILD_AR=$ac_cv_path_BUILD_AR
45897if test -n "$BUILD_AR"; then
45898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45899$as_echo "$BUILD_AR" >&6; }
45900else
45901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45902$as_echo "no" >&6; }
45903fi
45904
45905
45906          if test "x$BUILD_AR" = x; then
45907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45908          fi
45909        else
45910          # Otherwise we believe it is a complete path. Use it as it is.
45911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45912$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45914$as_echo_n "checking for BUILD_AR... " >&6; }
45915          if test ! -x "$tool_specified"; then
45916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45917$as_echo "not found" >&6; }
45918            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45919          fi
45920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45921$as_echo "$tool_specified" >&6; }
45922        fi
45923      fi
45924    fi
45925
45926  fi
45927
45928
45929
45930  # Only process if variable expands to non-empty
45931
45932  if test "x$BUILD_AR" != x; then
45933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45934
45935  # First separate the path from the arguments. This will split at the first
45936  # space.
45937  complete="$BUILD_AR"
45938  path="${complete%% *}"
45939  tmp="$complete EOL"
45940  arguments="${tmp#* }"
45941
45942  # Input might be given as Windows format, start by converting to
45943  # unix format.
45944  new_path=`$CYGPATH -u "$path"`
45945
45946  # Now try to locate executable using which
45947  new_path=`$WHICH "$new_path" 2> /dev/null`
45948  # bat and cmd files are not always considered executable in cygwin causing which
45949  # to not find them
45950  if test "x$new_path" = x \
45951      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45952      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45953    new_path=`$CYGPATH -u "$path"`
45954  fi
45955  if test "x$new_path" = x; then
45956    # Oops. Which didn't find the executable.
45957    # The splitting of arguments from the executable at a space might have been incorrect,
45958    # since paths with space are more likely in Windows. Give it another try with the whole
45959    # argument.
45960    path="$complete"
45961    arguments="EOL"
45962    new_path=`$CYGPATH -u "$path"`
45963    new_path=`$WHICH "$new_path" 2> /dev/null`
45964    # bat and cmd files are not always considered executable in cygwin causing which
45965    # to not find them
45966    if test "x$new_path" = x \
45967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45969      new_path=`$CYGPATH -u "$path"`
45970    fi
45971    if test "x$new_path" = x; then
45972      # It's still not found. Now this is an unrecoverable error.
45973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45974$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45975      has_space=`$ECHO "$complete" | $GREP " "`
45976      if test "x$has_space" != x; then
45977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45979      fi
45980      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45981    fi
45982  fi
45983
45984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45987  # "foo.exe" is OK but "foo" is an error.
45988  #
45989  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45990  # It is also a way to make sure we got the proper file name for the real test later on.
45991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45992  if test "x$test_shortpath" = x; then
45993    # Short path failed, file does not exist as specified.
45994    # Try adding .exe or .cmd
45995    if test -f "${new_path}.exe"; then
45996      input_to_shortpath="${new_path}.exe"
45997    elif test -f "${new_path}.cmd"; then
45998      input_to_shortpath="${new_path}.cmd"
45999    else
46000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46001$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46002      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46003$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46004      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46005    fi
46006  else
46007    input_to_shortpath="$new_path"
46008  fi
46009
46010  # Call helper function which possibly converts this using DOS-style short mode.
46011  # If so, the updated path is stored in $new_path.
46012  new_path="$input_to_shortpath"
46013
46014  input_path="$input_to_shortpath"
46015  # Check if we need to convert this using DOS-style short mode. If the path
46016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46017  # take no chances and rewrite it.
46018  # Note: m4 eats our [], so we need to use [ and ] instead.
46019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46020  if test "x$has_forbidden_chars" != x; then
46021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46025      # Going to short mode and back again did indeed matter. Since short mode is
46026      # case insensitive, let's make it lowercase to improve readability.
46027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46028      # Now convert it back to Unix-style (cygpath)
46029      input_path=`$CYGPATH -u "$shortmode_path"`
46030      new_path="$input_path"
46031    fi
46032  fi
46033
46034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46035  if test "x$test_cygdrive_prefix" = x; then
46036    # As a simple fix, exclude /usr/bin since it's not a real path.
46037    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46039      # a path prefixed by /cygdrive for fixpath to work.
46040      new_path="$CYGWIN_ROOT_PATH$input_path"
46041    fi
46042  fi
46043
46044  # remove trailing .exe if any
46045  new_path="${new_path/%.exe/}"
46046
46047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46048
46049  # First separate the path from the arguments. This will split at the first
46050  # space.
46051  complete="$BUILD_AR"
46052  path="${complete%% *}"
46053  tmp="$complete EOL"
46054  arguments="${tmp#* }"
46055
46056  # Input might be given as Windows format, start by converting to
46057  # unix format.
46058  new_path="$path"
46059
46060  windows_path="$new_path"
46061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46062    unix_path=`$CYGPATH -u "$windows_path"`
46063    new_path="$unix_path"
46064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46066    new_path="$unix_path"
46067  fi
46068
46069
46070  # Now try to locate executable using which
46071  new_path=`$WHICH "$new_path" 2> /dev/null`
46072
46073  if test "x$new_path" = x; then
46074    # Oops. Which didn't find the executable.
46075    # The splitting of arguments from the executable at a space might have been incorrect,
46076    # since paths with space are more likely in Windows. Give it another try with the whole
46077    # argument.
46078    path="$complete"
46079    arguments="EOL"
46080    new_path="$path"
46081
46082  windows_path="$new_path"
46083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46084    unix_path=`$CYGPATH -u "$windows_path"`
46085    new_path="$unix_path"
46086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46088    new_path="$unix_path"
46089  fi
46090
46091
46092    new_path=`$WHICH "$new_path" 2> /dev/null`
46093    # bat and cmd files are not always considered executable in MSYS causing which
46094    # to not find them
46095    if test "x$new_path" = x \
46096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46098      new_path="$path"
46099
46100  windows_path="$new_path"
46101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46102    unix_path=`$CYGPATH -u "$windows_path"`
46103    new_path="$unix_path"
46104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46106    new_path="$unix_path"
46107  fi
46108
46109    fi
46110
46111    if test "x$new_path" = x; then
46112      # It's still not found. Now this is an unrecoverable error.
46113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46114$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46115      has_space=`$ECHO "$complete" | $GREP " "`
46116      if test "x$has_space" != x; then
46117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46119      fi
46120      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46121    fi
46122  fi
46123
46124  # Now new_path has a complete unix path to the binary
46125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46126    # Keep paths in /bin as-is, but remove trailing .exe if any
46127    new_path="${new_path/%.exe/}"
46128    # Do not save /bin paths to all_fixpath_prefixes!
46129  else
46130    # Not in mixed or Windows style, start by that.
46131    new_path=`cmd //c echo $new_path`
46132
46133  input_path="$new_path"
46134  # Check if we need to convert this using DOS-style short mode. If the path
46135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46136  # take no chances and rewrite it.
46137  # Note: m4 eats our [], so we need to use [ and ] instead.
46138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46139  if test "x$has_forbidden_chars" != x; then
46140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46142  fi
46143
46144    # Output is in $new_path
46145
46146  windows_path="$new_path"
46147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46148    unix_path=`$CYGPATH -u "$windows_path"`
46149    new_path="$unix_path"
46150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46152    new_path="$unix_path"
46153  fi
46154
46155    # remove trailing .exe if any
46156    new_path="${new_path/%.exe/}"
46157
46158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46160  fi
46161
46162    else
46163      # We're on a unix platform. Hooray! :)
46164      # First separate the path from the arguments. This will split at the first
46165      # space.
46166      complete="$BUILD_AR"
46167      path="${complete%% *}"
46168      tmp="$complete EOL"
46169      arguments="${tmp#* }"
46170
46171      # Cannot rely on the command "which" here since it doesn't always work.
46172      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46173      if test -z "$is_absolute_path"; then
46174        # Path to executable is not absolute. Find it.
46175        IFS_save="$IFS"
46176        IFS=:
46177        for p in $PATH; do
46178          if test -f "$p/$path" && test -x "$p/$path"; then
46179            new_path="$p/$path"
46180            break
46181          fi
46182        done
46183        IFS="$IFS_save"
46184      else
46185        # This is an absolute path, we can use it without further modifications.
46186        new_path="$path"
46187      fi
46188
46189      if test "x$new_path" = x; then
46190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46191$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46192        has_space=`$ECHO "$complete" | $GREP " "`
46193        if test "x$has_space" != x; then
46194          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46196        fi
46197        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46198      fi
46199    fi
46200
46201    # Now join together the path and the arguments once again
46202    if test "x$arguments" != xEOL; then
46203      new_complete="$new_path ${arguments% *}"
46204    else
46205      new_complete="$new_path"
46206    fi
46207
46208    if test "x$complete" != "x$new_complete"; then
46209      BUILD_AR="$new_complete"
46210      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46211$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46212    fi
46213  fi
46214
46215
46216
46217  # Publish this variable in the help.
46218
46219
46220  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46221    # The variable is not set by user, try to locate tool using the code snippet
46222    for ac_prog in objcopy
46223do
46224  # Extract the first word of "$ac_prog", so it can be a program name with args.
46225set dummy $ac_prog; ac_word=$2
46226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46227$as_echo_n "checking for $ac_word... " >&6; }
46228if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46229  $as_echo_n "(cached) " >&6
46230else
46231  case $BUILD_OBJCOPY in
46232  [\\/]* | ?:[\\/]*)
46233  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46234  ;;
46235  *)
46236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46237for as_dir in $PATH
46238do
46239  IFS=$as_save_IFS
46240  test -z "$as_dir" && as_dir=.
46241    for ac_exec_ext in '' $ac_executable_extensions; do
46242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46243    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46245    break 2
46246  fi
46247done
46248  done
46249IFS=$as_save_IFS
46250
46251  ;;
46252esac
46253fi
46254BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46255if test -n "$BUILD_OBJCOPY"; then
46256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46257$as_echo "$BUILD_OBJCOPY" >&6; }
46258else
46259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46260$as_echo "no" >&6; }
46261fi
46262
46263
46264  test -n "$BUILD_OBJCOPY" && break
46265done
46266
46267  else
46268    # The variable is set, but is it from the command line or the environment?
46269
46270    # Try to remove the string !BUILD_OBJCOPY! from our list.
46271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46273      # If it failed, the variable was not from the command line. Ignore it,
46274      # but warn the user (except for BASH, which is always set by the calling BASH).
46275      if test "xBUILD_OBJCOPY" != xBASH; then
46276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46277$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46278      fi
46279      # Try to locate tool using the code snippet
46280      for ac_prog in objcopy
46281do
46282  # Extract the first word of "$ac_prog", so it can be a program name with args.
46283set dummy $ac_prog; ac_word=$2
46284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46285$as_echo_n "checking for $ac_word... " >&6; }
46286if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46287  $as_echo_n "(cached) " >&6
46288else
46289  case $BUILD_OBJCOPY in
46290  [\\/]* | ?:[\\/]*)
46291  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46292  ;;
46293  *)
46294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46295for as_dir in $PATH
46296do
46297  IFS=$as_save_IFS
46298  test -z "$as_dir" && as_dir=.
46299    for ac_exec_ext in '' $ac_executable_extensions; do
46300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46301    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46303    break 2
46304  fi
46305done
46306  done
46307IFS=$as_save_IFS
46308
46309  ;;
46310esac
46311fi
46312BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46313if test -n "$BUILD_OBJCOPY"; then
46314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46315$as_echo "$BUILD_OBJCOPY" >&6; }
46316else
46317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46318$as_echo "no" >&6; }
46319fi
46320
46321
46322  test -n "$BUILD_OBJCOPY" && break
46323done
46324
46325    else
46326      # If it succeeded, then it was overridden by the user. We will use it
46327      # for the tool.
46328
46329      # First remove it from the list of overridden variables, so we can test
46330      # for unknown variables in the end.
46331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46332
46333      # Check if we try to supply an empty value
46334      if test "x$BUILD_OBJCOPY" = x; then
46335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46336$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46338$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46340$as_echo "disabled" >&6; }
46341      else
46342        # Check if the provided tool contains a complete path.
46343        tool_specified="$BUILD_OBJCOPY"
46344        tool_basename="${tool_specified##*/}"
46345        if test "x$tool_basename" = "x$tool_specified"; then
46346          # A command without a complete path is provided, search $PATH.
46347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46348$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46349          # Extract the first word of "$tool_basename", so it can be a program name with args.
46350set dummy $tool_basename; ac_word=$2
46351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46352$as_echo_n "checking for $ac_word... " >&6; }
46353if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46354  $as_echo_n "(cached) " >&6
46355else
46356  case $BUILD_OBJCOPY in
46357  [\\/]* | ?:[\\/]*)
46358  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46359  ;;
46360  *)
46361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46362for as_dir in $PATH
46363do
46364  IFS=$as_save_IFS
46365  test -z "$as_dir" && as_dir=.
46366    for ac_exec_ext in '' $ac_executable_extensions; do
46367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46368    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46370    break 2
46371  fi
46372done
46373  done
46374IFS=$as_save_IFS
46375
46376  ;;
46377esac
46378fi
46379BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46380if test -n "$BUILD_OBJCOPY"; then
46381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46382$as_echo "$BUILD_OBJCOPY" >&6; }
46383else
46384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46385$as_echo "no" >&6; }
46386fi
46387
46388
46389          if test "x$BUILD_OBJCOPY" = x; then
46390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46391          fi
46392        else
46393          # Otherwise we believe it is a complete path. Use it as it is.
46394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46395$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46397$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46398          if test ! -x "$tool_specified"; then
46399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46400$as_echo "not found" >&6; }
46401            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46402          fi
46403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46404$as_echo "$tool_specified" >&6; }
46405        fi
46406      fi
46407    fi
46408
46409  fi
46410
46411
46412
46413  # Only process if variable expands to non-empty
46414
46415  if test "x$BUILD_OBJCOPY" != x; then
46416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46417
46418  # First separate the path from the arguments. This will split at the first
46419  # space.
46420  complete="$BUILD_OBJCOPY"
46421  path="${complete%% *}"
46422  tmp="$complete EOL"
46423  arguments="${tmp#* }"
46424
46425  # Input might be given as Windows format, start by converting to
46426  # unix format.
46427  new_path=`$CYGPATH -u "$path"`
46428
46429  # Now try to locate executable using which
46430  new_path=`$WHICH "$new_path" 2> /dev/null`
46431  # bat and cmd files are not always considered executable in cygwin causing which
46432  # to not find them
46433  if test "x$new_path" = x \
46434      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46435      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46436    new_path=`$CYGPATH -u "$path"`
46437  fi
46438  if test "x$new_path" = x; then
46439    # Oops. Which didn't find the executable.
46440    # The splitting of arguments from the executable at a space might have been incorrect,
46441    # since paths with space are more likely in Windows. Give it another try with the whole
46442    # argument.
46443    path="$complete"
46444    arguments="EOL"
46445    new_path=`$CYGPATH -u "$path"`
46446    new_path=`$WHICH "$new_path" 2> /dev/null`
46447    # bat and cmd files are not always considered executable in cygwin causing which
46448    # to not find them
46449    if test "x$new_path" = x \
46450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46452      new_path=`$CYGPATH -u "$path"`
46453    fi
46454    if test "x$new_path" = x; then
46455      # It's still not found. Now this is an unrecoverable error.
46456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46457$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46458      has_space=`$ECHO "$complete" | $GREP " "`
46459      if test "x$has_space" != x; then
46460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46462      fi
46463      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46464    fi
46465  fi
46466
46467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46470  # "foo.exe" is OK but "foo" is an error.
46471  #
46472  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46473  # It is also a way to make sure we got the proper file name for the real test later on.
46474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46475  if test "x$test_shortpath" = x; then
46476    # Short path failed, file does not exist as specified.
46477    # Try adding .exe or .cmd
46478    if test -f "${new_path}.exe"; then
46479      input_to_shortpath="${new_path}.exe"
46480    elif test -f "${new_path}.cmd"; then
46481      input_to_shortpath="${new_path}.cmd"
46482    else
46483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46484$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46485      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46486$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46487      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46488    fi
46489  else
46490    input_to_shortpath="$new_path"
46491  fi
46492
46493  # Call helper function which possibly converts this using DOS-style short mode.
46494  # If so, the updated path is stored in $new_path.
46495  new_path="$input_to_shortpath"
46496
46497  input_path="$input_to_shortpath"
46498  # Check if we need to convert this using DOS-style short mode. If the path
46499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46500  # take no chances and rewrite it.
46501  # Note: m4 eats our [], so we need to use [ and ] instead.
46502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46503  if test "x$has_forbidden_chars" != x; then
46504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46508      # Going to short mode and back again did indeed matter. Since short mode is
46509      # case insensitive, let's make it lowercase to improve readability.
46510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46511      # Now convert it back to Unix-style (cygpath)
46512      input_path=`$CYGPATH -u "$shortmode_path"`
46513      new_path="$input_path"
46514    fi
46515  fi
46516
46517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46518  if test "x$test_cygdrive_prefix" = x; then
46519    # As a simple fix, exclude /usr/bin since it's not a real path.
46520    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46522      # a path prefixed by /cygdrive for fixpath to work.
46523      new_path="$CYGWIN_ROOT_PATH$input_path"
46524    fi
46525  fi
46526
46527  # remove trailing .exe if any
46528  new_path="${new_path/%.exe/}"
46529
46530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46531
46532  # First separate the path from the arguments. This will split at the first
46533  # space.
46534  complete="$BUILD_OBJCOPY"
46535  path="${complete%% *}"
46536  tmp="$complete EOL"
46537  arguments="${tmp#* }"
46538
46539  # Input might be given as Windows format, start by converting to
46540  # unix format.
46541  new_path="$path"
46542
46543  windows_path="$new_path"
46544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46545    unix_path=`$CYGPATH -u "$windows_path"`
46546    new_path="$unix_path"
46547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46549    new_path="$unix_path"
46550  fi
46551
46552
46553  # Now try to locate executable using which
46554  new_path=`$WHICH "$new_path" 2> /dev/null`
46555
46556  if test "x$new_path" = x; then
46557    # Oops. Which didn't find the executable.
46558    # The splitting of arguments from the executable at a space might have been incorrect,
46559    # since paths with space are more likely in Windows. Give it another try with the whole
46560    # argument.
46561    path="$complete"
46562    arguments="EOL"
46563    new_path="$path"
46564
46565  windows_path="$new_path"
46566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46567    unix_path=`$CYGPATH -u "$windows_path"`
46568    new_path="$unix_path"
46569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46571    new_path="$unix_path"
46572  fi
46573
46574
46575    new_path=`$WHICH "$new_path" 2> /dev/null`
46576    # bat and cmd files are not always considered executable in MSYS causing which
46577    # to not find them
46578    if test "x$new_path" = x \
46579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46581      new_path="$path"
46582
46583  windows_path="$new_path"
46584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46585    unix_path=`$CYGPATH -u "$windows_path"`
46586    new_path="$unix_path"
46587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46589    new_path="$unix_path"
46590  fi
46591
46592    fi
46593
46594    if test "x$new_path" = x; then
46595      # It's still not found. Now this is an unrecoverable error.
46596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46597$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46598      has_space=`$ECHO "$complete" | $GREP " "`
46599      if test "x$has_space" != x; then
46600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46602      fi
46603      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46604    fi
46605  fi
46606
46607  # Now new_path has a complete unix path to the binary
46608  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46609    # Keep paths in /bin as-is, but remove trailing .exe if any
46610    new_path="${new_path/%.exe/}"
46611    # Do not save /bin paths to all_fixpath_prefixes!
46612  else
46613    # Not in mixed or Windows style, start by that.
46614    new_path=`cmd //c echo $new_path`
46615
46616  input_path="$new_path"
46617  # Check if we need to convert this using DOS-style short mode. If the path
46618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46619  # take no chances and rewrite it.
46620  # Note: m4 eats our [], so we need to use [ and ] instead.
46621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46622  if test "x$has_forbidden_chars" != x; then
46623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46625  fi
46626
46627    # Output is in $new_path
46628
46629  windows_path="$new_path"
46630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46631    unix_path=`$CYGPATH -u "$windows_path"`
46632    new_path="$unix_path"
46633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46635    new_path="$unix_path"
46636  fi
46637
46638    # remove trailing .exe if any
46639    new_path="${new_path/%.exe/}"
46640
46641    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46642    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46643  fi
46644
46645    else
46646      # We're on a unix platform. Hooray! :)
46647      # First separate the path from the arguments. This will split at the first
46648      # space.
46649      complete="$BUILD_OBJCOPY"
46650      path="${complete%% *}"
46651      tmp="$complete EOL"
46652      arguments="${tmp#* }"
46653
46654      # Cannot rely on the command "which" here since it doesn't always work.
46655      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46656      if test -z "$is_absolute_path"; then
46657        # Path to executable is not absolute. Find it.
46658        IFS_save="$IFS"
46659        IFS=:
46660        for p in $PATH; do
46661          if test -f "$p/$path" && test -x "$p/$path"; then
46662            new_path="$p/$path"
46663            break
46664          fi
46665        done
46666        IFS="$IFS_save"
46667      else
46668        # This is an absolute path, we can use it without further modifications.
46669        new_path="$path"
46670      fi
46671
46672      if test "x$new_path" = x; then
46673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46674$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46675        has_space=`$ECHO "$complete" | $GREP " "`
46676        if test "x$has_space" != x; then
46677          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46678$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46679        fi
46680        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46681      fi
46682    fi
46683
46684    # Now join together the path and the arguments once again
46685    if test "x$arguments" != xEOL; then
46686      new_complete="$new_path ${arguments% *}"
46687    else
46688      new_complete="$new_path"
46689    fi
46690
46691    if test "x$complete" != "x$new_complete"; then
46692      BUILD_OBJCOPY="$new_complete"
46693      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46694$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46695    fi
46696  fi
46697
46698
46699
46700  # Publish this variable in the help.
46701
46702
46703  if [ -z "${BUILD_STRIP+x}" ]; then
46704    # The variable is not set by user, try to locate tool using the code snippet
46705    for ac_prog in strip
46706do
46707  # Extract the first word of "$ac_prog", so it can be a program name with args.
46708set dummy $ac_prog; ac_word=$2
46709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46710$as_echo_n "checking for $ac_word... " >&6; }
46711if ${ac_cv_path_BUILD_STRIP+:} false; then :
46712  $as_echo_n "(cached) " >&6
46713else
46714  case $BUILD_STRIP in
46715  [\\/]* | ?:[\\/]*)
46716  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46717  ;;
46718  *)
46719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46720for as_dir in $PATH
46721do
46722  IFS=$as_save_IFS
46723  test -z "$as_dir" && as_dir=.
46724    for ac_exec_ext in '' $ac_executable_extensions; do
46725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46726    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46728    break 2
46729  fi
46730done
46731  done
46732IFS=$as_save_IFS
46733
46734  ;;
46735esac
46736fi
46737BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46738if test -n "$BUILD_STRIP"; then
46739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46740$as_echo "$BUILD_STRIP" >&6; }
46741else
46742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46743$as_echo "no" >&6; }
46744fi
46745
46746
46747  test -n "$BUILD_STRIP" && break
46748done
46749
46750  else
46751    # The variable is set, but is it from the command line or the environment?
46752
46753    # Try to remove the string !BUILD_STRIP! from our list.
46754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46756      # If it failed, the variable was not from the command line. Ignore it,
46757      # but warn the user (except for BASH, which is always set by the calling BASH).
46758      if test "xBUILD_STRIP" != xBASH; then
46759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46760$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46761      fi
46762      # Try to locate tool using the code snippet
46763      for ac_prog in strip
46764do
46765  # Extract the first word of "$ac_prog", so it can be a program name with args.
46766set dummy $ac_prog; ac_word=$2
46767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46768$as_echo_n "checking for $ac_word... " >&6; }
46769if ${ac_cv_path_BUILD_STRIP+:} false; then :
46770  $as_echo_n "(cached) " >&6
46771else
46772  case $BUILD_STRIP in
46773  [\\/]* | ?:[\\/]*)
46774  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46775  ;;
46776  *)
46777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46778for as_dir in $PATH
46779do
46780  IFS=$as_save_IFS
46781  test -z "$as_dir" && as_dir=.
46782    for ac_exec_ext in '' $ac_executable_extensions; do
46783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46784    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46786    break 2
46787  fi
46788done
46789  done
46790IFS=$as_save_IFS
46791
46792  ;;
46793esac
46794fi
46795BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46796if test -n "$BUILD_STRIP"; then
46797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46798$as_echo "$BUILD_STRIP" >&6; }
46799else
46800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46801$as_echo "no" >&6; }
46802fi
46803
46804
46805  test -n "$BUILD_STRIP" && break
46806done
46807
46808    else
46809      # If it succeeded, then it was overridden by the user. We will use it
46810      # for the tool.
46811
46812      # First remove it from the list of overridden variables, so we can test
46813      # for unknown variables in the end.
46814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46815
46816      # Check if we try to supply an empty value
46817      if test "x$BUILD_STRIP" = x; then
46818        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46819$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46821$as_echo_n "checking for BUILD_STRIP... " >&6; }
46822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46823$as_echo "disabled" >&6; }
46824      else
46825        # Check if the provided tool contains a complete path.
46826        tool_specified="$BUILD_STRIP"
46827        tool_basename="${tool_specified##*/}"
46828        if test "x$tool_basename" = "x$tool_specified"; then
46829          # A command without a complete path is provided, search $PATH.
46830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46831$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46832          # Extract the first word of "$tool_basename", so it can be a program name with args.
46833set dummy $tool_basename; ac_word=$2
46834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46835$as_echo_n "checking for $ac_word... " >&6; }
46836if ${ac_cv_path_BUILD_STRIP+:} false; then :
46837  $as_echo_n "(cached) " >&6
46838else
46839  case $BUILD_STRIP in
46840  [\\/]* | ?:[\\/]*)
46841  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46842  ;;
46843  *)
46844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46845for as_dir in $PATH
46846do
46847  IFS=$as_save_IFS
46848  test -z "$as_dir" && as_dir=.
46849    for ac_exec_ext in '' $ac_executable_extensions; do
46850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46851    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46853    break 2
46854  fi
46855done
46856  done
46857IFS=$as_save_IFS
46858
46859  ;;
46860esac
46861fi
46862BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46863if test -n "$BUILD_STRIP"; then
46864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46865$as_echo "$BUILD_STRIP" >&6; }
46866else
46867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46868$as_echo "no" >&6; }
46869fi
46870
46871
46872          if test "x$BUILD_STRIP" = x; then
46873            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46874          fi
46875        else
46876          # Otherwise we believe it is a complete path. Use it as it is.
46877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46878$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46879          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46880$as_echo_n "checking for BUILD_STRIP... " >&6; }
46881          if test ! -x "$tool_specified"; then
46882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46883$as_echo "not found" >&6; }
46884            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46885          fi
46886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46887$as_echo "$tool_specified" >&6; }
46888        fi
46889      fi
46890    fi
46891
46892  fi
46893
46894
46895
46896  # Only process if variable expands to non-empty
46897
46898  if test "x$BUILD_STRIP" != x; then
46899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46900
46901  # First separate the path from the arguments. This will split at the first
46902  # space.
46903  complete="$BUILD_STRIP"
46904  path="${complete%% *}"
46905  tmp="$complete EOL"
46906  arguments="${tmp#* }"
46907
46908  # Input might be given as Windows format, start by converting to
46909  # unix format.
46910  new_path=`$CYGPATH -u "$path"`
46911
46912  # Now try to locate executable using which
46913  new_path=`$WHICH "$new_path" 2> /dev/null`
46914  # bat and cmd files are not always considered executable in cygwin causing which
46915  # to not find them
46916  if test "x$new_path" = x \
46917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46919    new_path=`$CYGPATH -u "$path"`
46920  fi
46921  if test "x$new_path" = x; then
46922    # Oops. Which didn't find the executable.
46923    # The splitting of arguments from the executable at a space might have been incorrect,
46924    # since paths with space are more likely in Windows. Give it another try with the whole
46925    # argument.
46926    path="$complete"
46927    arguments="EOL"
46928    new_path=`$CYGPATH -u "$path"`
46929    new_path=`$WHICH "$new_path" 2> /dev/null`
46930    # bat and cmd files are not always considered executable in cygwin causing which
46931    # to not find them
46932    if test "x$new_path" = x \
46933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46935      new_path=`$CYGPATH -u "$path"`
46936    fi
46937    if test "x$new_path" = x; then
46938      # It's still not found. Now this is an unrecoverable error.
46939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46940$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46941      has_space=`$ECHO "$complete" | $GREP " "`
46942      if test "x$has_space" != x; then
46943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46945      fi
46946      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46947    fi
46948  fi
46949
46950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46953  # "foo.exe" is OK but "foo" is an error.
46954  #
46955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46956  # It is also a way to make sure we got the proper file name for the real test later on.
46957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46958  if test "x$test_shortpath" = x; then
46959    # Short path failed, file does not exist as specified.
46960    # Try adding .exe or .cmd
46961    if test -f "${new_path}.exe"; then
46962      input_to_shortpath="${new_path}.exe"
46963    elif test -f "${new_path}.cmd"; then
46964      input_to_shortpath="${new_path}.cmd"
46965    else
46966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46967$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46970      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46971    fi
46972  else
46973    input_to_shortpath="$new_path"
46974  fi
46975
46976  # Call helper function which possibly converts this using DOS-style short mode.
46977  # If so, the updated path is stored in $new_path.
46978  new_path="$input_to_shortpath"
46979
46980  input_path="$input_to_shortpath"
46981  # Check if we need to convert this using DOS-style short mode. If the path
46982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46983  # take no chances and rewrite it.
46984  # Note: m4 eats our [], so we need to use [ and ] instead.
46985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46986  if test "x$has_forbidden_chars" != x; then
46987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46991      # Going to short mode and back again did indeed matter. Since short mode is
46992      # case insensitive, let's make it lowercase to improve readability.
46993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46994      # Now convert it back to Unix-style (cygpath)
46995      input_path=`$CYGPATH -u "$shortmode_path"`
46996      new_path="$input_path"
46997    fi
46998  fi
46999
47000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47001  if test "x$test_cygdrive_prefix" = x; then
47002    # As a simple fix, exclude /usr/bin since it's not a real path.
47003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47005      # a path prefixed by /cygdrive for fixpath to work.
47006      new_path="$CYGWIN_ROOT_PATH$input_path"
47007    fi
47008  fi
47009
47010  # remove trailing .exe if any
47011  new_path="${new_path/%.exe/}"
47012
47013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47014
47015  # First separate the path from the arguments. This will split at the first
47016  # space.
47017  complete="$BUILD_STRIP"
47018  path="${complete%% *}"
47019  tmp="$complete EOL"
47020  arguments="${tmp#* }"
47021
47022  # Input might be given as Windows format, start by converting to
47023  # unix format.
47024  new_path="$path"
47025
47026  windows_path="$new_path"
47027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47028    unix_path=`$CYGPATH -u "$windows_path"`
47029    new_path="$unix_path"
47030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47032    new_path="$unix_path"
47033  fi
47034
47035
47036  # Now try to locate executable using which
47037  new_path=`$WHICH "$new_path" 2> /dev/null`
47038
47039  if test "x$new_path" = x; then
47040    # Oops. Which didn't find the executable.
47041    # The splitting of arguments from the executable at a space might have been incorrect,
47042    # since paths with space are more likely in Windows. Give it another try with the whole
47043    # argument.
47044    path="$complete"
47045    arguments="EOL"
47046    new_path="$path"
47047
47048  windows_path="$new_path"
47049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47050    unix_path=`$CYGPATH -u "$windows_path"`
47051    new_path="$unix_path"
47052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47054    new_path="$unix_path"
47055  fi
47056
47057
47058    new_path=`$WHICH "$new_path" 2> /dev/null`
47059    # bat and cmd files are not always considered executable in MSYS causing which
47060    # to not find them
47061    if test "x$new_path" = x \
47062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47064      new_path="$path"
47065
47066  windows_path="$new_path"
47067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47068    unix_path=`$CYGPATH -u "$windows_path"`
47069    new_path="$unix_path"
47070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47072    new_path="$unix_path"
47073  fi
47074
47075    fi
47076
47077    if test "x$new_path" = x; then
47078      # It's still not found. Now this is an unrecoverable error.
47079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47080$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47081      has_space=`$ECHO "$complete" | $GREP " "`
47082      if test "x$has_space" != x; then
47083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47085      fi
47086      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47087    fi
47088  fi
47089
47090  # Now new_path has a complete unix path to the binary
47091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47092    # Keep paths in /bin as-is, but remove trailing .exe if any
47093    new_path="${new_path/%.exe/}"
47094    # Do not save /bin paths to all_fixpath_prefixes!
47095  else
47096    # Not in mixed or Windows style, start by that.
47097    new_path=`cmd //c echo $new_path`
47098
47099  input_path="$new_path"
47100  # Check if we need to convert this using DOS-style short mode. If the path
47101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47102  # take no chances and rewrite it.
47103  # Note: m4 eats our [], so we need to use [ and ] instead.
47104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47105  if test "x$has_forbidden_chars" != x; then
47106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47108  fi
47109
47110    # Output is in $new_path
47111
47112  windows_path="$new_path"
47113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47114    unix_path=`$CYGPATH -u "$windows_path"`
47115    new_path="$unix_path"
47116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47118    new_path="$unix_path"
47119  fi
47120
47121    # remove trailing .exe if any
47122    new_path="${new_path/%.exe/}"
47123
47124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47126  fi
47127
47128    else
47129      # We're on a unix platform. Hooray! :)
47130      # First separate the path from the arguments. This will split at the first
47131      # space.
47132      complete="$BUILD_STRIP"
47133      path="${complete%% *}"
47134      tmp="$complete EOL"
47135      arguments="${tmp#* }"
47136
47137      # Cannot rely on the command "which" here since it doesn't always work.
47138      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47139      if test -z "$is_absolute_path"; then
47140        # Path to executable is not absolute. Find it.
47141        IFS_save="$IFS"
47142        IFS=:
47143        for p in $PATH; do
47144          if test -f "$p/$path" && test -x "$p/$path"; then
47145            new_path="$p/$path"
47146            break
47147          fi
47148        done
47149        IFS="$IFS_save"
47150      else
47151        # This is an absolute path, we can use it without further modifications.
47152        new_path="$path"
47153      fi
47154
47155      if test "x$new_path" = x; then
47156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47157$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47158        has_space=`$ECHO "$complete" | $GREP " "`
47159        if test "x$has_space" != x; then
47160          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47161$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47162        fi
47163        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47164      fi
47165    fi
47166
47167    # Now join together the path and the arguments once again
47168    if test "x$arguments" != xEOL; then
47169      new_complete="$new_path ${arguments% *}"
47170    else
47171      new_complete="$new_path"
47172    fi
47173
47174    if test "x$complete" != "x$new_complete"; then
47175      BUILD_STRIP="$new_complete"
47176      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47177$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47178    fi
47179  fi
47180
47181    # Assume the C compiler is the assembler
47182    BUILD_AS="$BUILD_CC -c"
47183    # Just like for the target compiler, use the compiler as linker
47184    BUILD_LD="$BUILD_CC"
47185    BUILD_LDCXX="$BUILD_CXX"
47186
47187    PATH="$OLDPATH"
47188
47189
47190  COMPILER=$BUILD_CC
47191  COMPILER_NAME=BuildC
47192
47193  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47194    # cc -V output typically looks like
47195    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47196    # or
47197    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47198    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47199    # Check that this is likely to be the Solaris Studio cc.
47200    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47201    if test $? -ne 0; then
47202      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47203      { $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
47204$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47205      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47206$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47207      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47208$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47209      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47210    fi
47211    # Remove usage instructions (if present), and
47212    # collapse compiler output into a single line
47213    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47214        $SED -e 's/ *[Uu]sage:.*//'`
47215    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47216        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47217  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47218    # xlc -qversion output typically looks like
47219    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47220    #     Version: 11.01.0000.0015
47221    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47222    # Check that this is likely to be the IBM XL C compiler.
47223    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47224    if test $? -ne 0; then
47225      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
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 -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47229$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47230      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47231$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47232      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47233    fi
47234    # Collapse compiler output into a single line
47235    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47236    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47237        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47238  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47239    # There is no specific version flag, but all output starts with a version string.
47240    # First line typically looks something like:
47241    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47242    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47243    # Check that this is likely to be Microsoft CL.EXE.
47244    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47245    if test $? -ne 0; then
47246      { $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
47247$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47248      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47249$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47250      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47251    fi
47252    # Collapse compiler output into a single line
47253    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47254    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47255        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47256  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47257    # gcc --version output typically looks like
47258    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47259    #     Copyright (C) 2013 Free Software Foundation, Inc.
47260    #     This is free software; see the source for copying conditions.  There is NO
47261    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47262    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47263    # Check that this is likely to be GCC.
47264    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47265    if test $? -ne 0; then
47266      { $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
47267$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47268      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47269$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47270      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47271    fi
47272    # Remove Copyright and legalese from version string, and
47273    # collapse into a single line
47274    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47275        $SED -e 's/ *Copyright .*//'`
47276    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47277        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47278  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47279    # clang --version output typically looks like
47280    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47281    #    clang version 3.3 (tags/RELEASE_33/final)
47282    # or
47283    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47284    #    Target: x86_64-pc-linux-gnu
47285    #    Thread model: posix
47286    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47287    # Check that this is likely to be clang
47288    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47289    if test $? -ne 0; then
47290      { $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
47291$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47292      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47293$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47294      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47295    fi
47296    # Collapse compiler output into a single line
47297    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47298    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47299        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47300  else
47301      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47302  fi
47303  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47304  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47305  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47306  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47307
47308  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47309$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47310
47311
47312  COMPILER=$BUILD_CXX
47313  COMPILER_NAME=BuildC++
47314
47315  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47316    # cc -V output typically looks like
47317    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47318    # or
47319    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47320    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47321    # Check that this is likely to be the Solaris Studio cc.
47322    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47323    if test $? -ne 0; then
47324      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47325      { $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
47326$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47327      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47328$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47329      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47330$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47331      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47332    fi
47333    # Remove usage instructions (if present), and
47334    # collapse compiler output into a single line
47335    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47336        $SED -e 's/ *[Uu]sage:.*//'`
47337    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47338        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47339  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47340    # xlc -qversion output typically looks like
47341    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47342    #     Version: 11.01.0000.0015
47343    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47344    # Check that this is likely to be the IBM XL C compiler.
47345    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47346    if test $? -ne 0; then
47347      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47348      { $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
47349$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47350      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47351$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47352      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47353$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47354      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47355    fi
47356    # Collapse compiler output into a single line
47357    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47358    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47359        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47360  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47361    # There is no specific version flag, but all output starts with a version string.
47362    # First line typically looks something like:
47363    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47364    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47365    # Check that this is likely to be Microsoft CL.EXE.
47366    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47367    if test $? -ne 0; then
47368      { $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
47369$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47370      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47371$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47372      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47373    fi
47374    # Collapse compiler output into a single line
47375    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47376    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47377        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47378  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47379    # gcc --version output typically looks like
47380    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47381    #     Copyright (C) 2013 Free Software Foundation, Inc.
47382    #     This is free software; see the source for copying conditions.  There is NO
47383    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47384    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47385    # Check that this is likely to be GCC.
47386    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47387    if test $? -ne 0; then
47388      { $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
47389$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47390      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47391$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47392      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47393    fi
47394    # Remove Copyright and legalese from version string, and
47395    # collapse into a single line
47396    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47397        $SED -e 's/ *Copyright .*//'`
47398    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47399        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47400  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47401    # clang --version output typically looks like
47402    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47403    #    clang version 3.3 (tags/RELEASE_33/final)
47404    # or
47405    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47406    #    Target: x86_64-pc-linux-gnu
47407    #    Thread model: posix
47408    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47409    # Check that this is likely to be clang
47410    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47411    if test $? -ne 0; then
47412      { $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
47413$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47414      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47415$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47416      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47417    fi
47418    # Collapse compiler output into a single line
47419    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47420    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47421        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47422  else
47423      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47424  fi
47425  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47426  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47427  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47428  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47429
47430  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47431$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47432
47433
47434  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47435    { $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
47436$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47438$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47439  fi
47440
47441  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47442  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47443    { $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
47444$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;}
47445  fi
47446
47447  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47448    { $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
47449$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47450  fi
47451
47452  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47453
47454  else
47455    # If we are not cross compiling, use the normal target compilers for
47456    # building the build platform executables.
47457    BUILD_CC="$CC"
47458    BUILD_CXX="$CXX"
47459    BUILD_LD="$LD"
47460    BUILD_LDCXX="$LDCXX"
47461    BUILD_NM="$NM"
47462    BUILD_AS="$AS"
47463    BUILD_OBJCOPY="$OBJCOPY"
47464    BUILD_STRIP="$STRIP"
47465    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47466    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47467    BUILD_AR="$AR"
47468
47469
47470  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47472$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47474$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47475  fi
47476
47477  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47478  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47479    { $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
47480$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;}
47481  fi
47482
47483  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47484    { $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
47485$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47486  fi
47487
47488  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47489
47490  fi
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505  # The package path is used only on macosx?
47506  # FIXME: clean this up, and/or move it elsewhere.
47507  PACKAGE_PATH=/opt/local
47508
47509
47510  # Check for extra potential brokenness.
47511  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47512    # On Windows, double-check that we got the right compiler.
47513    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47514    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47515    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47516      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47517        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
47518      fi
47519    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47520      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47521        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47522      fi
47523    fi
47524  fi
47525
47526  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47527    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47528    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47529    # This is later checked when setting flags.
47530
47531    # "-Og" suppported for GCC 4.8 and later
47532    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580    # Execute function body
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629    # Execute function body
47630
47631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47632$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47633  supports=yes
47634
47635  saved_cflags="$CFLAGS"
47636  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47637  ac_ext=c
47638ac_cpp='$CPP $CPPFLAGS'
47639ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47640ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47641ac_compiler_gnu=$ac_cv_c_compiler_gnu
47642
47643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47644/* end confdefs.h.  */
47645int i;
47646_ACEOF
47647if ac_fn_c_try_compile "$LINENO"; then :
47648
47649else
47650  supports=no
47651fi
47652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47653  ac_ext=cpp
47654ac_cpp='$CXXCPP $CPPFLAGS'
47655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47658
47659  CFLAGS="$saved_cflags"
47660
47661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47662$as_echo "$supports" >&6; }
47663  if test "x$supports" = "xyes" ; then
47664    :
47665    C_COMP_SUPPORTS="yes"
47666  else
47667    :
47668    C_COMP_SUPPORTS="no"
47669  fi
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729    # Execute function body
47730
47731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47732$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47733  supports=yes
47734
47735  saved_cxxflags="$CXXFLAGS"
47736  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47737  ac_ext=cpp
47738ac_cpp='$CXXCPP $CPPFLAGS'
47739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47742
47743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47744/* end confdefs.h.  */
47745int i;
47746_ACEOF
47747if ac_fn_cxx_try_compile "$LINENO"; then :
47748
47749else
47750  supports=no
47751fi
47752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47753  ac_ext=cpp
47754ac_cpp='$CXXCPP $CPPFLAGS'
47755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47758
47759  CXXFLAGS="$saved_cxxflags"
47760
47761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47762$as_echo "$supports" >&6; }
47763  if test "x$supports" = "xyes" ; then
47764    :
47765    CXX_COMP_SUPPORTS="yes"
47766  else
47767    :
47768    CXX_COMP_SUPPORTS="no"
47769  fi
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47784$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47785  supports=no
47786  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47787
47788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47789$as_echo "$supports" >&6; }
47790  if test "x$supports" = "xyes" ; then
47791    :
47792    HAS_CFLAG_OPTIMIZE_DEBUG=true
47793  else
47794    :
47795    HAS_CFLAG_OPTIMIZE_DEBUG=false
47796  fi
47797
47798
47799
47800
47801
47802
47803
47804    # "-z relro" supported in GNU binutils 2.17 and later
47805    LINKER_RELRO_FLAG="-Wl,-z,relro"
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853    # Execute function body
47854
47855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47856$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47857  supports=yes
47858
47859  saved_ldflags="$LDFLAGS"
47860  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47861  ac_ext=c
47862ac_cpp='$CPP $CPPFLAGS'
47863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47865ac_compiler_gnu=$ac_cv_c_compiler_gnu
47866
47867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47868/* end confdefs.h.  */
47869
47870int
47871main ()
47872{
47873
47874  ;
47875  return 0;
47876}
47877_ACEOF
47878if ac_fn_c_try_link "$LINENO"; then :
47879
47880else
47881  supports=no
47882fi
47883rm -f core conftest.err conftest.$ac_objext \
47884    conftest$ac_exeext conftest.$ac_ext
47885  ac_ext=cpp
47886ac_cpp='$CXXCPP $CPPFLAGS'
47887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47890
47891  LDFLAGS="$saved_ldflags"
47892
47893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47894$as_echo "$supports" >&6; }
47895  if test "x$supports" = "xyes" ; then
47896    :
47897    HAS_LINKER_RELRO=true
47898  else
47899    :
47900    HAS_LINKER_RELRO=false
47901  fi
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915    # "-z now" supported in GNU binutils 2.11 and later
47916    LINKER_NOW_FLAG="-Wl,-z,now"
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964    # Execute function body
47965
47966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47967$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47968  supports=yes
47969
47970  saved_ldflags="$LDFLAGS"
47971  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47972  ac_ext=c
47973ac_cpp='$CPP $CPPFLAGS'
47974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47976ac_compiler_gnu=$ac_cv_c_compiler_gnu
47977
47978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47979/* end confdefs.h.  */
47980
47981int
47982main ()
47983{
47984
47985  ;
47986  return 0;
47987}
47988_ACEOF
47989if ac_fn_c_try_link "$LINENO"; then :
47990
47991else
47992  supports=no
47993fi
47994rm -f core conftest.err conftest.$ac_objext \
47995    conftest$ac_exeext conftest.$ac_ext
47996  ac_ext=cpp
47997ac_cpp='$CXXCPP $CPPFLAGS'
47998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48001
48002  LDFLAGS="$saved_ldflags"
48003
48004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48005$as_echo "$supports" >&6; }
48006  if test "x$supports" = "xyes" ; then
48007    :
48008    HAS_LINKER_NOW=true
48009  else
48010    :
48011    HAS_LINKER_NOW=false
48012  fi
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025  fi
48026
48027  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48028  # in executable.'
48029  USING_BROKEN_SUSE_LD=no
48030  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48032$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48033    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48034    $ECHO "int main() { }" > main.c
48035    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48037$as_echo "no" >&6; }
48038      USING_BROKEN_SUSE_LD=no
48039    else
48040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48041$as_echo "yes" >&6; }
48042      USING_BROKEN_SUSE_LD=yes
48043    fi
48044    $RM version-script.map main.c a.out
48045  fi
48046
48047
48048  # Setup hotspot lecagy names for toolchains
48049  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48050  if test "x$TOOLCHAIN_TYPE" = xclang; then
48051    HOTSPOT_TOOLCHAIN_TYPE=gcc
48052  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48053    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48054  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48055    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48056  fi
48057
48058
48059
48060# Setup the JTReg Regression Test Harness.
48061
48062
48063# Check whether --with-jtreg was given.
48064if test "${with_jtreg+set}" = set; then :
48065  withval=$with_jtreg;
48066else
48067  with_jtreg=no
48068fi
48069
48070
48071  if test "x$with_jtreg" = xno; then
48072    # jtreg disabled
48073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48074$as_echo_n "checking for jtreg... " >&6; }
48075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48076$as_echo "no" >&6; }
48077  else
48078    if test "x$with_jtreg" != xyes; then
48079      # with path specified.
48080      JT_HOME="$with_jtreg"
48081    fi
48082
48083    if test "x$JT_HOME" != x; then
48084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48085$as_echo_n "checking for jtreg... " >&6; }
48086
48087      # use JT_HOME enviroment var.
48088
48089  # Only process if variable expands to non-empty
48090
48091  if test "x$JT_HOME" != x; then
48092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48093
48094  # Input might be given as Windows format, start by converting to
48095  # unix format.
48096  path="$JT_HOME"
48097  new_path=`$CYGPATH -u "$path"`
48098
48099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48102  # "foo.exe" is OK but "foo" is an error.
48103  #
48104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48105  # It is also a way to make sure we got the proper file name for the real test later on.
48106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48107  if test "x$test_shortpath" = x; then
48108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48109$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48110    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48111  fi
48112
48113  # Call helper function which possibly converts this using DOS-style short mode.
48114  # If so, the updated path is stored in $new_path.
48115
48116  input_path="$new_path"
48117  # Check if we need to convert this using DOS-style short mode. If the path
48118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48119  # take no chances and rewrite it.
48120  # Note: m4 eats our [], so we need to use [ and ] instead.
48121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48122  if test "x$has_forbidden_chars" != x; then
48123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48127      # Going to short mode and back again did indeed matter. Since short mode is
48128      # case insensitive, let's make it lowercase to improve readability.
48129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48130      # Now convert it back to Unix-style (cygpath)
48131      input_path=`$CYGPATH -u "$shortmode_path"`
48132      new_path="$input_path"
48133    fi
48134  fi
48135
48136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48137  if test "x$test_cygdrive_prefix" = x; then
48138    # As a simple fix, exclude /usr/bin since it's not a real path.
48139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48141      # a path prefixed by /cygdrive for fixpath to work.
48142      new_path="$CYGWIN_ROOT_PATH$input_path"
48143    fi
48144  fi
48145
48146
48147  if test "x$path" != "x$new_path"; then
48148    JT_HOME="$new_path"
48149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48150$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48151  fi
48152
48153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48154
48155  path="$JT_HOME"
48156  has_colon=`$ECHO $path | $GREP ^.:`
48157  new_path="$path"
48158  if test "x$has_colon" = x; then
48159    # Not in mixed or Windows style, start by that.
48160    new_path=`cmd //c echo $path`
48161  fi
48162
48163
48164  input_path="$new_path"
48165  # Check if we need to convert this using DOS-style short mode. If the path
48166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48167  # take no chances and rewrite it.
48168  # Note: m4 eats our [], so we need to use [ and ] instead.
48169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48170  if test "x$has_forbidden_chars" != x; then
48171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48173  fi
48174
48175
48176  windows_path="$new_path"
48177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48178    unix_path=`$CYGPATH -u "$windows_path"`
48179    new_path="$unix_path"
48180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48182    new_path="$unix_path"
48183  fi
48184
48185  if test "x$path" != "x$new_path"; then
48186    JT_HOME="$new_path"
48187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48188$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48189  fi
48190
48191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48193
48194    else
48195      # We're on a unix platform. Hooray! :)
48196      path="$JT_HOME"
48197      has_space=`$ECHO "$path" | $GREP " "`
48198      if test "x$has_space" != x; then
48199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48200$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48202      fi
48203
48204      # Use eval to expand a potential ~
48205      eval path="$path"
48206      if test ! -f "$path" && test ! -d "$path"; then
48207        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48208      fi
48209
48210      if test -d "$path"; then
48211        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48212      else
48213        dir="`$DIRNAME "$path"`"
48214        base="`$BASENAME "$path"`"
48215        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48216      fi
48217    fi
48218  fi
48219
48220
48221      # jtreg win32 script works for everybody
48222      JTREGEXE="$JT_HOME/bin/jtreg"
48223
48224      if test ! -f "$JTREGEXE"; then
48225        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48226      fi
48227
48228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48229$as_echo "$JTREGEXE" >&6; }
48230    else
48231      # try to find jtreg on path
48232
48233
48234
48235  # Publish this variable in the help.
48236
48237
48238  if [ -z "${JTREGEXE+x}" ]; then
48239    # The variable is not set by user, try to locate tool using the code snippet
48240    for ac_prog in jtreg
48241do
48242  # Extract the first word of "$ac_prog", so it can be a program name with args.
48243set dummy $ac_prog; ac_word=$2
48244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48245$as_echo_n "checking for $ac_word... " >&6; }
48246if ${ac_cv_path_JTREGEXE+:} false; then :
48247  $as_echo_n "(cached) " >&6
48248else
48249  case $JTREGEXE in
48250  [\\/]* | ?:[\\/]*)
48251  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48252  ;;
48253  *)
48254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48255for as_dir in $PATH
48256do
48257  IFS=$as_save_IFS
48258  test -z "$as_dir" && as_dir=.
48259    for ac_exec_ext in '' $ac_executable_extensions; do
48260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48261    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48263    break 2
48264  fi
48265done
48266  done
48267IFS=$as_save_IFS
48268
48269  ;;
48270esac
48271fi
48272JTREGEXE=$ac_cv_path_JTREGEXE
48273if test -n "$JTREGEXE"; then
48274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48275$as_echo "$JTREGEXE" >&6; }
48276else
48277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48278$as_echo "no" >&6; }
48279fi
48280
48281
48282  test -n "$JTREGEXE" && break
48283done
48284
48285  else
48286    # The variable is set, but is it from the command line or the environment?
48287
48288    # Try to remove the string !JTREGEXE! from our list.
48289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48291      # If it failed, the variable was not from the command line. Ignore it,
48292      # but warn the user (except for BASH, which is always set by the calling BASH).
48293      if test "xJTREGEXE" != xBASH; then
48294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48295$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48296      fi
48297      # Try to locate tool using the code snippet
48298      for ac_prog in jtreg
48299do
48300  # Extract the first word of "$ac_prog", so it can be a program name with args.
48301set dummy $ac_prog; ac_word=$2
48302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48303$as_echo_n "checking for $ac_word... " >&6; }
48304if ${ac_cv_path_JTREGEXE+:} false; then :
48305  $as_echo_n "(cached) " >&6
48306else
48307  case $JTREGEXE in
48308  [\\/]* | ?:[\\/]*)
48309  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48310  ;;
48311  *)
48312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48313for as_dir in $PATH
48314do
48315  IFS=$as_save_IFS
48316  test -z "$as_dir" && as_dir=.
48317    for ac_exec_ext in '' $ac_executable_extensions; do
48318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48319    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48321    break 2
48322  fi
48323done
48324  done
48325IFS=$as_save_IFS
48326
48327  ;;
48328esac
48329fi
48330JTREGEXE=$ac_cv_path_JTREGEXE
48331if test -n "$JTREGEXE"; then
48332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48333$as_echo "$JTREGEXE" >&6; }
48334else
48335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48336$as_echo "no" >&6; }
48337fi
48338
48339
48340  test -n "$JTREGEXE" && break
48341done
48342
48343    else
48344      # If it succeeded, then it was overridden by the user. We will use it
48345      # for the tool.
48346
48347      # First remove it from the list of overridden variables, so we can test
48348      # for unknown variables in the end.
48349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48350
48351      # Check if we try to supply an empty value
48352      if test "x$JTREGEXE" = x; then
48353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48354$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48356$as_echo_n "checking for JTREGEXE... " >&6; }
48357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48358$as_echo "disabled" >&6; }
48359      else
48360        # Check if the provided tool contains a complete path.
48361        tool_specified="$JTREGEXE"
48362        tool_basename="${tool_specified##*/}"
48363        if test "x$tool_basename" = "x$tool_specified"; then
48364          # A command without a complete path is provided, search $PATH.
48365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48366$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48367          # Extract the first word of "$tool_basename", so it can be a program name with args.
48368set dummy $tool_basename; ac_word=$2
48369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48370$as_echo_n "checking for $ac_word... " >&6; }
48371if ${ac_cv_path_JTREGEXE+:} false; then :
48372  $as_echo_n "(cached) " >&6
48373else
48374  case $JTREGEXE in
48375  [\\/]* | ?:[\\/]*)
48376  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48377  ;;
48378  *)
48379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48380for as_dir in $PATH
48381do
48382  IFS=$as_save_IFS
48383  test -z "$as_dir" && as_dir=.
48384    for ac_exec_ext in '' $ac_executable_extensions; do
48385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48386    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48388    break 2
48389  fi
48390done
48391  done
48392IFS=$as_save_IFS
48393
48394  ;;
48395esac
48396fi
48397JTREGEXE=$ac_cv_path_JTREGEXE
48398if test -n "$JTREGEXE"; then
48399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48400$as_echo "$JTREGEXE" >&6; }
48401else
48402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48403$as_echo "no" >&6; }
48404fi
48405
48406
48407          if test "x$JTREGEXE" = x; then
48408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48409          fi
48410        else
48411          # Otherwise we believe it is a complete path. Use it as it is.
48412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48413$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48415$as_echo_n "checking for JTREGEXE... " >&6; }
48416          if test ! -x "$tool_specified"; then
48417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48418$as_echo "not found" >&6; }
48419            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48420          fi
48421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48422$as_echo "$tool_specified" >&6; }
48423        fi
48424      fi
48425    fi
48426
48427  fi
48428
48429
48430
48431  if test "x$JTREGEXE" = x; then
48432    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48433  fi
48434
48435
48436      JT_HOME="`$DIRNAME $JTREGEXE`"
48437    fi
48438  fi
48439
48440
48441
48442
48443
48444# Setup Jib dependency tool
48445
48446
48447# Check whether --with-jib was given.
48448if test "${with_jib+set}" = set; then :
48449  withval=$with_jib;
48450fi
48451
48452
48453  if test "x$with_jib" = xno || test "x$with_jib" = x; then
48454    # jib disabled
48455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
48456$as_echo_n "checking for jib... " >&6; }
48457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48458$as_echo "no" >&6; }
48459  elif test "x$with_jib" = xyes; then
48460    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
48461  else
48462    JIB_HOME="${with_jib}"
48463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
48464$as_echo_n "checking for jib... " >&6; }
48465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
48466$as_echo "${JIB_HOME}" >&6; }
48467    if test ! -d "${JIB_HOME}"; then
48468      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
48469    fi
48470    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
48471    if test ! -f "${JIB_JAR}"; then
48472      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
48473    fi
48474  fi
48475
48476
48477
48478
48479
48480  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48481  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48482  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48483  #                              commands produced by the link step (currently AIX only)
48484  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48485    COMPILER_TARGET_BITS_FLAG="-q"
48486    COMPILER_COMMAND_FILE_FLAG="-f"
48487    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48488  else
48489    COMPILER_TARGET_BITS_FLAG="-m"
48490    COMPILER_COMMAND_FILE_FLAG="@"
48491    COMPILER_BINDCMD_FILE_FLAG=""
48492
48493    # The solstudio linker does not support @-files.
48494    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48495      COMPILER_COMMAND_FILE_FLAG=
48496    fi
48497
48498    # Check if @file is supported by gcc
48499    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48501$as_echo_n "checking if @file is supported by gcc... " >&6; }
48502      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48503      $ECHO "" "--version" > command.file
48504      if $CXX @command.file 2>&5 >&5; then
48505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48506$as_echo "yes" >&6; }
48507        COMPILER_COMMAND_FILE_FLAG="@"
48508      else
48509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48510$as_echo "no" >&6; }
48511        COMPILER_COMMAND_FILE_FLAG=
48512      fi
48513      $RM command.file
48514    fi
48515  fi
48516
48517
48518
48519
48520  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48521  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48522    ARFLAGS="-r"
48523  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48524    ARFLAGS="-X64"
48525  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48526    # lib.exe is used as AR to create static libraries.
48527    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48528  else
48529    ARFLAGS=""
48530  fi
48531
48532
48533  ## Setup strip.
48534  # FIXME: should this really be per platform, or should it be per toolchain type?
48535  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48536  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48537  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48538    STRIPFLAGS="-g"
48539  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48540    STRIPFLAGS="-x"
48541  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48542    STRIPFLAGS="-S"
48543  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48544    STRIPFLAGS="-X32_64"
48545  fi
48546
48547
48548
48549  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48550    CC_OUT_OPTION=-Fo
48551    EXE_OUT_OPTION=-out:
48552    LD_OUT_OPTION=-out:
48553    AR_OUT_OPTION=-out:
48554  else
48555    # The option used to specify the target .o,.a or .so file.
48556    # When compiling, how to specify the to be created object file.
48557    CC_OUT_OPTION='-o$(SPACE)'
48558    # When linking, how to specify the to be created executable.
48559    EXE_OUT_OPTION='-o$(SPACE)'
48560    # When linking, how to specify the to be created dynamically linkable library.
48561    LD_OUT_OPTION='-o$(SPACE)'
48562    # When archiving, how to specify the to be create static archive for object files.
48563    AR_OUT_OPTION='rcs$(SPACE)'
48564  fi
48565
48566
48567
48568
48569
48570  # On Windows, we need to set RC flags.
48571  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48572    RC_FLAGS="-nologo -l0x409"
48573    JVM_RCFLAGS="-nologo"
48574    if test "x$DEBUG_LEVEL" = xrelease; then
48575      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48576      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48577    fi
48578
48579    # The version variables used to create RC_FLAGS may be overridden
48580    # in a custom configure script, or possibly the command line.
48581    # Let those variables be expanded at make time in spec.gmk.
48582    # The \$ are escaped to the shell, and the $(...) variables
48583    # are evaluated by make.
48584    RC_FLAGS="$RC_FLAGS \
48585        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48586        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48587        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48588        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48589        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48590        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48591        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48592
48593    JVM_RCFLAGS="$JVM_RCFLAGS \
48594        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48595        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48596        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48597        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48598        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48599        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48600        -D\"HS_FNAME=jvm.dll\" \
48601        -D\"HS_INTERNAL_NAME=jvm\""
48602  fi
48603
48604
48605
48606  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48607    # silence copyright notice and other headers.
48608    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48609  fi
48610
48611
48612# Now we can test some aspects on the target using configure macros.
48613
48614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48615$as_echo_n "checking for ANSI C header files... " >&6; }
48616if ${ac_cv_header_stdc+:} false; then :
48617  $as_echo_n "(cached) " >&6
48618else
48619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48620/* end confdefs.h.  */
48621#include <stdlib.h>
48622#include <stdarg.h>
48623#include <string.h>
48624#include <float.h>
48625
48626int
48627main ()
48628{
48629
48630  ;
48631  return 0;
48632}
48633_ACEOF
48634if ac_fn_cxx_try_compile "$LINENO"; then :
48635  ac_cv_header_stdc=yes
48636else
48637  ac_cv_header_stdc=no
48638fi
48639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48640
48641if test $ac_cv_header_stdc = yes; then
48642  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48644/* end confdefs.h.  */
48645#include <string.h>
48646
48647_ACEOF
48648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48649  $EGREP "memchr" >/dev/null 2>&1; then :
48650
48651else
48652  ac_cv_header_stdc=no
48653fi
48654rm -f conftest*
48655
48656fi
48657
48658if test $ac_cv_header_stdc = yes; then
48659  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48661/* end confdefs.h.  */
48662#include <stdlib.h>
48663
48664_ACEOF
48665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48666  $EGREP "free" >/dev/null 2>&1; then :
48667
48668else
48669  ac_cv_header_stdc=no
48670fi
48671rm -f conftest*
48672
48673fi
48674
48675if test $ac_cv_header_stdc = yes; then
48676  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48677  if test "$cross_compiling" = yes; then :
48678  :
48679else
48680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48681/* end confdefs.h.  */
48682#include <ctype.h>
48683#include <stdlib.h>
48684#if ((' ' & 0x0FF) == 0x020)
48685# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48686# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48687#else
48688# define ISLOWER(c) \
48689		   (('a' <= (c) && (c) <= 'i') \
48690		     || ('j' <= (c) && (c) <= 'r') \
48691		     || ('s' <= (c) && (c) <= 'z'))
48692# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48693#endif
48694
48695#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48696int
48697main ()
48698{
48699  int i;
48700  for (i = 0; i < 256; i++)
48701    if (XOR (islower (i), ISLOWER (i))
48702	|| toupper (i) != TOUPPER (i))
48703      return 2;
48704  return 0;
48705}
48706_ACEOF
48707if ac_fn_cxx_try_run "$LINENO"; then :
48708
48709else
48710  ac_cv_header_stdc=no
48711fi
48712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48713  conftest.$ac_objext conftest.beam conftest.$ac_ext
48714fi
48715
48716fi
48717fi
48718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48719$as_echo "$ac_cv_header_stdc" >&6; }
48720if test $ac_cv_header_stdc = yes; then
48721
48722$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48723
48724fi
48725
48726# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48727for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48728		  inttypes.h stdint.h unistd.h
48729do :
48730  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48731ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48732"
48733if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48734  cat >>confdefs.h <<_ACEOF
48735#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48736_ACEOF
48737
48738fi
48739
48740done
48741
48742
48743
48744  ###############################################################################
48745  #
48746  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48747  # (The JVM can use 32 or 64 bit Java pointers but that decision
48748  # is made at runtime.)
48749  #
48750
48751  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48752    # Always specify -m flag on Solaris
48753    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48754
48755  # When we add flags to the "official" CFLAGS etc, we need to
48756  # keep track of these additions in ADDED_CFLAGS etc. These
48757  # will later be checked to make sure only controlled additions
48758  # have been made to CFLAGS etc.
48759  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48760  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48761  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48762
48763  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48764  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48765  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48766
48767  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48768  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48769  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48770
48771  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48772  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48773  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48774
48775  elif test "x$COMPILE_TYPE" = xreduced; then
48776    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48777      # Specify -m if running reduced on unix platforms
48778
48779  # When we add flags to the "official" CFLAGS etc, we need to
48780  # keep track of these additions in ADDED_CFLAGS etc. These
48781  # will later be checked to make sure only controlled additions
48782  # have been made to CFLAGS etc.
48783  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48784  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48785  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48786
48787  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48788  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48789  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48790
48791  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48792  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48793  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48794
48795  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48796  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48797  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48798
48799    fi
48800  fi
48801  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48802    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48803    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48804    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48805  fi
48806
48807  # Make compilation sanity check
48808  for ac_header in stdio.h
48809do :
48810  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48811if test "x$ac_cv_header_stdio_h" = xyes; then :
48812  cat >>confdefs.h <<_ACEOF
48813#define HAVE_STDIO_H 1
48814_ACEOF
48815
48816else
48817
48818    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48819$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48820    if test "x$COMPILE_TYPE" = xreduced; then
48821
48822  # Print a helpful message on how to acquire the necessary build dependency.
48823  # reduced is the help tag: freetype, cups, alsa etc
48824  MISSING_DEPENDENCY=reduced
48825
48826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48827    cygwin_help $MISSING_DEPENDENCY
48828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48829    msys_help $MISSING_DEPENDENCY
48830  else
48831    PKGHANDLER_COMMAND=
48832
48833    case $PKGHANDLER in
48834      apt-get)
48835        apt_help     $MISSING_DEPENDENCY ;;
48836      yum)
48837        yum_help     $MISSING_DEPENDENCY ;;
48838      brew)
48839        brew_help    $MISSING_DEPENDENCY ;;
48840      port)
48841        port_help    $MISSING_DEPENDENCY ;;
48842      pkgutil)
48843        pkgutil_help $MISSING_DEPENDENCY ;;
48844      pkgadd)
48845        pkgadd_help  $MISSING_DEPENDENCY ;;
48846    esac
48847
48848    if test "x$PKGHANDLER_COMMAND" != x; then
48849      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48850    fi
48851  fi
48852
48853      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48854$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48855    elif test "x$COMPILE_TYPE" = xcross; then
48856      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48857$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48858    fi
48859    as_fn_error $? "Cannot continue." "$LINENO" 5
48860
48861fi
48862
48863done
48864
48865
48866  # The cast to long int works around a bug in the HP C Compiler
48867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48869# This bug is HP SR number 8606223364.
48870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48871$as_echo_n "checking size of int *... " >&6; }
48872if ${ac_cv_sizeof_int_p+:} false; then :
48873  $as_echo_n "(cached) " >&6
48874else
48875  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48876
48877else
48878  if test "$ac_cv_type_int_p" = yes; then
48879     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48881as_fn_error 77 "cannot compute sizeof (int *)
48882See \`config.log' for more details" "$LINENO" 5; }
48883   else
48884     ac_cv_sizeof_int_p=0
48885   fi
48886fi
48887
48888fi
48889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48890$as_echo "$ac_cv_sizeof_int_p" >&6; }
48891
48892
48893
48894cat >>confdefs.h <<_ACEOF
48895#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48896_ACEOF
48897
48898
48899
48900  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48901  if test "x$ac_cv_sizeof_int_p" = x; then
48902    # The test failed, lets stick to the assumed value.
48903    { $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
48904$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48905  else
48906    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48907
48908    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48909      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48910      # Let's try to implicitely set the compilers target architecture and retry the test
48911      { $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
48912$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;}
48913      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48914$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48915
48916  # When we add flags to the "official" CFLAGS etc, we need to
48917  # keep track of these additions in ADDED_CFLAGS etc. These
48918  # will later be checked to make sure only controlled additions
48919  # have been made to CFLAGS etc.
48920  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48921  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48922  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48923
48924  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48925  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48926  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48927
48928  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48929  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48930  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48931
48932  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48933  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48934  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48935
48936
48937      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48938      unset ac_cv_sizeof_int_p
48939      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48940      cat >>confdefs.h <<_ACEOF
48941#undef SIZEOF_INT_P
48942_ACEOF
48943
48944      # The cast to long int works around a bug in the HP C Compiler
48945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48947# This bug is HP SR number 8606223364.
48948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48949$as_echo_n "checking size of int *... " >&6; }
48950if ${ac_cv_sizeof_int_p+:} false; then :
48951  $as_echo_n "(cached) " >&6
48952else
48953  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48954
48955else
48956  if test "$ac_cv_type_int_p" = yes; then
48957     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48959as_fn_error 77 "cannot compute sizeof (int *)
48960See \`config.log' for more details" "$LINENO" 5; }
48961   else
48962     ac_cv_sizeof_int_p=0
48963   fi
48964fi
48965
48966fi
48967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48968$as_echo "$ac_cv_sizeof_int_p" >&6; }
48969
48970
48971
48972cat >>confdefs.h <<_ACEOF
48973#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48974_ACEOF
48975
48976
48977
48978      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48979
48980      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48981        { $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
48982$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;}
48983        if test "x$COMPILE_TYPE" = xreduced; then
48984
48985  # Print a helpful message on how to acquire the necessary build dependency.
48986  # reduced is the help tag: freetype, cups, alsa etc
48987  MISSING_DEPENDENCY=reduced
48988
48989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48990    cygwin_help $MISSING_DEPENDENCY
48991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48992    msys_help $MISSING_DEPENDENCY
48993  else
48994    PKGHANDLER_COMMAND=
48995
48996    case $PKGHANDLER in
48997      apt-get)
48998        apt_help     $MISSING_DEPENDENCY ;;
48999      yum)
49000        yum_help     $MISSING_DEPENDENCY ;;
49001      brew)
49002        brew_help    $MISSING_DEPENDENCY ;;
49003      port)
49004        port_help    $MISSING_DEPENDENCY ;;
49005      pkgutil)
49006        pkgutil_help $MISSING_DEPENDENCY ;;
49007      pkgadd)
49008        pkgadd_help  $MISSING_DEPENDENCY ;;
49009    esac
49010
49011    if test "x$PKGHANDLER_COMMAND" != x; then
49012      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49013    fi
49014  fi
49015
49016          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49017$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49018        elif test "x$COMPILE_TYPE" = xcross; then
49019          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49020$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49021        fi
49022        as_fn_error $? "Cannot continue." "$LINENO" 5
49023      fi
49024    fi
49025  fi
49026
49027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49028$as_echo_n "checking for target address size... " >&6; }
49029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49030$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49031
49032
49033  ###############################################################################
49034  #
49035  # Is the target little of big endian?
49036  #
49037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49038$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49039if ${ac_cv_c_bigendian+:} false; then :
49040  $as_echo_n "(cached) " >&6
49041else
49042  ac_cv_c_bigendian=unknown
49043    # See if we're dealing with a universal compiler.
49044    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49045/* end confdefs.h.  */
49046#ifndef __APPLE_CC__
49047	       not a universal capable compiler
49048	     #endif
49049	     typedef int dummy;
49050
49051_ACEOF
49052if ac_fn_cxx_try_compile "$LINENO"; then :
49053
49054	# Check for potential -arch flags.  It is not universal unless
49055	# there are at least two -arch flags with different values.
49056	ac_arch=
49057	ac_prev=
49058	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49059	 if test -n "$ac_prev"; then
49060	   case $ac_word in
49061	     i?86 | x86_64 | ppc | ppc64)
49062	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49063		 ac_arch=$ac_word
49064	       else
49065		 ac_cv_c_bigendian=universal
49066		 break
49067	       fi
49068	       ;;
49069	   esac
49070	   ac_prev=
49071	 elif test "x$ac_word" = "x-arch"; then
49072	   ac_prev=arch
49073	 fi
49074       done
49075fi
49076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49077    if test $ac_cv_c_bigendian = unknown; then
49078      # See if sys/param.h defines the BYTE_ORDER macro.
49079      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49080/* end confdefs.h.  */
49081#include <sys/types.h>
49082	     #include <sys/param.h>
49083
49084int
49085main ()
49086{
49087#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49088		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49089		     && LITTLE_ENDIAN)
49090	      bogus endian macros
49091	     #endif
49092
49093  ;
49094  return 0;
49095}
49096_ACEOF
49097if ac_fn_cxx_try_compile "$LINENO"; then :
49098  # It does; now see whether it defined to BIG_ENDIAN or not.
49099	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49100/* end confdefs.h.  */
49101#include <sys/types.h>
49102		#include <sys/param.h>
49103
49104int
49105main ()
49106{
49107#if BYTE_ORDER != BIG_ENDIAN
49108		 not big endian
49109		#endif
49110
49111  ;
49112  return 0;
49113}
49114_ACEOF
49115if ac_fn_cxx_try_compile "$LINENO"; then :
49116  ac_cv_c_bigendian=yes
49117else
49118  ac_cv_c_bigendian=no
49119fi
49120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49121fi
49122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49123    fi
49124    if test $ac_cv_c_bigendian = unknown; then
49125      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49126      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49127/* end confdefs.h.  */
49128#include <limits.h>
49129
49130int
49131main ()
49132{
49133#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49134	      bogus endian macros
49135	     #endif
49136
49137  ;
49138  return 0;
49139}
49140_ACEOF
49141if ac_fn_cxx_try_compile "$LINENO"; then :
49142  # It does; now see whether it defined to _BIG_ENDIAN or not.
49143	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49144/* end confdefs.h.  */
49145#include <limits.h>
49146
49147int
49148main ()
49149{
49150#ifndef _BIG_ENDIAN
49151		 not big endian
49152		#endif
49153
49154  ;
49155  return 0;
49156}
49157_ACEOF
49158if ac_fn_cxx_try_compile "$LINENO"; then :
49159  ac_cv_c_bigendian=yes
49160else
49161  ac_cv_c_bigendian=no
49162fi
49163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49164fi
49165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49166    fi
49167    if test $ac_cv_c_bigendian = unknown; then
49168      # Compile a test program.
49169      if test "$cross_compiling" = yes; then :
49170  # Try to guess by grepping values from an object file.
49171	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49172/* end confdefs.h.  */
49173short int ascii_mm[] =
49174		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49175		short int ascii_ii[] =
49176		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49177		int use_ascii (int i) {
49178		  return ascii_mm[i] + ascii_ii[i];
49179		}
49180		short int ebcdic_ii[] =
49181		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49182		short int ebcdic_mm[] =
49183		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49184		int use_ebcdic (int i) {
49185		  return ebcdic_mm[i] + ebcdic_ii[i];
49186		}
49187		extern int foo;
49188
49189int
49190main ()
49191{
49192return use_ascii (foo) == use_ebcdic (foo);
49193  ;
49194  return 0;
49195}
49196_ACEOF
49197if ac_fn_cxx_try_compile "$LINENO"; then :
49198  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49199	      ac_cv_c_bigendian=yes
49200	    fi
49201	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49202	      if test "$ac_cv_c_bigendian" = unknown; then
49203		ac_cv_c_bigendian=no
49204	      else
49205		# finding both strings is unlikely to happen, but who knows?
49206		ac_cv_c_bigendian=unknown
49207	      fi
49208	    fi
49209fi
49210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49211else
49212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49213/* end confdefs.h.  */
49214$ac_includes_default
49215int
49216main ()
49217{
49218
49219	     /* Are we little or big endian?  From Harbison&Steele.  */
49220	     union
49221	     {
49222	       long int l;
49223	       char c[sizeof (long int)];
49224	     } u;
49225	     u.l = 1;
49226	     return u.c[sizeof (long int) - 1] == 1;
49227
49228  ;
49229  return 0;
49230}
49231_ACEOF
49232if ac_fn_cxx_try_run "$LINENO"; then :
49233  ac_cv_c_bigendian=no
49234else
49235  ac_cv_c_bigendian=yes
49236fi
49237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49238  conftest.$ac_objext conftest.beam conftest.$ac_ext
49239fi
49240
49241    fi
49242fi
49243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49244$as_echo "$ac_cv_c_bigendian" >&6; }
49245 case $ac_cv_c_bigendian in #(
49246   yes)
49247     ENDIAN="big";; #(
49248   no)
49249     ENDIAN="little" ;; #(
49250   universal)
49251     ENDIAN="universal_endianness"
49252     ;; #(
49253   *)
49254     ENDIAN="unknown" ;;
49255 esac
49256
49257
49258  if test "x$ENDIAN" = xuniversal_endianness; then
49259    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49260  fi
49261  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49262    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
49263  fi
49264
49265
49266# Configure flags for the tools
49267
49268  ###############################################################################
49269  #
49270  # How to compile shared libraries.
49271  #
49272
49273  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49274    PICFLAG="-fPIC"
49275    C_FLAG_REORDER=''
49276    CXX_FLAG_REORDER=''
49277
49278    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49279      # Linking is different on MacOSX
49280      if test "x$STATIC_BUILD" = xtrue; then
49281        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49282      else
49283        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49284        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49285      fi
49286      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49287      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49288      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49289      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49290    else
49291      # Default works for linux, might work on other platforms as well.
49292      SHARED_LIBRARY_FLAGS='-shared'
49293      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49294      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49295      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49296      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49297    fi
49298  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49299    C_FLAG_REORDER=''
49300    CXX_FLAG_REORDER=''
49301
49302    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49303      # Linking is different on MacOSX
49304      PICFLAG=''
49305      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49306      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49307      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49308      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49309      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49310
49311      if test "x$STATIC_BUILD" = xfalse; then
49312        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49313      fi
49314    else
49315      # Default works for linux, might work on other platforms as well.
49316      PICFLAG='-fPIC'
49317      SHARED_LIBRARY_FLAGS='-shared'
49318      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49319      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49320      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49321
49322      # arm specific settings
49323      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49324        # '-Wl,-z,origin' isn't used on arm.
49325        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49326      else
49327        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49328      fi
49329
49330    fi
49331  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49332    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49333      PICFLAG="-xcode=pic32"
49334    else
49335      PICFLAG="-KPIC"
49336    fi
49337    C_FLAG_REORDER='-xF'
49338    CXX_FLAG_REORDER='-xF'
49339    SHARED_LIBRARY_FLAGS="-G"
49340    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49341    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49342    SET_SHARED_LIBRARY_NAME='-h $1'
49343    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49344  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49345    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49346    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49347    # will have to patch this single instruction with a call to some out-of-order code which
49348    # does the load from the TOC. This is of course slow. But in that case we also would have
49349    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49350    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49351    # can be patched directly by the linker and does not require a jump to out-of-order code.
49352    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49353    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49354    # loads for accessing a global variable). But there are rumors that this may be seen as a
49355    # 'performance feature' because of improved code locality of the symbols used in a
49356    # compilation unit.
49357    PICFLAG="-qpic"
49358    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49359    C_FLAG_REORDER=''
49360    CXX_FLAG_REORDER=''
49361    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49362    SET_EXECUTABLE_ORIGIN=""
49363    SET_SHARED_LIBRARY_ORIGIN=''
49364    SET_SHARED_LIBRARY_NAME=''
49365    SET_SHARED_LIBRARY_MAPFILE=''
49366  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49367    PICFLAG=""
49368    C_FLAG_REORDER=''
49369    CXX_FLAG_REORDER=''
49370    SHARED_LIBRARY_FLAGS="-dll"
49371    SET_EXECUTABLE_ORIGIN=''
49372    SET_SHARED_LIBRARY_ORIGIN=''
49373    SET_SHARED_LIBRARY_NAME=''
49374    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49375  fi
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385  # The (cross) compiler is now configured, we can now test capabilities
49386  # of the target platform.
49387
49388
49389
49390  ###############################################################################
49391  #
49392  # Setup the opt flags for different compilers
49393  # and different operating systems.
49394  #
49395
49396  # FIXME: this was indirectly the old default, but just inherited.
49397  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49398  #   C_FLAG_DEPS="-MMD -MF"
49399  # fi
49400
49401  # Generate make dependency files
49402  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49403    C_FLAG_DEPS="-MMD -MF"
49404  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49405    C_FLAG_DEPS="-MMD -MF"
49406  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49407    C_FLAG_DEPS="-xMMD -xMF"
49408  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49409    C_FLAG_DEPS="-qmakedep=gcc -MF"
49410  fi
49411  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49412
49413
49414
49415  # Debug symbols
49416  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49417    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49418      # reduce from default "-g2" option to save space
49419      CFLAGS_DEBUG_SYMBOLS="-g1"
49420      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49421    else
49422      CFLAGS_DEBUG_SYMBOLS="-g"
49423      CXXFLAGS_DEBUG_SYMBOLS="-g"
49424    fi
49425  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49426    CFLAGS_DEBUG_SYMBOLS="-g"
49427    CXXFLAGS_DEBUG_SYMBOLS="-g"
49428  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49429    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49430    # -g0 enables debug symbols without disabling inlining.
49431    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49432  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49433    CFLAGS_DEBUG_SYMBOLS="-g"
49434    CXXFLAGS_DEBUG_SYMBOLS="-g"
49435  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49436    CFLAGS_DEBUG_SYMBOLS="-Zi"
49437    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49438  fi
49439
49440
49441
49442  # Debug symbols for JVM_CFLAGS
49443  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49444    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49445    if test "x$DEBUG_LEVEL" = xslowdebug; then
49446      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49447    else
49448      # -g0 does not disable inlining, which -g does.
49449      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49450    fi
49451  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49452    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49453  else
49454    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49455  fi
49456
49457
49458  # bounds, memory and behavior checking options
49459  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49460    case $DEBUG_LEVEL in
49461    release )
49462      # no adjustment
49463      ;;
49464    fastdebug )
49465      # no adjustment
49466      ;;
49467    slowdebug )
49468      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49469      # get's added conditionally on whether we produce debug symbols or not.
49470      # This is most likely not really correct.
49471
49472      # Add runtime stack smashing and undefined behavior checks.
49473      # Not all versions of gcc support -fstack-protector
49474      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517    # Execute function body
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566    # Execute function body
49567
49568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49569$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49570  supports=yes
49571
49572  saved_cflags="$CFLAGS"
49573  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49574  ac_ext=c
49575ac_cpp='$CPP $CPPFLAGS'
49576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49578ac_compiler_gnu=$ac_cv_c_compiler_gnu
49579
49580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49581/* end confdefs.h.  */
49582int i;
49583_ACEOF
49584if ac_fn_c_try_compile "$LINENO"; then :
49585
49586else
49587  supports=no
49588fi
49589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49590  ac_ext=cpp
49591ac_cpp='$CXXCPP $CPPFLAGS'
49592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49595
49596  CFLAGS="$saved_cflags"
49597
49598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49599$as_echo "$supports" >&6; }
49600  if test "x$supports" = "xyes" ; then
49601    :
49602    C_COMP_SUPPORTS="yes"
49603  else
49604    :
49605    C_COMP_SUPPORTS="no"
49606  fi
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666    # Execute function body
49667
49668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49669$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49670  supports=yes
49671
49672  saved_cxxflags="$CXXFLAGS"
49673  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49674  ac_ext=cpp
49675ac_cpp='$CXXCPP $CPPFLAGS'
49676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49679
49680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49681/* end confdefs.h.  */
49682int i;
49683_ACEOF
49684if ac_fn_cxx_try_compile "$LINENO"; then :
49685
49686else
49687  supports=no
49688fi
49689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49690  ac_ext=cpp
49691ac_cpp='$CXXCPP $CPPFLAGS'
49692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49695
49696  CXXFLAGS="$saved_cxxflags"
49697
49698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49699$as_echo "$supports" >&6; }
49700  if test "x$supports" = "xyes" ; then
49701    :
49702    CXX_COMP_SUPPORTS="yes"
49703  else
49704    :
49705    CXX_COMP_SUPPORTS="no"
49706  fi
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49721$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49722  supports=no
49723  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49724
49725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49726$as_echo "$supports" >&6; }
49727  if test "x$supports" = "xyes" ; then
49728    :
49729
49730  else
49731    :
49732    STACK_PROTECTOR_CFLAG=""
49733  fi
49734
49735
49736
49737
49738
49739
49740
49741      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49742      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49743      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49744        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49745      fi
49746      ;;
49747    esac
49748  fi
49749
49750  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49751    if test "x$DEBUG_LEVEL" != xrelease; then
49752      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49753        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49754      fi
49755    fi
49756  fi
49757
49758  # Optimization levels
49759  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49760    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49761
49762    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49763      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49764      C_O_FLAG_HIGHEST_JVM="-xO4"
49765      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49766      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49767      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49768      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49769      C_O_FLAG_DEBUG_JVM=""
49770      C_O_FLAG_NONE="-xregs=no%frameptr"
49771      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49772      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49773      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49774      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49775      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49776      CXX_O_FLAG_DEBUG_JVM=""
49777      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49778      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49779        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49780        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49781      fi
49782    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49783      C_O_FLAG_HIGHEST_JVM="-xO4"
49784      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49785      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49786      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49787      C_O_FLAG_DEBUG=""
49788      C_O_FLAG_DEBUG_JVM=""
49789      C_O_FLAG_NONE=""
49790      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49791      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49792      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49793      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49794      CXX_O_FLAG_DEBUG=""
49795      CXX_O_FLAG_DEBUG_JVM=""
49796      CXX_O_FLAG_NONE=""
49797    fi
49798  else
49799    # The remaining toolchains share opt flags between CC and CXX;
49800    # setup for C and duplicate afterwards.
49801    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49802      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49803        # On MacOSX we optimize for size, something
49804        # we should do for all platforms?
49805        C_O_FLAG_HIGHEST_JVM="-Os"
49806        C_O_FLAG_HIGHEST="-Os"
49807        C_O_FLAG_HI="-Os"
49808        C_O_FLAG_NORM="-Os"
49809        C_O_FLAG_SIZE="-Os"
49810      else
49811        C_O_FLAG_HIGHEST_JVM="-O3"
49812        C_O_FLAG_HIGHEST="-O3"
49813        C_O_FLAG_HI="-O3"
49814        C_O_FLAG_NORM="-O2"
49815        C_O_FLAG_SIZE="-Os"
49816      fi
49817      C_O_FLAG_DEBUG="-O0"
49818      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49819        C_O_FLAG_DEBUG_JVM=""
49820      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49821        C_O_FLAG_DEBUG_JVM="-O0"
49822      fi
49823      C_O_FLAG_NONE="-O0"
49824    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49825      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49826        # On MacOSX we optimize for size, something
49827        # we should do for all platforms?
49828        C_O_FLAG_HIGHEST_JVM="-Os"
49829        C_O_FLAG_HIGHEST="-Os"
49830        C_O_FLAG_HI="-Os"
49831        C_O_FLAG_NORM="-Os"
49832        C_O_FLAG_SIZE="-Os"
49833      else
49834        C_O_FLAG_HIGHEST_JVM="-O3"
49835        C_O_FLAG_HIGHEST="-O3"
49836        C_O_FLAG_HI="-O3"
49837        C_O_FLAG_NORM="-O2"
49838        C_O_FLAG_SIZE="-Os"
49839      fi
49840      C_O_FLAG_DEBUG="-O0"
49841      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49842        C_O_FLAG_DEBUG_JVM=""
49843      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49844        C_O_FLAG_DEBUG_JVM="-O0"
49845      fi
49846      C_O_FLAG_NONE="-O0"
49847    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49848      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49849      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49850      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49851      C_O_FLAG_NORM="-O2"
49852      C_O_FLAG_DEBUG="-qnoopt"
49853      # FIXME: Value below not verified.
49854      C_O_FLAG_DEBUG_JVM=""
49855      C_O_FLAG_NONE="-qnoopt"
49856    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49857      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49858      C_O_FLAG_HIGHEST="-O2"
49859      C_O_FLAG_HI="-O1"
49860      C_O_FLAG_NORM="-O1"
49861      C_O_FLAG_DEBUG="-Od"
49862      C_O_FLAG_DEBUG_JVM=""
49863      C_O_FLAG_NONE="-Od"
49864      C_O_FLAG_SIZE="-Os"
49865    fi
49866    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49867    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49868    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49869    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49870    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49871    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49872    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49873    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49874  fi
49875
49876  # Adjust optimization flags according to debug level.
49877  case $DEBUG_LEVEL in
49878    release )
49879      # no adjustment
49880      ;;
49881    fastdebug )
49882      # Not quite so much optimization
49883      C_O_FLAG_HI="$C_O_FLAG_NORM"
49884      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49885      ;;
49886    slowdebug )
49887      # Disable optimization
49888      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49889      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49890      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49891      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49892      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49893      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49894      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49895      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49896      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49897      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49898      ;;
49899  esac
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920# Check whether --with-abi-profile was given.
49921if test "${with_abi_profile+set}" = set; then :
49922  withval=$with_abi_profile;
49923fi
49924
49925
49926  if test "x$with_abi_profile" != x; then
49927    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49928        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49929      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49930    fi
49931
49932    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49934$as_echo_n "checking for ABI profle... " >&6; }
49935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49936$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49937
49938    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49939      ARM_FLOAT_TYPE=vfp-sflt
49940      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49941    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49942      ARM_FLOAT_TYPE=vfp-hflt
49943      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49944    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49945      ARM_FLOAT_TYPE=sflt
49946      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49947    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49948      ARM_FLOAT_TYPE=vfp-sflt
49949      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49950    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49951      ARM_FLOAT_TYPE=vfp-hflt
49952      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49953    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49954      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49955      ARM_FLOAT_TYPE=
49956      ARM_ARCH_TYPE_FLAGS=
49957    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49958      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49959      ARM_FLOAT_TYPE=
49960      ARM_ARCH_TYPE_FLAGS=
49961    else
49962      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49963    fi
49964
49965    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49966      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49967    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49968      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49969    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49970      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49971    fi
49972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49973$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49975$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49976
49977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49978$as_echo_n "checking for arch type flags... " >&6; }
49979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49980$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49981
49982    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49983    # autoconf target triplet.
49984     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49985    # Sanity check that it is a known ABI.
49986    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49987        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49988        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49989          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49990$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49991    fi
49992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49993$as_echo_n "checking for ABI property name... " >&6; }
49994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49995$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49996
49997
49998    # Pass these on to the open part of configure as if they were set using
49999    # --with-extra-c[xx]flags.
50000    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50001    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50002    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50003    # FIXME: This should not really be set using extra_cflags.
50004    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50005        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50006        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50007    fi
50008    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50009    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50010    # And pass the architecture flags to the linker as well
50011    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50012  fi
50013
50014  # When building with an abi profile, the name of that profile is appended on the
50015  # bundle platform, which is used in bundle names.
50016  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50017    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50018  fi
50019
50020
50021  # Special extras...
50022  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50023    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50024      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50025      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50026    fi
50027    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50028    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50029  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50030    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50031    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50032  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50033    CXXSTD_CXXFLAG="-std=gnu++98"
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076    # Execute function body
50077
50078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50079$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50080  supports=yes
50081
50082  saved_cxxflags="$CXXFLAGS"
50083  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50084  ac_ext=cpp
50085ac_cpp='$CXXCPP $CPPFLAGS'
50086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50089
50090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50091/* end confdefs.h.  */
50092int i;
50093_ACEOF
50094if ac_fn_cxx_try_compile "$LINENO"; then :
50095
50096else
50097  supports=no
50098fi
50099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50100  ac_ext=cpp
50101ac_cpp='$CXXCPP $CPPFLAGS'
50102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50105
50106  CXXFLAGS="$saved_cxxflags"
50107
50108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50109$as_echo "$supports" >&6; }
50110  if test "x$supports" = "xyes" ; then
50111    :
50112
50113  else
50114    :
50115    CXXSTD_CXXFLAG=""
50116  fi
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50130    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50131
50132  fi
50133  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50134    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50135    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50136  fi
50137
50138  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50139  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50140  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50141
50142  ###############################################################################
50143  #
50144  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50145  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50146  #
50147
50148  # Setup compiler/platform specific flags into
50149  #    CFLAGS_JDK    - C Compiler flags
50150  #    CXXFLAGS_JDK  - C++ Compiler flags
50151  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50152  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50153    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50154    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50155    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50156    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50157      # Force compatibility with i586 on 32 bit intel platforms.
50158      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50159      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50160    fi
50161    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50162        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50163    case $OPENJDK_TARGET_CPU_ARCH in
50164      arm )
50165        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50166        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50167        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50168        ;;
50169      ppc )
50170        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50171        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50172        ;;
50173      s390 )
50174        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50175        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50176        ;;
50177      * )
50178        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50179        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50180        ;;
50181    esac
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236    # Execute function body
50237
50238  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50239  REFERENCE_VERSION=6
50240
50241  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50242    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50243  fi
50244
50245  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50246    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50247  fi
50248
50249  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50250  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50251
50252  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50253    :
50254
50255  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50256  # runs afoul of the more aggressive versions of these optimisations.
50257  # Notably, value range propagation now assumes that the this pointer of C++
50258  # member functions is non-null.
50259  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50260        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50261        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50262$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50263  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50264  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50265
50266  else
50267    :
50268
50269  fi
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50285    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50286
50287    # Restrict the debug information created by Clang to avoid
50288    # too big object files and speed the build up a little bit
50289    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50290    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50291    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50292      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50293        # Force compatibility with i586 on 32 bit intel platforms.
50294        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50295        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50296      fi
50297      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50298      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50299          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50300      case $OPENJDK_TARGET_CPU_ARCH in
50301        ppc )
50302          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50303          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50304          ;;
50305        * )
50306          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50307          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50308          ;;
50309      esac
50310    fi
50311  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50312    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50313    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50314    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50315      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50316    fi
50317
50318    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50319    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50320  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50321    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50322    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50323    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50324  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50325    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50326        -MD -Zc:wchar_t- -W3 -wd4800 \
50327        -DWIN32_LEAN_AND_MEAN \
50328        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50329        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50330        -DWIN32 -DIAL"
50331    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50332      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50333    else
50334      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50335    fi
50336    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50337    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50338    # studio.
50339    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50340      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50341      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50342      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50343    fi
50344  fi
50345
50346  ###############################################################################
50347
50348  # Adjust flags according to debug level.
50349  case $DEBUG_LEVEL in
50350    fastdebug | slowdebug )
50351      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50352      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50353      ;;
50354    release )
50355      ;;
50356    * )
50357      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50358      ;;
50359  esac
50360
50361  # Set some common defines. These works for all compilers, but assume
50362  # -D is universally accepted.
50363
50364  # Setup endianness
50365  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50366    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50367    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50368    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50369    #   Note: -Dmacro         is the same as    #define macro 1
50370    #         -Dmacro=        is the same as    #define macro
50371    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50372      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50373    else
50374      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50375    fi
50376  else
50377    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50378    # are defined in the system?
50379    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50380      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50381    else
50382      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50383    fi
50384  fi
50385
50386  # Setup target OS define. Use OS target name but in upper case.
50387  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50388  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50389
50390  # Setup target CPU
50391  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50392      $OPENJDK_TARGET_ADD_LP64 \
50393      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50394
50395  # Setup debug/release defines
50396  if test "x$DEBUG_LEVEL" = xrelease; then
50397    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50398    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50399      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50400    fi
50401  else
50402    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50403  fi
50404
50405  # Set some additional per-OS defines.
50406  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50407    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50408    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50409        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50410  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50411    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50412    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50413        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50414  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50415    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50416    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50417    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50418    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50419        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50420        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50421        -fno-omit-frame-pointer"
50422  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50423    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50424    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50425    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50426        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50427        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50428  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50429    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50430  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50431    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50432    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50433  fi
50434
50435  # Set some additional per-CPU defines.
50436  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50437    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50438  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50439    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50440  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50441    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50442      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50443      # fixes `relocation truncated to fit' error for gcc 4.1.
50444      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50445      # Use ppc64 instructions, but schedule for power5
50446      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50447    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50448      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50449    fi
50450  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50451    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50452      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50453      # Little endian machine uses ELFv2 ABI.
50454      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50455      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50456      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50457    fi
50458  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50459    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50460      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50461    fi
50462  fi
50463
50464  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50465    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50466  fi
50467
50468  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50469    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50470      # Solaris does not have _LP64=1 in the old build.
50471      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50472      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50473    fi
50474  fi
50475
50476  # Set JVM_CFLAGS warning handling
50477  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50478    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50479        -Wunused-value -Woverloaded-virtual"
50480
50481    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536    # Execute function body
50537
50538  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50539  REFERENCE_VERSION=4.8
50540
50541  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50542    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50543  fi
50544
50545  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50546    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50547  fi
50548
50549  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50550  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50551
50552  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50553    :
50554
50555            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50556            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50557
50558
50559  else
50560    :
50561
50562  fi
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577    fi
50578    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50579      # Non-zero builds have stricter warnings
50580      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50581    else
50582      if test "x$TOOLCHAIN_TYPE" = xclang; then
50583        # Some versions of llvm do not like -Wundef
50584        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50585      fi
50586    fi
50587  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50588    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50589        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50590  fi
50591
50592  # Additional macosx handling
50593  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50594    # Setting these parameters makes it an error to link to macosx APIs that are
50595    # newer than the given OS version and makes the linked binaries compatible
50596    # even if built on a newer version of the OS.
50597    # The expected format is X.Y.Z
50598    MACOSX_VERSION_MIN=10.7.0
50599
50600
50601    # The macro takes the version with no dots, ex: 1070
50602    # Let the flags variables get resolved in make for easier override on make
50603    # command line.
50604    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50605    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50606  fi
50607
50608  # Setup some hard coded includes
50609  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50610      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50611      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50612      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50613      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50614      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50615      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50616
50617  # The shared libraries are compiled using the picflag.
50618  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50619      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50620  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50621      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50622
50623  # Executable flags
50624  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50625  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50626
50627
50628
50629
50630
50631
50632  # Setup LDFLAGS et al.
50633  #
50634
50635  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50636    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50637    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50638    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50639    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50640      LDFLAGS_SAFESH="-safeseh"
50641      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50642      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50643      # NOTE: Old build added -machine. Probably not needed.
50644      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50645    else
50646      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50647    fi
50648  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50649      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50650      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50651        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50652        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50653    fi
50654  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50655    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50656    # We have previously set HAS_GNU_HASH if this is the case
50657    if test -n "$HAS_GNU_HASH"; then
50658      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50659      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50660      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50661    fi
50662      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50663        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50664    fi
50665    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50666      # And since we now know that the linker is gnu, then add -z defs, to forbid
50667      # undefined symbols in object files.
50668      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50669      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50670      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50671      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50672      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50673      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50674        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50675      fi
50676      case $DEBUG_LEVEL in
50677        release )
50678          # tell linker to optimize libraries.
50679          # Should this be supplied to the OSS linker as well?
50680          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50681          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50682          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50683          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50684            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50685          fi
50686          ;;
50687        slowdebug )
50688          # Hotspot always let the linker optimize
50689          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50690          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50691            # do relocations at load
50692            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50693            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50694            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50695          fi
50696          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50697            # mark relocations read only
50698            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50699            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50700            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50701          fi
50702          ;;
50703        fastdebug )
50704          # Hotspot always let the linker optimize
50705          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50706          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50707            # mark relocations read only
50708            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50709            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50710            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50711          fi
50712          ;;
50713        * )
50714          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50715          ;;
50716        esac
50717    fi
50718  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50719    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50720    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50721    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50722    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50723    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50724    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50725      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50726    fi
50727  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50728    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50729    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50730    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50731  fi
50732
50733  # Customize LDFLAGS for executables
50734
50735  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50736
50737  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50738    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50739      LDFLAGS_STACK_SIZE=1048576
50740    else
50741      LDFLAGS_STACK_SIZE=327680
50742    fi
50743    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50744  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50745    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50746  fi
50747
50748  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50749
50750  # Customize LDFLAGS for libs
50751  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50752
50753  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50754  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50755    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50756        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50757    JDKLIB_LIBS=""
50758  else
50759    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50760        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50761
50762    if test "xTARGET" = "xTARGET"; then
50763      # On some platforms (mac) the linker warns about non existing -L dirs.
50764      # For any of the variants server, client or minimal, the dir matches the
50765      # variant name. The "main" variant should be used for linking. For the
50766      # rest, the dir is just server.
50767      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50768          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50769        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50770            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50771      else
50772        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50773            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50774      fi
50775    elif test "xTARGET" = "xBUILD"; then
50776      # When building a buildjdk, it's always only the server variant
50777      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50778          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50779    fi
50780
50781    JDKLIB_LIBS="-ljava -ljvm"
50782    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50783      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50784    fi
50785
50786  fi
50787
50788LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50789
50790  # Set JVM_LIBS (per os)
50791  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50792    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50793  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50794    # FIXME: This hard-coded path is not really proper.
50795    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50796      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50797    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50798      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50799    fi
50800    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50801        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50802  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50803    JVM_LIBS="$JVM_LIBS -lm"
50804  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50805    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50806  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50807    JVM_LIBS="$JVM_LIBS -lm"
50808  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50809    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50810        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50811        wsock32.lib winmm.lib version.lib psapi.lib"
50812    fi
50813
50814  # Set JVM_ASFLAGS
50815  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50816    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50817      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50818    fi
50819  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50820    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50821  fi
50822
50823  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839  # Special extras...
50840  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50841    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50842      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50843      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50844    fi
50845    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50846    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50847  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50848    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50849    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50850  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50851    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50852
50853
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868
50869
50870
50871
50872
50873
50874
50875
50876
50877
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894    # Execute function body
50895
50896  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50897$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50898  supports=yes
50899
50900  saved_cxxflags="$CXXFLAGS"
50901  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50902  ac_ext=cpp
50903ac_cpp='$CXXCPP $CPPFLAGS'
50904ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50905ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50906ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50907
50908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50909/* end confdefs.h.  */
50910int i;
50911_ACEOF
50912if ac_fn_cxx_try_compile "$LINENO"; then :
50913
50914else
50915  supports=no
50916fi
50917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50918  ac_ext=cpp
50919ac_cpp='$CXXCPP $CPPFLAGS'
50920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50923
50924  CXXFLAGS="$saved_cxxflags"
50925
50926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50927$as_echo "$supports" >&6; }
50928  if test "x$supports" = "xyes" ; then
50929    :
50930
50931  else
50932    :
50933    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50934  fi
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50948    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50949
50950  fi
50951  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50952    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50953    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50954  fi
50955
50956  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50957  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50958  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50959
50960  ###############################################################################
50961  #
50962  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50963  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50964  #
50965
50966  # Setup compiler/platform specific flags into
50967  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50968  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50969  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50970  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50971    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50972    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50973    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50974    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50975      # Force compatibility with i586 on 32 bit intel platforms.
50976      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50977      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50978    fi
50979    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50980        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50981    case $OPENJDK_BUILD_CPU_ARCH in
50982      arm )
50983        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50984        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50985        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50986        ;;
50987      ppc )
50988        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50989        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50990        ;;
50991      s390 )
50992        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50993        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50994        ;;
50995      * )
50996        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50997        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50998        ;;
50999    esac
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054    # Execute function body
51055
51056  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51057  REFERENCE_VERSION=6
51058
51059  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51060    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51061  fi
51062
51063  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51064    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51065  fi
51066
51067  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51068  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51069
51070  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51071    :
51072
51073  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51074  # runs afoul of the more aggressive versions of these optimisations.
51075  # Notably, value range propagation now assumes that the this pointer of C++
51076  # member functions is non-null.
51077  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51078        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51079        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51080$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51081  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51082  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51083
51084  else
51085    :
51086
51087  fi
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51103    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51104
51105    # Restrict the debug information created by Clang to avoid
51106    # too big object files and speed the build up a little bit
51107    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51108    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51109    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51110      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51111        # Force compatibility with i586 on 32 bit intel platforms.
51112        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51113        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51114      fi
51115      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51116      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51117          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51118      case $OPENJDK_BUILD_CPU_ARCH in
51119        ppc )
51120          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51121          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51122          ;;
51123        * )
51124          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51125          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51126          ;;
51127      esac
51128    fi
51129  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51130    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51131    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51132    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51133      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51134    fi
51135
51136    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51137    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51138  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51139    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51140    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51141    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51142  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51143    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51144        -MD -Zc:wchar_t- -W3 -wd4800 \
51145        -DWIN32_LEAN_AND_MEAN \
51146        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51147        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51148        -DWIN32 -DIAL"
51149    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51150      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51151    else
51152      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51153    fi
51154    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51155    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51156    # studio.
51157    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51158      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51159      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51160      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51161    fi
51162  fi
51163
51164  ###############################################################################
51165
51166  # Adjust flags according to debug level.
51167  case $DEBUG_LEVEL in
51168    fastdebug | slowdebug )
51169      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51170      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51171      ;;
51172    release )
51173      ;;
51174    * )
51175      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51176      ;;
51177  esac
51178
51179  # Set some common defines. These works for all compilers, but assume
51180  # -D is universally accepted.
51181
51182  # Setup endianness
51183  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51184    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51185    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51186    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51187    #   Note: -Dmacro         is the same as    #define macro 1
51188    #         -Dmacro=        is the same as    #define macro
51189    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51190      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51191    else
51192      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51193    fi
51194  else
51195    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51196    # are defined in the system?
51197    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51198      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51199    else
51200      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51201    fi
51202  fi
51203
51204  # Setup target OS define. Use OS target name but in upper case.
51205  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51206  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51207
51208  # Setup target CPU
51209  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51210      $OPENJDK_BUILD_ADD_LP64 \
51211      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51212
51213  # Setup debug/release defines
51214  if test "x$DEBUG_LEVEL" = xrelease; then
51215    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51216    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51217      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51218    fi
51219  else
51220    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51221  fi
51222
51223  # Set some additional per-OS defines.
51224  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51225    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51226    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51227        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51228  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51229    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51230    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51231        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51232  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51233    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51234    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51235    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51236    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51237        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51238        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51239        -fno-omit-frame-pointer"
51240  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51241    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51242    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51243    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51244        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51245        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51246  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51247    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51248  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51249    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51250    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51251  fi
51252
51253  # Set some additional per-CPU defines.
51254  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51255    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51256  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51257    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51258  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51259    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51260      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51261      # fixes `relocation truncated to fit' error for gcc 4.1.
51262      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51263      # Use ppc64 instructions, but schedule for power5
51264      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51265    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51266      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51267    fi
51268  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51269    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51270      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51271      # Little endian machine uses ELFv2 ABI.
51272      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51273      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51274      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51275    fi
51276  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51277    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51278      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51279    fi
51280  fi
51281
51282  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51283    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51284  fi
51285
51286  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51287    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51288      # Solaris does not have _LP64=1 in the old build.
51289      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51290      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51291    fi
51292  fi
51293
51294  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51295  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51296    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51297        -Wunused-value -Woverloaded-virtual"
51298
51299    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354    # Execute function body
51355
51356  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51357  REFERENCE_VERSION=4.8
51358
51359  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51360    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51361  fi
51362
51363  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51364    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51365  fi
51366
51367  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51368  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51369
51370  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51371    :
51372
51373            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51374            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51375
51376
51377  else
51378    :
51379
51380  fi
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395    fi
51396    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51397      # Non-zero builds have stricter warnings
51398      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51399    else
51400      if test "x$TOOLCHAIN_TYPE" = xclang; then
51401        # Some versions of llvm do not like -Wundef
51402        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51403      fi
51404    fi
51405  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51406    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51407        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51408  fi
51409
51410  # Additional macosx handling
51411  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51412    # Setting these parameters makes it an error to link to macosx APIs that are
51413    # newer than the given OS version and makes the linked binaries compatible
51414    # even if built on a newer version of the OS.
51415    # The expected format is X.Y.Z
51416    MACOSX_VERSION_MIN=10.7.0
51417
51418
51419    # The macro takes the version with no dots, ex: 1070
51420    # Let the flags variables get resolved in make for easier override on make
51421    # command line.
51422    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)"
51423    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51424  fi
51425
51426  # Setup some hard coded includes
51427  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51428      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51429      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51430      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51431      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51432      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51433      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51434
51435  # The shared libraries are compiled using the picflag.
51436  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51437      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51438  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51439      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51440
51441  # Executable flags
51442  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51443  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51444
51445
51446
51447
51448
51449
51450  # Setup LDFLAGS et al.
51451  #
51452
51453  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51454    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51455    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51456    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51457    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51458      LDFLAGS_SAFESH="-safeseh"
51459      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51460      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51461      # NOTE: Old build added -machine. Probably not needed.
51462      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51463    else
51464      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51465    fi
51466  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51467      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51468      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51469        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51470        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51471    fi
51472  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51473    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51474    # We have previously set HAS_GNU_HASH if this is the case
51475    if test -n "$HAS_GNU_HASH"; then
51476      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51477      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51478      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51479    fi
51480      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51481        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51482    fi
51483    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51484      # And since we now know that the linker is gnu, then add -z defs, to forbid
51485      # undefined symbols in object files.
51486      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51487      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51488      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51489      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51490      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51491      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51492        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51493      fi
51494      case $DEBUG_LEVEL in
51495        release )
51496          # tell linker to optimize libraries.
51497          # Should this be supplied to the OSS linker as well?
51498          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51499          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51500          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51501          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51502            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51503          fi
51504          ;;
51505        slowdebug )
51506          # Hotspot always let the linker optimize
51507          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51508          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51509            # do relocations at load
51510            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51511            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51512            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51513          fi
51514          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51515            # mark relocations read only
51516            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51517            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51518            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51519          fi
51520          ;;
51521        fastdebug )
51522          # Hotspot always let the linker optimize
51523          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51524          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51525            # mark relocations read only
51526            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51527            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51528            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51529          fi
51530          ;;
51531        * )
51532          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51533          ;;
51534        esac
51535    fi
51536  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51537    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51538    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51539    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51540    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51541    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51542    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51543      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51544    fi
51545  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51546    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51547    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51548    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51549  fi
51550
51551  # Customize LDFLAGS for executables
51552
51553  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51554
51555  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51556    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51557      LDFLAGS_STACK_SIZE=1048576
51558    else
51559      LDFLAGS_STACK_SIZE=327680
51560    fi
51561    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51562  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51563    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51564  fi
51565
51566  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51567
51568  # Customize LDFLAGS for libs
51569  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51570
51571  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51572  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51573    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51574        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51575    OPENJDK_BUILD_JDKLIB_LIBS=""
51576  else
51577    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51578        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51579
51580    if test "xBUILD" = "xTARGET"; then
51581      # On some platforms (mac) the linker warns about non existing -L dirs.
51582      # For any of the variants server, client or minimal, the dir matches the
51583      # variant name. The "main" variant should be used for linking. For the
51584      # rest, the dir is just server.
51585      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51586          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51587        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51588            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51589      else
51590        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51591            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51592      fi
51593    elif test "xBUILD" = "xBUILD"; then
51594      # When building a buildjdk, it's always only the server variant
51595      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51596          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51597    fi
51598
51599    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51600    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51601      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51602    fi
51603
51604  fi
51605
51606OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51607
51608  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51609  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51610    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51611  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51612    # FIXME: This hard-coded path is not really proper.
51613    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51614      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51615    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51616      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51617    fi
51618    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51619        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51620  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51621    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51622  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51623    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51624  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51625    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51626  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51627    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51628        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51629        wsock32.lib winmm.lib version.lib psapi.lib"
51630    fi
51631
51632  # Set OPENJDK_BUILD_JVM_ASFLAGS
51633  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51634    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51635      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51636    fi
51637  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51638    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51639  fi
51640
51641  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657  # Tests are only ever compiled for TARGET
51658  # Flags for compiling test libraries
51659  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51660  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51661
51662  # Flags for compiling test executables
51663  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51664  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51665
51666
51667
51668
51669
51670
51671  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51672  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51673
51674
51675
51676
51677
51678
51679  # Check that the compiler supports -mX (or -qX on AIX) flags
51680  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728    # Execute function body
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777    # Execute function body
51778
51779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51780$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51781  supports=yes
51782
51783  saved_cflags="$CFLAGS"
51784  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51785  ac_ext=c
51786ac_cpp='$CPP $CPPFLAGS'
51787ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51788ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51789ac_compiler_gnu=$ac_cv_c_compiler_gnu
51790
51791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51792/* end confdefs.h.  */
51793int i;
51794_ACEOF
51795if ac_fn_c_try_compile "$LINENO"; then :
51796
51797else
51798  supports=no
51799fi
51800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51801  ac_ext=cpp
51802ac_cpp='$CXXCPP $CPPFLAGS'
51803ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51804ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51805ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51806
51807  CFLAGS="$saved_cflags"
51808
51809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51810$as_echo "$supports" >&6; }
51811  if test "x$supports" = "xyes" ; then
51812    :
51813    C_COMP_SUPPORTS="yes"
51814  else
51815    :
51816    C_COMP_SUPPORTS="no"
51817  fi
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
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877    # Execute function body
51878
51879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51880$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51881  supports=yes
51882
51883  saved_cxxflags="$CXXFLAGS"
51884  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51885  ac_ext=cpp
51886ac_cpp='$CXXCPP $CPPFLAGS'
51887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51890
51891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51892/* end confdefs.h.  */
51893int i;
51894_ACEOF
51895if ac_fn_cxx_try_compile "$LINENO"; then :
51896
51897else
51898  supports=no
51899fi
51900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51901  ac_ext=cpp
51902ac_cpp='$CXXCPP $CPPFLAGS'
51903ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51904ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51905ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51906
51907  CXXFLAGS="$saved_cxxflags"
51908
51909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51910$as_echo "$supports" >&6; }
51911  if test "x$supports" = "xyes" ; then
51912    :
51913    CXX_COMP_SUPPORTS="yes"
51914  else
51915    :
51916    CXX_COMP_SUPPORTS="no"
51917  fi
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51932$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51933  supports=no
51934  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51935
51936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51937$as_echo "$supports" >&6; }
51938  if test "x$supports" = "xyes" ; then
51939    :
51940    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51941  else
51942    :
51943    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51944  fi
51945
51946
51947
51948
51949
51950
51951
51952
51953  # Check whether --enable-warnings-as-errors was given.
51954if test "${enable_warnings_as_errors+set}" = set; then :
51955  enableval=$enable_warnings_as_errors;
51956fi
51957
51958
51959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51960$as_echo_n "checking if native warnings are errors... " >&6; }
51961  if test "x$enable_warnings_as_errors" = "xyes"; then
51962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51963$as_echo "yes (explicitly set)" >&6; }
51964    WARNINGS_AS_ERRORS=true
51965  elif test "x$enable_warnings_as_errors" = "xno"; then
51966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51967$as_echo "no" >&6; }
51968    WARNINGS_AS_ERRORS=false
51969  elif test "x$enable_warnings_as_errors" = "x"; then
51970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51971$as_echo "yes (default)" >&6; }
51972    WARNINGS_AS_ERRORS=true
51973  else
51974    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51975  fi
51976
51977
51978
51979  case "${TOOLCHAIN_TYPE}" in
51980    microsoft)
51981      DISABLE_WARNING_PREFIX="-wd"
51982      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51983      ;;
51984    solstudio)
51985      DISABLE_WARNING_PREFIX="-erroff="
51986      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51987      ;;
51988    gcc)
51989      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037    # Execute function body
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086    # Execute function body
52087
52088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52089$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52090  supports=yes
52091
52092  saved_cflags="$CFLAGS"
52093  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52094  ac_ext=c
52095ac_cpp='$CPP $CPPFLAGS'
52096ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52097ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52098ac_compiler_gnu=$ac_cv_c_compiler_gnu
52099
52100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52101/* end confdefs.h.  */
52102int i;
52103_ACEOF
52104if ac_fn_c_try_compile "$LINENO"; then :
52105
52106else
52107  supports=no
52108fi
52109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52110  ac_ext=cpp
52111ac_cpp='$CXXCPP $CPPFLAGS'
52112ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52113ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52114ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52115
52116  CFLAGS="$saved_cflags"
52117
52118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52119$as_echo "$supports" >&6; }
52120  if test "x$supports" = "xyes" ; then
52121    :
52122    C_COMP_SUPPORTS="yes"
52123  else
52124    :
52125    C_COMP_SUPPORTS="no"
52126  fi
52127
52128
52129
52130
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
52180
52181
52182
52183
52184
52185
52186    # Execute function body
52187
52188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52189$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52190  supports=yes
52191
52192  saved_cxxflags="$CXXFLAGS"
52193  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52194  ac_ext=cpp
52195ac_cpp='$CXXCPP $CPPFLAGS'
52196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52199
52200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52201/* end confdefs.h.  */
52202int i;
52203_ACEOF
52204if ac_fn_cxx_try_compile "$LINENO"; then :
52205
52206else
52207  supports=no
52208fi
52209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52210  ac_ext=cpp
52211ac_cpp='$CXXCPP $CPPFLAGS'
52212ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52213ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52214ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52215
52216  CXXFLAGS="$saved_cxxflags"
52217
52218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52219$as_echo "$supports" >&6; }
52220  if test "x$supports" = "xyes" ; then
52221    :
52222    CXX_COMP_SUPPORTS="yes"
52223  else
52224    :
52225    CXX_COMP_SUPPORTS="no"
52226  fi
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52241$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52242  supports=no
52243  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52244
52245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52246$as_echo "$supports" >&6; }
52247  if test "x$supports" = "xyes" ; then
52248    :
52249    GCC_CAN_DISABLE_WARNINGS=true
52250  else
52251    :
52252    GCC_CAN_DISABLE_WARNINGS=false
52253
52254  fi
52255
52256
52257
52258
52259
52260
52261      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52262        DISABLE_WARNING_PREFIX="-Wno-"
52263      else
52264        DISABLE_WARNING_PREFIX=
52265      fi
52266      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52267      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52268      # CFLAGS since any target specific flags will likely not work with the
52269      # build compiler
52270      CC_OLD="$CC"
52271      CXX_OLD="$CXX"
52272      CC="$BUILD_CC"
52273      CXX="$BUILD_CXX"
52274      CFLAGS_OLD="$CFLAGS"
52275      CFLAGS=""
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323    # Execute function body
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372    # Execute function body
52373
52374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52375$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52376  supports=yes
52377
52378  saved_cflags="$CFLAGS"
52379  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52380  ac_ext=c
52381ac_cpp='$CPP $CPPFLAGS'
52382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52384ac_compiler_gnu=$ac_cv_c_compiler_gnu
52385
52386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52387/* end confdefs.h.  */
52388int i;
52389_ACEOF
52390if ac_fn_c_try_compile "$LINENO"; then :
52391
52392else
52393  supports=no
52394fi
52395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52396  ac_ext=cpp
52397ac_cpp='$CXXCPP $CPPFLAGS'
52398ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52399ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52400ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52401
52402  CFLAGS="$saved_cflags"
52403
52404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52405$as_echo "$supports" >&6; }
52406  if test "x$supports" = "xyes" ; then
52407    :
52408    C_COMP_SUPPORTS="yes"
52409  else
52410    :
52411    C_COMP_SUPPORTS="no"
52412  fi
52413
52414
52415
52416
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
52466
52467
52468
52469
52470
52471
52472    # Execute function body
52473
52474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52475$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52476  supports=yes
52477
52478  saved_cxxflags="$CXXFLAGS"
52479  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52480  ac_ext=cpp
52481ac_cpp='$CXXCPP $CPPFLAGS'
52482ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52483ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52484ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52485
52486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52487/* end confdefs.h.  */
52488int i;
52489_ACEOF
52490if ac_fn_cxx_try_compile "$LINENO"; then :
52491
52492else
52493  supports=no
52494fi
52495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52496  ac_ext=cpp
52497ac_cpp='$CXXCPP $CPPFLAGS'
52498ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52499ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52500ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52501
52502  CXXFLAGS="$saved_cxxflags"
52503
52504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52505$as_echo "$supports" >&6; }
52506  if test "x$supports" = "xyes" ; then
52507    :
52508    CXX_COMP_SUPPORTS="yes"
52509  else
52510    :
52511    CXX_COMP_SUPPORTS="no"
52512  fi
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52527$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52528  supports=no
52529  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52530
52531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52532$as_echo "$supports" >&6; }
52533  if test "x$supports" = "xyes" ; then
52534    :
52535    BUILD_CC_CAN_DISABLE_WARNINGS=true
52536  else
52537    :
52538    BUILD_CC_CAN_DISABLE_WARNINGS=false
52539
52540  fi
52541
52542
52543
52544
52545
52546
52547      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52548        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52549      else
52550        BUILD_CC_DISABLE_WARNING_PREFIX=
52551      fi
52552      CC="$CC_OLD"
52553      CXX="$CXX_OLD"
52554      CFLAGS="$CFLAGS_OLD"
52555      ;;
52556    clang)
52557      DISABLE_WARNING_PREFIX="-Wno-"
52558      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52559      ;;
52560    xlc)
52561      DISABLE_WARNING_PREFIX="-qsuppress="
52562      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52563      ;;
52564  esac
52565
52566
52567
52568
52569
52570# Setup debug symbols (need objcopy from the toolchain for that)
52571
52572  #
52573  # NATIVE_DEBUG_SYMBOLS
52574  # This must be done after the toolchain is setup, since we're looking at objcopy.
52575  #
52576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52577$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52578
52579# Check whether --with-native-debug-symbols was given.
52580if test "${with_native_debug_symbols+set}" = set; then :
52581  withval=$with_native_debug_symbols;
52582        if test "x$OPENJDK_TARGET_OS" = xaix; then
52583          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52584            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52585          fi
52586        fi
52587
52588else
52589
52590        if test "x$OPENJDK_TARGET_OS" = xaix; then
52591          # AIX doesn't support 'zipped' so use 'internal' as default
52592          with_native_debug_symbols="internal"
52593        else
52594          if test "x$STATIC_BUILD" = xtrue; then
52595            with_native_debug_symbols="none"
52596          else
52597            with_native_debug_symbols="zipped"
52598          fi
52599        fi
52600
52601fi
52602
52603  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52605$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52606
52607  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52608
52609    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52610      if test "x$OBJCOPY" = x; then
52611        # enabling of enable-debug-symbols and can't find objcopy
52612        # this is an error
52613        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52614      fi
52615    fi
52616
52617    COMPILE_WITH_DEBUG_SYMBOLS=true
52618    COPY_DEBUG_SYMBOLS=true
52619    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52620  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52621    COMPILE_WITH_DEBUG_SYMBOLS=false
52622    COPY_DEBUG_SYMBOLS=false
52623    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52624  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52625    COMPILE_WITH_DEBUG_SYMBOLS=true
52626    COPY_DEBUG_SYMBOLS=false
52627    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52628  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52629
52630    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52631      if test "x$OBJCOPY" = x; then
52632        # enabling of enable-debug-symbols and can't find objcopy
52633        # this is an error
52634        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52635      fi
52636    fi
52637
52638    COMPILE_WITH_DEBUG_SYMBOLS=true
52639    COPY_DEBUG_SYMBOLS=true
52640    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52641  else
52642    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52643  fi
52644
52645  # --enable-debug-symbols is deprecated.
52646  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52647
52648  # Check whether --enable-debug-symbols was given.
52649if test "${enable_debug_symbols+set}" = set; then :
52650  enableval=$enable_debug_symbols;
52651fi
52652
52653  if test "x$enable_debug_symbols" != x; then
52654    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52655$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52656
52657    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52658      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52659$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52660    fi
52661
52662  fi
52663
52664
52665  # --enable-zip-debug-info is deprecated.
52666  # Please use --with-native-debug-symbols=zipped .
52667
52668  # Check whether --enable-zip-debug-info was given.
52669if test "${enable_zip_debug_info+set}" = set; then :
52670  enableval=$enable_zip_debug_info;
52671fi
52672
52673  if test "x$enable_zip_debug_info" != x; then
52674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52675$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52676
52677    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52678      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52679$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52680    fi
52681
52682  fi
52683
52684
52685
52686
52687
52688
52689
52690  # Check whether --enable-native-coverage was given.
52691if test "${enable_native_coverage+set}" = set; then :
52692  enableval=$enable_native_coverage;
52693fi
52694
52695  GCOV_ENABLED="false"
52696  if test "x$enable_native_coverage" = "xyes"; then
52697    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52699$as_echo_n "checking if native coverage is enabled... " >&6; }
52700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52701$as_echo "yes" >&6; }
52702      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52703      GCOV_LDFLAGS="-fprofile-arcs"
52704      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52705      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52706      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52707      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52708      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52709      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52710      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52711      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52712      GCOV_ENABLED="true"
52713    else
52714      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52715    fi
52716  elif test "x$enable_native_coverage" = "xno"; then
52717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52718$as_echo_n "checking if native coverage is enabled... " >&6; }
52719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52720$as_echo "no" >&6; }
52721  elif test "x$enable_native_coverage" != "x"; then
52722    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52723  fi
52724
52725
52726
52727
52728# Need toolchain to setup dtrace
52729
52730  # Test for dtrace dependencies
52731  # Check whether --enable-dtrace was given.
52732if test "${enable_dtrace+set}" = set; then :
52733  enableval=$enable_dtrace;
52734fi
52735
52736
52737  DTRACE_DEP_MISSING=false
52738
52739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52740$as_echo_n "checking for dtrace tool... " >&6; }
52741  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52743$as_echo "$DTRACE" >&6; }
52744  else
52745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52746$as_echo "not found, cannot build dtrace" >&6; }
52747    DTRACE_DEP_MISSING=true
52748  fi
52749
52750  for ac_header in sys/sdt.h
52751do :
52752  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52753if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52754  cat >>confdefs.h <<_ACEOF
52755#define HAVE_SYS_SDT_H 1
52756_ACEOF
52757 DTRACE_HEADERS_OK=yes
52758else
52759  DTRACE_HEADERS_OK=no
52760fi
52761
52762done
52763
52764  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52765    DTRACE_DEP_MISSING=true
52766  fi
52767
52768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52769$as_echo_n "checking if dtrace should be built... " >&6; }
52770  if test "x$enable_dtrace" = "xyes"; then
52771    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52773$as_echo "no, missing dependencies" >&6; }
52774
52775  # Print a helpful message on how to acquire the necessary build dependency.
52776  # dtrace is the help tag: freetype, cups, alsa etc
52777  MISSING_DEPENDENCY=dtrace
52778
52779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52780    cygwin_help $MISSING_DEPENDENCY
52781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52782    msys_help $MISSING_DEPENDENCY
52783  else
52784    PKGHANDLER_COMMAND=
52785
52786    case $PKGHANDLER in
52787      apt-get)
52788        apt_help     $MISSING_DEPENDENCY ;;
52789      yum)
52790        yum_help     $MISSING_DEPENDENCY ;;
52791      brew)
52792        brew_help    $MISSING_DEPENDENCY ;;
52793      port)
52794        port_help    $MISSING_DEPENDENCY ;;
52795      pkgutil)
52796        pkgutil_help $MISSING_DEPENDENCY ;;
52797      pkgadd)
52798        pkgadd_help  $MISSING_DEPENDENCY ;;
52799    esac
52800
52801    if test "x$PKGHANDLER_COMMAND" != x; then
52802      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52803    fi
52804  fi
52805
52806      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52807    else
52808      INCLUDE_DTRACE=true
52809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52810$as_echo "yes, forced" >&6; }
52811    fi
52812  elif test "x$enable_dtrace" = "xno"; then
52813    INCLUDE_DTRACE=false
52814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52815$as_echo "no, forced" >&6; }
52816  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52817    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52818      INCLUDE_DTRACE=false
52819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52820$as_echo "no, missing dependencies" >&6; }
52821    else
52822      INCLUDE_DTRACE=true
52823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52824$as_echo "yes, dependencies present" >&6; }
52825    fi
52826  else
52827    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52828  fi
52829
52830
52831  # Check whether --enable-aot was given.
52832if test "${enable_aot+set}" = set; then :
52833  enableval=$enable_aot;
52834fi
52835
52836
52837  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52838    ENABLE_AOT="true"
52839  elif test "x$enable_aot" = "xyes"; then
52840    ENABLE_AOT="true"
52841  elif test "x$enable_aot" = "xno"; then
52842    ENABLE_AOT="false"
52843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52844$as_echo_n "checking if aot should be enabled... " >&6; }
52845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52846$as_echo "no, forced" >&6; }
52847  else
52848    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52849  fi
52850
52851  if test "x$ENABLE_AOT" = "xtrue"; then
52852    # Only enable AOT on X64 platforms.
52853    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
52854      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52855        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
52856          ENABLE_AOT="true"
52857        else
52858          ENABLE_AOT="false"
52859          if test "x$enable_aot" = "xyes"; then
52860            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52861          fi
52862        fi
52863      else
52864        ENABLE_AOT="false"
52865        if test "x$enable_aot" = "xyes"; then
52866          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52867        fi
52868      fi
52869    else
52870      ENABLE_AOT="false"
52871      if test "x$enable_aot" = "xyes"; then
52872        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52873      fi
52874    fi
52875  fi
52876
52877
52878
52879
52880  # Check whether --enable-hotspot-gtest was given.
52881if test "${enable_hotspot_gtest+set}" = set; then :
52882  enableval=$enable_hotspot_gtest;
52883fi
52884
52885
52886  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52887    GTEST_DIR_EXISTS="true"
52888  else
52889    GTEST_DIR_EXISTS="false"
52890  fi
52891
52892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52893$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52894  if test "x$enable_hotspot_gtest" = "xyes"; then
52895    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52897$as_echo "yes, forced" >&6; }
52898      BUILD_GTEST="true"
52899    else
52900      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52901    fi
52902  elif test "x$enable_hotspot_gtest" = "xno"; then
52903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52904$as_echo "no, forced" >&6; }
52905    BUILD_GTEST="false"
52906  elif test "x$enable_hotspot_gtest" = "x"; then
52907    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52909$as_echo "yes" >&6; }
52910      BUILD_GTEST="true"
52911    else
52912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52913$as_echo "no" >&6; }
52914      BUILD_GTEST="false"
52915    fi
52916  else
52917    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52918  fi
52919
52920
52921
52922
52923###############################################################################
52924#
52925# Check dependencies for external and internal libraries.
52926#
52927###############################################################################
52928
52929# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52930
52931  # When using cygwin or msys, we need a wrapper binary that renames
52932  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52933  # @files and rewrites these too! This wrapper binary is
52934  # called fixpath.
52935  FIXPATH=
52936  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52938$as_echo_n "checking if fixpath can be created... " >&6; }
52939    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52940    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52941    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52942    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52943      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52944      FIXPATH="$FIXPATH_BIN -c"
52945    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52946      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52947      # @ was chosen as separator to minimize risk of other tools messing around with it
52948      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52949          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52950      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52951      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52952    fi
52953    FIXPATH_SRC_W="$FIXPATH_SRC"
52954    FIXPATH_BIN_W="$FIXPATH_BIN"
52955
52956  unix_path="$FIXPATH_SRC_W"
52957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52958    windows_path=`$CYGPATH -m "$unix_path"`
52959    FIXPATH_SRC_W="$windows_path"
52960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52961    windows_path=`cmd //c echo $unix_path`
52962    FIXPATH_SRC_W="$windows_path"
52963  fi
52964
52965
52966  unix_path="$FIXPATH_BIN_W"
52967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52968    windows_path=`$CYGPATH -m "$unix_path"`
52969    FIXPATH_BIN_W="$windows_path"
52970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52971    windows_path=`cmd //c echo $unix_path`
52972    FIXPATH_BIN_W="$windows_path"
52973  fi
52974
52975    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52976    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52977    cd $FIXPATH_DIR
52978    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52979    cd $CURDIR
52980
52981    if test ! -x $FIXPATH_BIN; then
52982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52983$as_echo "no" >&6; }
52984      cat $FIXPATH_DIR/fixpath1.log
52985      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52986    fi
52987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52988$as_echo "yes" >&6; }
52989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52990$as_echo_n "checking if fixpath.exe works... " >&6; }
52991    cd $FIXPATH_DIR
52992    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52993        > $FIXPATH_DIR/fixpath2.log 2>&1
52994    cd $CURDIR
52995    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52997$as_echo "no" >&6; }
52998      cat $FIXPATH_DIR/fixpath2.log
52999      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53000    fi
53001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53002$as_echo "yes" >&6; }
53003
53004    FIXPATH_DETACH_FLAG="--detach"
53005  fi
53006
53007
53008
53009
53010
53011
53012  # Check if X11 is needed
53013  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53014    # No X11 support on windows or macosx
53015    NEEDS_LIB_X11=false
53016  else
53017    # All other instances need X11, even if building headless only, libawt still
53018    # needs X11 headers.
53019    NEEDS_LIB_X11=true
53020  fi
53021
53022  # Check if cups is needed
53023  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53024    # Windows have a separate print system
53025    NEEDS_LIB_CUPS=false
53026  else
53027    NEEDS_LIB_CUPS=true
53028  fi
53029
53030  # A custom hook may have set this already
53031  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53032    NEEDS_LIB_FREETYPE=true
53033  fi
53034
53035  # Check if alsa is needed
53036  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53037    NEEDS_LIB_ALSA=true
53038  else
53039    NEEDS_LIB_ALSA=false
53040  fi
53041
53042  # Check if ffi is needed
53043  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53044    NEEDS_LIB_FFI=true
53045  else
53046    NEEDS_LIB_FFI=false
53047  fi
53048
53049
53050  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53051  # dynamic build is configured on command line.
53052
53053# Check whether --with-stdc++lib was given.
53054if test "${with_stdc__lib+set}" = set; then :
53055  withval=$with_stdc__lib;
53056        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53057                && test "x$with_stdc__lib" != xdefault; then
53058          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53059        fi
53060
53061else
53062  with_stdc__lib=default
53063
53064fi
53065
53066
53067  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53068    # Test if stdc++ can be linked statically.
53069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53070$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53071    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53072    ac_ext=cpp
53073ac_cpp='$CXXCPP $CPPFLAGS'
53074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53077
53078    OLD_LIBS="$LIBS"
53079    LIBS="$STATIC_STDCXX_FLAGS"
53080    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53081/* end confdefs.h.  */
53082
53083int
53084main ()
53085{
53086return 0;
53087  ;
53088  return 0;
53089}
53090_ACEOF
53091if ac_fn_cxx_try_link "$LINENO"; then :
53092  has_static_libstdcxx=yes
53093else
53094  has_static_libstdcxx=no
53095fi
53096rm -f core conftest.err conftest.$ac_objext \
53097    conftest$ac_exeext conftest.$ac_ext
53098    LIBS="$OLD_LIBS"
53099    ac_ext=cpp
53100ac_cpp='$CXXCPP $CPPFLAGS'
53101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53104
53105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53106$as_echo "$has_static_libstdcxx" >&6; }
53107
53108    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53109      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53110    fi
53111
53112    # If dynamic was requested, it's available since it would fail above otherwise.
53113    # If dynamic wasn't requested, go with static unless it isn't available.
53114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53115$as_echo_n "checking how to link with libstdc++... " >&6; }
53116    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53117        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53119$as_echo "dynamic" >&6; }
53120    else
53121      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53122      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53123      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53124      # just use the same setting as for the TARGET toolchain.
53125      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53127$as_echo "static" >&6; }
53128    fi
53129  fi
53130
53131  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53132  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53133    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53134  fi
53135
53136
53137
53138  # Setup Windows runtime dlls
53139  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53140
53141
53142# Check whether --with-msvcr-dll was given.
53143if test "${with_msvcr_dll+set}" = set; then :
53144  withval=$with_msvcr_dll;
53145fi
53146
53147
53148  if test "x$with_msvcr_dll" != x; then
53149    # If given explicitly by user, do not probe. If not present, fail directly.
53150
53151  DLL_NAME="$MSVCR_NAME"
53152  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53153  METHOD="--with-msvcr-dll"
53154  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53155    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53156$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53157
53158    # Need to check if the found msvcr is correct architecture
53159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53160$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53161    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53163      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53164      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53165      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53166        CORRECT_MSVCR_ARCH="PE32 executable"
53167      else
53168        CORRECT_MSVCR_ARCH="PE32+ executable"
53169      fi
53170    else
53171      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53172        CORRECT_MSVCR_ARCH=386
53173      else
53174        CORRECT_MSVCR_ARCH=x86-64
53175      fi
53176    fi
53177    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53179$as_echo "ok" >&6; }
53180      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53181
53182  # Only process if variable expands to non-empty
53183
53184  if test "x$MSVC_DLL" != x; then
53185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53186
53187  # Input might be given as Windows format, start by converting to
53188  # unix format.
53189  path="$MSVC_DLL"
53190  new_path=`$CYGPATH -u "$path"`
53191
53192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53195  # "foo.exe" is OK but "foo" is an error.
53196  #
53197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53198  # It is also a way to make sure we got the proper file name for the real test later on.
53199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53200  if test "x$test_shortpath" = x; then
53201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53202$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53203    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53204  fi
53205
53206  # Call helper function which possibly converts this using DOS-style short mode.
53207  # If so, the updated path is stored in $new_path.
53208
53209  input_path="$new_path"
53210  # Check if we need to convert this using DOS-style short mode. If the path
53211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53212  # take no chances and rewrite it.
53213  # Note: m4 eats our [], so we need to use [ and ] instead.
53214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53215  if test "x$has_forbidden_chars" != x; then
53216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53220      # Going to short mode and back again did indeed matter. Since short mode is
53221      # case insensitive, let's make it lowercase to improve readability.
53222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53223      # Now convert it back to Unix-style (cygpath)
53224      input_path=`$CYGPATH -u "$shortmode_path"`
53225      new_path="$input_path"
53226    fi
53227  fi
53228
53229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53230  if test "x$test_cygdrive_prefix" = x; then
53231    # As a simple fix, exclude /usr/bin since it's not a real path.
53232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53234      # a path prefixed by /cygdrive for fixpath to work.
53235      new_path="$CYGWIN_ROOT_PATH$input_path"
53236    fi
53237  fi
53238
53239
53240  if test "x$path" != "x$new_path"; then
53241    MSVC_DLL="$new_path"
53242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53243$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53244  fi
53245
53246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53247
53248  path="$MSVC_DLL"
53249  has_colon=`$ECHO $path | $GREP ^.:`
53250  new_path="$path"
53251  if test "x$has_colon" = x; then
53252    # Not in mixed or Windows style, start by that.
53253    new_path=`cmd //c echo $path`
53254  fi
53255
53256
53257  input_path="$new_path"
53258  # Check if we need to convert this using DOS-style short mode. If the path
53259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53260  # take no chances and rewrite it.
53261  # Note: m4 eats our [], so we need to use [ and ] instead.
53262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53263  if test "x$has_forbidden_chars" != x; then
53264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53266  fi
53267
53268
53269  windows_path="$new_path"
53270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53271    unix_path=`$CYGPATH -u "$windows_path"`
53272    new_path="$unix_path"
53273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53275    new_path="$unix_path"
53276  fi
53277
53278  if test "x$path" != "x$new_path"; then
53279    MSVC_DLL="$new_path"
53280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53281$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53282  fi
53283
53284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53286
53287    else
53288      # We're on a unix platform. Hooray! :)
53289      path="$MSVC_DLL"
53290      has_space=`$ECHO "$path" | $GREP " "`
53291      if test "x$has_space" != x; then
53292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53293$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53295      fi
53296
53297      # Use eval to expand a potential ~
53298      eval path="$path"
53299      if test ! -f "$path" && test ! -d "$path"; then
53300        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53301      fi
53302
53303      if test -d "$path"; then
53304        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53305      else
53306        dir="`$DIRNAME "$path"`"
53307        base="`$BASENAME "$path"`"
53308        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53309      fi
53310    fi
53311  fi
53312
53313      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53314$as_echo_n "checking for $DLL_NAME... " >&6; }
53315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53316$as_echo "$MSVC_DLL" >&6; }
53317    else
53318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53319$as_echo "incorrect, ignoring" >&6; }
53320      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53321$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53322    fi
53323  fi
53324
53325    if test "x$MSVC_DLL" = x; then
53326      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53327    fi
53328    MSVCR_DLL="$MSVC_DLL"
53329  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53330
53331  DLL_NAME="$MSVCR_NAME"
53332  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53333  METHOD="devkit"
53334  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53335    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53336$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53337
53338    # Need to check if the found msvcr is correct architecture
53339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53340$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53341    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53343      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53344      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53345      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53346        CORRECT_MSVCR_ARCH="PE32 executable"
53347      else
53348        CORRECT_MSVCR_ARCH="PE32+ executable"
53349      fi
53350    else
53351      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53352        CORRECT_MSVCR_ARCH=386
53353      else
53354        CORRECT_MSVCR_ARCH=x86-64
53355      fi
53356    fi
53357    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53359$as_echo "ok" >&6; }
53360      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53361
53362  # Only process if variable expands to non-empty
53363
53364  if test "x$MSVC_DLL" != x; then
53365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53366
53367  # Input might be given as Windows format, start by converting to
53368  # unix format.
53369  path="$MSVC_DLL"
53370  new_path=`$CYGPATH -u "$path"`
53371
53372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53375  # "foo.exe" is OK but "foo" is an error.
53376  #
53377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53378  # It is also a way to make sure we got the proper file name for the real test later on.
53379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53380  if test "x$test_shortpath" = x; then
53381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53382$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53383    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53384  fi
53385
53386  # Call helper function which possibly converts this using DOS-style short mode.
53387  # If so, the updated path is stored in $new_path.
53388
53389  input_path="$new_path"
53390  # Check if we need to convert this using DOS-style short mode. If the path
53391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53392  # take no chances and rewrite it.
53393  # Note: m4 eats our [], so we need to use [ and ] instead.
53394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53395  if test "x$has_forbidden_chars" != x; then
53396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53400      # Going to short mode and back again did indeed matter. Since short mode is
53401      # case insensitive, let's make it lowercase to improve readability.
53402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53403      # Now convert it back to Unix-style (cygpath)
53404      input_path=`$CYGPATH -u "$shortmode_path"`
53405      new_path="$input_path"
53406    fi
53407  fi
53408
53409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53410  if test "x$test_cygdrive_prefix" = x; then
53411    # As a simple fix, exclude /usr/bin since it's not a real path.
53412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53414      # a path prefixed by /cygdrive for fixpath to work.
53415      new_path="$CYGWIN_ROOT_PATH$input_path"
53416    fi
53417  fi
53418
53419
53420  if test "x$path" != "x$new_path"; then
53421    MSVC_DLL="$new_path"
53422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53423$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53424  fi
53425
53426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53427
53428  path="$MSVC_DLL"
53429  has_colon=`$ECHO $path | $GREP ^.:`
53430  new_path="$path"
53431  if test "x$has_colon" = x; then
53432    # Not in mixed or Windows style, start by that.
53433    new_path=`cmd //c echo $path`
53434  fi
53435
53436
53437  input_path="$new_path"
53438  # Check if we need to convert this using DOS-style short mode. If the path
53439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53440  # take no chances and rewrite it.
53441  # Note: m4 eats our [], so we need to use [ and ] instead.
53442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53443  if test "x$has_forbidden_chars" != x; then
53444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53446  fi
53447
53448
53449  windows_path="$new_path"
53450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53451    unix_path=`$CYGPATH -u "$windows_path"`
53452    new_path="$unix_path"
53453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53455    new_path="$unix_path"
53456  fi
53457
53458  if test "x$path" != "x$new_path"; then
53459    MSVC_DLL="$new_path"
53460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53461$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53462  fi
53463
53464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53466
53467    else
53468      # We're on a unix platform. Hooray! :)
53469      path="$MSVC_DLL"
53470      has_space=`$ECHO "$path" | $GREP " "`
53471      if test "x$has_space" != x; then
53472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53473$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53475      fi
53476
53477      # Use eval to expand a potential ~
53478      eval path="$path"
53479      if test ! -f "$path" && test ! -d "$path"; then
53480        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53481      fi
53482
53483      if test -d "$path"; then
53484        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53485      else
53486        dir="`$DIRNAME "$path"`"
53487        base="`$BASENAME "$path"`"
53488        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53489      fi
53490    fi
53491  fi
53492
53493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53494$as_echo_n "checking for $DLL_NAME... " >&6; }
53495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53496$as_echo "$MSVC_DLL" >&6; }
53497    else
53498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53499$as_echo "incorrect, ignoring" >&6; }
53500      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53501$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53502    fi
53503  fi
53504
53505    if test "x$MSVC_DLL" = x; then
53506      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53507    fi
53508    MSVCR_DLL="$MSVC_DLL"
53509  else
53510
53511  DLL_NAME="${MSVCR_NAME}"
53512  MSVC_DLL=
53513
53514  if test "x$MSVC_DLL" = x; then
53515    # Probe: Using well-known location from Visual Studio 10.0
53516    if test "x$VCINSTALLDIR" != x; then
53517      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53518
53519  windows_path="$CYGWIN_VC_INSTALL_DIR"
53520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53521    unix_path=`$CYGPATH -u "$windows_path"`
53522    CYGWIN_VC_INSTALL_DIR="$unix_path"
53523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53525    CYGWIN_VC_INSTALL_DIR="$unix_path"
53526  fi
53527
53528      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53529        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53530      else
53531        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53532      fi
53533      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53534
53535  DLL_NAME="$DLL_NAME"
53536  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53537  METHOD="well-known location in VCINSTALLDIR"
53538  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53540$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53541
53542    # Need to check if the found msvcr is correct architecture
53543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53544$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53545    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53547      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53548      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53549      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53550        CORRECT_MSVCR_ARCH="PE32 executable"
53551      else
53552        CORRECT_MSVCR_ARCH="PE32+ executable"
53553      fi
53554    else
53555      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53556        CORRECT_MSVCR_ARCH=386
53557      else
53558        CORRECT_MSVCR_ARCH=x86-64
53559      fi
53560    fi
53561    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53563$as_echo "ok" >&6; }
53564      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53565
53566  # Only process if variable expands to non-empty
53567
53568  if test "x$MSVC_DLL" != x; then
53569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53570
53571  # Input might be given as Windows format, start by converting to
53572  # unix format.
53573  path="$MSVC_DLL"
53574  new_path=`$CYGPATH -u "$path"`
53575
53576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53579  # "foo.exe" is OK but "foo" is an error.
53580  #
53581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53582  # It is also a way to make sure we got the proper file name for the real test later on.
53583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53584  if test "x$test_shortpath" = x; then
53585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53586$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53587    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53588  fi
53589
53590  # Call helper function which possibly converts this using DOS-style short mode.
53591  # If so, the updated path is stored in $new_path.
53592
53593  input_path="$new_path"
53594  # Check if we need to convert this using DOS-style short mode. If the path
53595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53596  # take no chances and rewrite it.
53597  # Note: m4 eats our [], so we need to use [ and ] instead.
53598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53599  if test "x$has_forbidden_chars" != x; then
53600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53604      # Going to short mode and back again did indeed matter. Since short mode is
53605      # case insensitive, let's make it lowercase to improve readability.
53606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53607      # Now convert it back to Unix-style (cygpath)
53608      input_path=`$CYGPATH -u "$shortmode_path"`
53609      new_path="$input_path"
53610    fi
53611  fi
53612
53613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53614  if test "x$test_cygdrive_prefix" = x; then
53615    # As a simple fix, exclude /usr/bin since it's not a real path.
53616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53618      # a path prefixed by /cygdrive for fixpath to work.
53619      new_path="$CYGWIN_ROOT_PATH$input_path"
53620    fi
53621  fi
53622
53623
53624  if test "x$path" != "x$new_path"; then
53625    MSVC_DLL="$new_path"
53626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53627$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53628  fi
53629
53630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53631
53632  path="$MSVC_DLL"
53633  has_colon=`$ECHO $path | $GREP ^.:`
53634  new_path="$path"
53635  if test "x$has_colon" = x; then
53636    # Not in mixed or Windows style, start by that.
53637    new_path=`cmd //c echo $path`
53638  fi
53639
53640
53641  input_path="$new_path"
53642  # Check if we need to convert this using DOS-style short mode. If the path
53643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53644  # take no chances and rewrite it.
53645  # Note: m4 eats our [], so we need to use [ and ] instead.
53646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53647  if test "x$has_forbidden_chars" != x; then
53648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53650  fi
53651
53652
53653  windows_path="$new_path"
53654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53655    unix_path=`$CYGPATH -u "$windows_path"`
53656    new_path="$unix_path"
53657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53659    new_path="$unix_path"
53660  fi
53661
53662  if test "x$path" != "x$new_path"; then
53663    MSVC_DLL="$new_path"
53664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53666  fi
53667
53668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53670
53671    else
53672      # We're on a unix platform. Hooray! :)
53673      path="$MSVC_DLL"
53674      has_space=`$ECHO "$path" | $GREP " "`
53675      if test "x$has_space" != x; then
53676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53677$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53679      fi
53680
53681      # Use eval to expand a potential ~
53682      eval path="$path"
53683      if test ! -f "$path" && test ! -d "$path"; then
53684        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53685      fi
53686
53687      if test -d "$path"; then
53688        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53689      else
53690        dir="`$DIRNAME "$path"`"
53691        base="`$BASENAME "$path"`"
53692        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53693      fi
53694    fi
53695  fi
53696
53697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53698$as_echo_n "checking for $DLL_NAME... " >&6; }
53699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53700$as_echo "$MSVC_DLL" >&6; }
53701    else
53702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53703$as_echo "incorrect, ignoring" >&6; }
53704      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53705$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53706    fi
53707  fi
53708
53709    fi
53710  fi
53711
53712  if test "x$MSVC_DLL" = x; then
53713    # Probe: Check in the Boot JDK directory.
53714    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53715
53716  DLL_NAME="$DLL_NAME"
53717  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53718  METHOD="well-known location in Boot JDK"
53719  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53720    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53721$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53722
53723    # Need to check if the found msvcr is correct architecture
53724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53725$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53726    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53728      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53729      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53730      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53731        CORRECT_MSVCR_ARCH="PE32 executable"
53732      else
53733        CORRECT_MSVCR_ARCH="PE32+ executable"
53734      fi
53735    else
53736      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53737        CORRECT_MSVCR_ARCH=386
53738      else
53739        CORRECT_MSVCR_ARCH=x86-64
53740      fi
53741    fi
53742    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53744$as_echo "ok" >&6; }
53745      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53746
53747  # Only process if variable expands to non-empty
53748
53749  if test "x$MSVC_DLL" != x; then
53750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53751
53752  # Input might be given as Windows format, start by converting to
53753  # unix format.
53754  path="$MSVC_DLL"
53755  new_path=`$CYGPATH -u "$path"`
53756
53757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53760  # "foo.exe" is OK but "foo" is an error.
53761  #
53762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53763  # It is also a way to make sure we got the proper file name for the real test later on.
53764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53765  if test "x$test_shortpath" = x; then
53766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53767$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53768    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53769  fi
53770
53771  # Call helper function which possibly converts this using DOS-style short mode.
53772  # If so, the updated path is stored in $new_path.
53773
53774  input_path="$new_path"
53775  # Check if we need to convert this using DOS-style short mode. If the path
53776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53777  # take no chances and rewrite it.
53778  # Note: m4 eats our [], so we need to use [ and ] instead.
53779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53780  if test "x$has_forbidden_chars" != x; then
53781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53785      # Going to short mode and back again did indeed matter. Since short mode is
53786      # case insensitive, let's make it lowercase to improve readability.
53787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53788      # Now convert it back to Unix-style (cygpath)
53789      input_path=`$CYGPATH -u "$shortmode_path"`
53790      new_path="$input_path"
53791    fi
53792  fi
53793
53794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53795  if test "x$test_cygdrive_prefix" = x; then
53796    # As a simple fix, exclude /usr/bin since it's not a real path.
53797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53799      # a path prefixed by /cygdrive for fixpath to work.
53800      new_path="$CYGWIN_ROOT_PATH$input_path"
53801    fi
53802  fi
53803
53804
53805  if test "x$path" != "x$new_path"; then
53806    MSVC_DLL="$new_path"
53807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53808$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53809  fi
53810
53811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53812
53813  path="$MSVC_DLL"
53814  has_colon=`$ECHO $path | $GREP ^.:`
53815  new_path="$path"
53816  if test "x$has_colon" = x; then
53817    # Not in mixed or Windows style, start by that.
53818    new_path=`cmd //c echo $path`
53819  fi
53820
53821
53822  input_path="$new_path"
53823  # Check if we need to convert this using DOS-style short mode. If the path
53824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53825  # take no chances and rewrite it.
53826  # Note: m4 eats our [], so we need to use [ and ] instead.
53827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53828  if test "x$has_forbidden_chars" != x; then
53829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53831  fi
53832
53833
53834  windows_path="$new_path"
53835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53836    unix_path=`$CYGPATH -u "$windows_path"`
53837    new_path="$unix_path"
53838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53840    new_path="$unix_path"
53841  fi
53842
53843  if test "x$path" != "x$new_path"; then
53844    MSVC_DLL="$new_path"
53845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53847  fi
53848
53849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53851
53852    else
53853      # We're on a unix platform. Hooray! :)
53854      path="$MSVC_DLL"
53855      has_space=`$ECHO "$path" | $GREP " "`
53856      if test "x$has_space" != x; then
53857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53858$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53860      fi
53861
53862      # Use eval to expand a potential ~
53863      eval path="$path"
53864      if test ! -f "$path" && test ! -d "$path"; then
53865        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53866      fi
53867
53868      if test -d "$path"; then
53869        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53870      else
53871        dir="`$DIRNAME "$path"`"
53872        base="`$BASENAME "$path"`"
53873        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53874      fi
53875    fi
53876  fi
53877
53878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53879$as_echo_n "checking for $DLL_NAME... " >&6; }
53880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53881$as_echo "$MSVC_DLL" >&6; }
53882    else
53883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53884$as_echo "incorrect, ignoring" >&6; }
53885      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53886$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53887    fi
53888  fi
53889
53890  fi
53891
53892  if test "x$MSVC_DLL" = x; then
53893    # Probe: Look in the Windows system32 directory
53894    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53895
53896  windows_path="$CYGWIN_SYSTEMROOT"
53897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53898    unix_path=`$CYGPATH -u "$windows_path"`
53899    CYGWIN_SYSTEMROOT="$unix_path"
53900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53902    CYGWIN_SYSTEMROOT="$unix_path"
53903  fi
53904
53905    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53906
53907  DLL_NAME="$DLL_NAME"
53908  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53909  METHOD="well-known location in SYSTEMROOT"
53910  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53911    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53912$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53913
53914    # Need to check if the found msvcr is correct architecture
53915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53916$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53917    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53919      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53920      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53921      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53922        CORRECT_MSVCR_ARCH="PE32 executable"
53923      else
53924        CORRECT_MSVCR_ARCH="PE32+ executable"
53925      fi
53926    else
53927      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53928        CORRECT_MSVCR_ARCH=386
53929      else
53930        CORRECT_MSVCR_ARCH=x86-64
53931      fi
53932    fi
53933    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53935$as_echo "ok" >&6; }
53936      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53937
53938  # Only process if variable expands to non-empty
53939
53940  if test "x$MSVC_DLL" != x; then
53941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53942
53943  # Input might be given as Windows format, start by converting to
53944  # unix format.
53945  path="$MSVC_DLL"
53946  new_path=`$CYGPATH -u "$path"`
53947
53948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53951  # "foo.exe" is OK but "foo" is an error.
53952  #
53953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53954  # It is also a way to make sure we got the proper file name for the real test later on.
53955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53956  if test "x$test_shortpath" = x; then
53957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53958$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53959    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53960  fi
53961
53962  # Call helper function which possibly converts this using DOS-style short mode.
53963  # If so, the updated path is stored in $new_path.
53964
53965  input_path="$new_path"
53966  # Check if we need to convert this using DOS-style short mode. If the path
53967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53968  # take no chances and rewrite it.
53969  # Note: m4 eats our [], so we need to use [ and ] instead.
53970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53971  if test "x$has_forbidden_chars" != x; then
53972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53976      # Going to short mode and back again did indeed matter. Since short mode is
53977      # case insensitive, let's make it lowercase to improve readability.
53978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53979      # Now convert it back to Unix-style (cygpath)
53980      input_path=`$CYGPATH -u "$shortmode_path"`
53981      new_path="$input_path"
53982    fi
53983  fi
53984
53985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53986  if test "x$test_cygdrive_prefix" = x; then
53987    # As a simple fix, exclude /usr/bin since it's not a real path.
53988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53990      # a path prefixed by /cygdrive for fixpath to work.
53991      new_path="$CYGWIN_ROOT_PATH$input_path"
53992    fi
53993  fi
53994
53995
53996  if test "x$path" != "x$new_path"; then
53997    MSVC_DLL="$new_path"
53998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53999$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54000  fi
54001
54002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54003
54004  path="$MSVC_DLL"
54005  has_colon=`$ECHO $path | $GREP ^.:`
54006  new_path="$path"
54007  if test "x$has_colon" = x; then
54008    # Not in mixed or Windows style, start by that.
54009    new_path=`cmd //c echo $path`
54010  fi
54011
54012
54013  input_path="$new_path"
54014  # Check if we need to convert this using DOS-style short mode. If the path
54015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54016  # take no chances and rewrite it.
54017  # Note: m4 eats our [], so we need to use [ and ] instead.
54018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54019  if test "x$has_forbidden_chars" != x; then
54020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54022  fi
54023
54024
54025  windows_path="$new_path"
54026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54027    unix_path=`$CYGPATH -u "$windows_path"`
54028    new_path="$unix_path"
54029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54031    new_path="$unix_path"
54032  fi
54033
54034  if test "x$path" != "x$new_path"; then
54035    MSVC_DLL="$new_path"
54036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54038  fi
54039
54040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54042
54043    else
54044      # We're on a unix platform. Hooray! :)
54045      path="$MSVC_DLL"
54046      has_space=`$ECHO "$path" | $GREP " "`
54047      if test "x$has_space" != x; then
54048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54049$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54050        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54051      fi
54052
54053      # Use eval to expand a potential ~
54054      eval path="$path"
54055      if test ! -f "$path" && test ! -d "$path"; then
54056        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54057      fi
54058
54059      if test -d "$path"; then
54060        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54061      else
54062        dir="`$DIRNAME "$path"`"
54063        base="`$BASENAME "$path"`"
54064        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54065      fi
54066    fi
54067  fi
54068
54069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54070$as_echo_n "checking for $DLL_NAME... " >&6; }
54071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54072$as_echo "$MSVC_DLL" >&6; }
54073    else
54074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54075$as_echo "incorrect, ignoring" >&6; }
54076      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54077$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54078    fi
54079  fi
54080
54081  fi
54082
54083  if test "x$MSVC_DLL" = x; then
54084    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54085    if test "x$VS100COMNTOOLS" != x; then
54086      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54087
54088  windows_path="$CYGWIN_VS_TOOLS_DIR"
54089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54090    unix_path=`$CYGPATH -u "$windows_path"`
54091    CYGWIN_VS_TOOLS_DIR="$unix_path"
54092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54094    CYGWIN_VS_TOOLS_DIR="$unix_path"
54095  fi
54096
54097      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54098        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54099	    | $GREP -i /x64/ | $HEAD --lines 1`
54100      else
54101        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54102	    | $GREP -i /x86/ | $HEAD --lines 1`
54103      fi
54104
54105  DLL_NAME="$DLL_NAME"
54106  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54107  METHOD="search of VS100COMNTOOLS"
54108  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54109    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54110$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54111
54112    # Need to check if the found msvcr is correct architecture
54113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54114$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54115    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54117      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54118      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54119      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54120        CORRECT_MSVCR_ARCH="PE32 executable"
54121      else
54122        CORRECT_MSVCR_ARCH="PE32+ executable"
54123      fi
54124    else
54125      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54126        CORRECT_MSVCR_ARCH=386
54127      else
54128        CORRECT_MSVCR_ARCH=x86-64
54129      fi
54130    fi
54131    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54133$as_echo "ok" >&6; }
54134      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54135
54136  # Only process if variable expands to non-empty
54137
54138  if test "x$MSVC_DLL" != x; then
54139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54140
54141  # Input might be given as Windows format, start by converting to
54142  # unix format.
54143  path="$MSVC_DLL"
54144  new_path=`$CYGPATH -u "$path"`
54145
54146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54149  # "foo.exe" is OK but "foo" is an error.
54150  #
54151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54152  # It is also a way to make sure we got the proper file name for the real test later on.
54153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54154  if test "x$test_shortpath" = x; then
54155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54156$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54157    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54158  fi
54159
54160  # Call helper function which possibly converts this using DOS-style short mode.
54161  # If so, the updated path is stored in $new_path.
54162
54163  input_path="$new_path"
54164  # Check if we need to convert this using DOS-style short mode. If the path
54165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54166  # take no chances and rewrite it.
54167  # Note: m4 eats our [], so we need to use [ and ] instead.
54168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54169  if test "x$has_forbidden_chars" != x; then
54170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54174      # Going to short mode and back again did indeed matter. Since short mode is
54175      # case insensitive, let's make it lowercase to improve readability.
54176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54177      # Now convert it back to Unix-style (cygpath)
54178      input_path=`$CYGPATH -u "$shortmode_path"`
54179      new_path="$input_path"
54180    fi
54181  fi
54182
54183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54184  if test "x$test_cygdrive_prefix" = x; then
54185    # As a simple fix, exclude /usr/bin since it's not a real path.
54186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54188      # a path prefixed by /cygdrive for fixpath to work.
54189      new_path="$CYGWIN_ROOT_PATH$input_path"
54190    fi
54191  fi
54192
54193
54194  if test "x$path" != "x$new_path"; then
54195    MSVC_DLL="$new_path"
54196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54197$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54198  fi
54199
54200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54201
54202  path="$MSVC_DLL"
54203  has_colon=`$ECHO $path | $GREP ^.:`
54204  new_path="$path"
54205  if test "x$has_colon" = x; then
54206    # Not in mixed or Windows style, start by that.
54207    new_path=`cmd //c echo $path`
54208  fi
54209
54210
54211  input_path="$new_path"
54212  # Check if we need to convert this using DOS-style short mode. If the path
54213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54214  # take no chances and rewrite it.
54215  # Note: m4 eats our [], so we need to use [ and ] instead.
54216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54217  if test "x$has_forbidden_chars" != x; then
54218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54220  fi
54221
54222
54223  windows_path="$new_path"
54224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54225    unix_path=`$CYGPATH -u "$windows_path"`
54226    new_path="$unix_path"
54227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54229    new_path="$unix_path"
54230  fi
54231
54232  if test "x$path" != "x$new_path"; then
54233    MSVC_DLL="$new_path"
54234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54236  fi
54237
54238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54240
54241    else
54242      # We're on a unix platform. Hooray! :)
54243      path="$MSVC_DLL"
54244      has_space=`$ECHO "$path" | $GREP " "`
54245      if test "x$has_space" != x; then
54246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54247$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54249      fi
54250
54251      # Use eval to expand a potential ~
54252      eval path="$path"
54253      if test ! -f "$path" && test ! -d "$path"; then
54254        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54255      fi
54256
54257      if test -d "$path"; then
54258        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54259      else
54260        dir="`$DIRNAME "$path"`"
54261        base="`$BASENAME "$path"`"
54262        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54263      fi
54264    fi
54265  fi
54266
54267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54268$as_echo_n "checking for $DLL_NAME... " >&6; }
54269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54270$as_echo "$MSVC_DLL" >&6; }
54271    else
54272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54273$as_echo "incorrect, ignoring" >&6; }
54274      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54275$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54276    fi
54277  fi
54278
54279    fi
54280  fi
54281
54282  if test "x$MSVC_DLL" = x; then
54283    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54284    # (This was the original behaviour; kept since it might turn something up)
54285    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54286      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54287        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54288	    | $GREP x64 | $HEAD --lines 1`
54289      else
54290        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54291	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54292        if test "x$POSSIBLE_MSVC_DLL" = x; then
54293          # We're grasping at straws now...
54294          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54295	      | $HEAD --lines 1`
54296        fi
54297      fi
54298
54299
54300  DLL_NAME="$DLL_NAME"
54301  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54302  METHOD="search of VCINSTALLDIR"
54303  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54304    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54305$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54306
54307    # Need to check if the found msvcr is correct architecture
54308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54309$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54310    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54312      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54313      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54314      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54315        CORRECT_MSVCR_ARCH="PE32 executable"
54316      else
54317        CORRECT_MSVCR_ARCH="PE32+ executable"
54318      fi
54319    else
54320      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54321        CORRECT_MSVCR_ARCH=386
54322      else
54323        CORRECT_MSVCR_ARCH=x86-64
54324      fi
54325    fi
54326    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54328$as_echo "ok" >&6; }
54329      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54330
54331  # Only process if variable expands to non-empty
54332
54333  if test "x$MSVC_DLL" != x; then
54334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54335
54336  # Input might be given as Windows format, start by converting to
54337  # unix format.
54338  path="$MSVC_DLL"
54339  new_path=`$CYGPATH -u "$path"`
54340
54341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54344  # "foo.exe" is OK but "foo" is an error.
54345  #
54346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54347  # It is also a way to make sure we got the proper file name for the real test later on.
54348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54349  if test "x$test_shortpath" = x; then
54350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54351$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54352    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54353  fi
54354
54355  # Call helper function which possibly converts this using DOS-style short mode.
54356  # If so, the updated path is stored in $new_path.
54357
54358  input_path="$new_path"
54359  # Check if we need to convert this using DOS-style short mode. If the path
54360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54361  # take no chances and rewrite it.
54362  # Note: m4 eats our [], so we need to use [ and ] instead.
54363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54364  if test "x$has_forbidden_chars" != x; then
54365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54369      # Going to short mode and back again did indeed matter. Since short mode is
54370      # case insensitive, let's make it lowercase to improve readability.
54371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54372      # Now convert it back to Unix-style (cygpath)
54373      input_path=`$CYGPATH -u "$shortmode_path"`
54374      new_path="$input_path"
54375    fi
54376  fi
54377
54378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54379  if test "x$test_cygdrive_prefix" = x; then
54380    # As a simple fix, exclude /usr/bin since it's not a real path.
54381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54383      # a path prefixed by /cygdrive for fixpath to work.
54384      new_path="$CYGWIN_ROOT_PATH$input_path"
54385    fi
54386  fi
54387
54388
54389  if test "x$path" != "x$new_path"; then
54390    MSVC_DLL="$new_path"
54391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54392$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54393  fi
54394
54395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54396
54397  path="$MSVC_DLL"
54398  has_colon=`$ECHO $path | $GREP ^.:`
54399  new_path="$path"
54400  if test "x$has_colon" = x; then
54401    # Not in mixed or Windows style, start by that.
54402    new_path=`cmd //c echo $path`
54403  fi
54404
54405
54406  input_path="$new_path"
54407  # Check if we need to convert this using DOS-style short mode. If the path
54408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54409  # take no chances and rewrite it.
54410  # Note: m4 eats our [], so we need to use [ and ] instead.
54411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54412  if test "x$has_forbidden_chars" != x; then
54413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54415  fi
54416
54417
54418  windows_path="$new_path"
54419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54420    unix_path=`$CYGPATH -u "$windows_path"`
54421    new_path="$unix_path"
54422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54424    new_path="$unix_path"
54425  fi
54426
54427  if test "x$path" != "x$new_path"; then
54428    MSVC_DLL="$new_path"
54429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54430$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54431  fi
54432
54433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54435
54436    else
54437      # We're on a unix platform. Hooray! :)
54438      path="$MSVC_DLL"
54439      has_space=`$ECHO "$path" | $GREP " "`
54440      if test "x$has_space" != x; then
54441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54442$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54444      fi
54445
54446      # Use eval to expand a potential ~
54447      eval path="$path"
54448      if test ! -f "$path" && test ! -d "$path"; then
54449        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54450      fi
54451
54452      if test -d "$path"; then
54453        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54454      else
54455        dir="`$DIRNAME "$path"`"
54456        base="`$BASENAME "$path"`"
54457        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54458      fi
54459    fi
54460  fi
54461
54462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54463$as_echo_n "checking for $DLL_NAME... " >&6; }
54464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54465$as_echo "$MSVC_DLL" >&6; }
54466    else
54467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54468$as_echo "incorrect, ignoring" >&6; }
54469      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54470$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54471    fi
54472  fi
54473
54474    fi
54475  fi
54476
54477  if test "x$MSVC_DLL" = x; then
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54479$as_echo_n "checking for $DLL_NAME... " >&6; }
54480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54481$as_echo "no" >&6; }
54482    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54483  fi
54484
54485    MSVCR_DLL="$MSVC_DLL"
54486  fi
54487
54488
54489
54490# Check whether --with-msvcp-dll was given.
54491if test "${with_msvcp_dll+set}" = set; then :
54492  withval=$with_msvcp_dll;
54493fi
54494
54495
54496  if test "x$MSVCP_NAME" != "x"; then
54497    if test "x$with_msvcp_dll" != x; then
54498      # If given explicitly by user, do not probe. If not present, fail directly.
54499
54500  DLL_NAME="$MSVCP_NAME"
54501  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54502  METHOD="--with-msvcp-dll"
54503  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54504    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54505$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54506
54507    # Need to check if the found msvcr is correct architecture
54508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54509$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54510    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54512      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54513      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54514      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54515        CORRECT_MSVCR_ARCH="PE32 executable"
54516      else
54517        CORRECT_MSVCR_ARCH="PE32+ executable"
54518      fi
54519    else
54520      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54521        CORRECT_MSVCR_ARCH=386
54522      else
54523        CORRECT_MSVCR_ARCH=x86-64
54524      fi
54525    fi
54526    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54528$as_echo "ok" >&6; }
54529      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54530
54531  # Only process if variable expands to non-empty
54532
54533  if test "x$MSVC_DLL" != x; then
54534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54535
54536  # Input might be given as Windows format, start by converting to
54537  # unix format.
54538  path="$MSVC_DLL"
54539  new_path=`$CYGPATH -u "$path"`
54540
54541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54544  # "foo.exe" is OK but "foo" is an error.
54545  #
54546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54547  # It is also a way to make sure we got the proper file name for the real test later on.
54548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54549  if test "x$test_shortpath" = x; then
54550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54551$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54552    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54553  fi
54554
54555  # Call helper function which possibly converts this using DOS-style short mode.
54556  # If so, the updated path is stored in $new_path.
54557
54558  input_path="$new_path"
54559  # Check if we need to convert this using DOS-style short mode. If the path
54560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54561  # take no chances and rewrite it.
54562  # Note: m4 eats our [], so we need to use [ and ] instead.
54563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54564  if test "x$has_forbidden_chars" != x; then
54565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54569      # Going to short mode and back again did indeed matter. Since short mode is
54570      # case insensitive, let's make it lowercase to improve readability.
54571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54572      # Now convert it back to Unix-style (cygpath)
54573      input_path=`$CYGPATH -u "$shortmode_path"`
54574      new_path="$input_path"
54575    fi
54576  fi
54577
54578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54579  if test "x$test_cygdrive_prefix" = x; then
54580    # As a simple fix, exclude /usr/bin since it's not a real path.
54581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54583      # a path prefixed by /cygdrive for fixpath to work.
54584      new_path="$CYGWIN_ROOT_PATH$input_path"
54585    fi
54586  fi
54587
54588
54589  if test "x$path" != "x$new_path"; then
54590    MSVC_DLL="$new_path"
54591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54592$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54593  fi
54594
54595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54596
54597  path="$MSVC_DLL"
54598  has_colon=`$ECHO $path | $GREP ^.:`
54599  new_path="$path"
54600  if test "x$has_colon" = x; then
54601    # Not in mixed or Windows style, start by that.
54602    new_path=`cmd //c echo $path`
54603  fi
54604
54605
54606  input_path="$new_path"
54607  # Check if we need to convert this using DOS-style short mode. If the path
54608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54609  # take no chances and rewrite it.
54610  # Note: m4 eats our [], so we need to use [ and ] instead.
54611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54612  if test "x$has_forbidden_chars" != x; then
54613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54615  fi
54616
54617
54618  windows_path="$new_path"
54619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54620    unix_path=`$CYGPATH -u "$windows_path"`
54621    new_path="$unix_path"
54622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54624    new_path="$unix_path"
54625  fi
54626
54627  if test "x$path" != "x$new_path"; then
54628    MSVC_DLL="$new_path"
54629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54630$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54631  fi
54632
54633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54635
54636    else
54637      # We're on a unix platform. Hooray! :)
54638      path="$MSVC_DLL"
54639      has_space=`$ECHO "$path" | $GREP " "`
54640      if test "x$has_space" != x; then
54641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54642$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54644      fi
54645
54646      # Use eval to expand a potential ~
54647      eval path="$path"
54648      if test ! -f "$path" && test ! -d "$path"; then
54649        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54650      fi
54651
54652      if test -d "$path"; then
54653        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54654      else
54655        dir="`$DIRNAME "$path"`"
54656        base="`$BASENAME "$path"`"
54657        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54658      fi
54659    fi
54660  fi
54661
54662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54663$as_echo_n "checking for $DLL_NAME... " >&6; }
54664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54665$as_echo "$MSVC_DLL" >&6; }
54666    else
54667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54668$as_echo "incorrect, ignoring" >&6; }
54669      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54670$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54671    fi
54672  fi
54673
54674      if test "x$MSVC_DLL" = x; then
54675        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54676      fi
54677      MSVCP_DLL="$MSVC_DLL"
54678    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54679
54680  DLL_NAME="$MSVCP_NAME"
54681  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54682  METHOD="devkit"
54683  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54684    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54685$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54686
54687    # Need to check if the found msvcr is correct architecture
54688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54689$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54690    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54692      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54693      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54694      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54695        CORRECT_MSVCR_ARCH="PE32 executable"
54696      else
54697        CORRECT_MSVCR_ARCH="PE32+ executable"
54698      fi
54699    else
54700      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54701        CORRECT_MSVCR_ARCH=386
54702      else
54703        CORRECT_MSVCR_ARCH=x86-64
54704      fi
54705    fi
54706    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54708$as_echo "ok" >&6; }
54709      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54710
54711  # Only process if variable expands to non-empty
54712
54713  if test "x$MSVC_DLL" != x; then
54714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54715
54716  # Input might be given as Windows format, start by converting to
54717  # unix format.
54718  path="$MSVC_DLL"
54719  new_path=`$CYGPATH -u "$path"`
54720
54721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54724  # "foo.exe" is OK but "foo" is an error.
54725  #
54726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54727  # It is also a way to make sure we got the proper file name for the real test later on.
54728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54729  if test "x$test_shortpath" = x; then
54730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54731$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54732    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54733  fi
54734
54735  # Call helper function which possibly converts this using DOS-style short mode.
54736  # If so, the updated path is stored in $new_path.
54737
54738  input_path="$new_path"
54739  # Check if we need to convert this using DOS-style short mode. If the path
54740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54741  # take no chances and rewrite it.
54742  # Note: m4 eats our [], so we need to use [ and ] instead.
54743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54744  if test "x$has_forbidden_chars" != x; then
54745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54749      # Going to short mode and back again did indeed matter. Since short mode is
54750      # case insensitive, let's make it lowercase to improve readability.
54751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54752      # Now convert it back to Unix-style (cygpath)
54753      input_path=`$CYGPATH -u "$shortmode_path"`
54754      new_path="$input_path"
54755    fi
54756  fi
54757
54758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54759  if test "x$test_cygdrive_prefix" = x; then
54760    # As a simple fix, exclude /usr/bin since it's not a real path.
54761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54763      # a path prefixed by /cygdrive for fixpath to work.
54764      new_path="$CYGWIN_ROOT_PATH$input_path"
54765    fi
54766  fi
54767
54768
54769  if test "x$path" != "x$new_path"; then
54770    MSVC_DLL="$new_path"
54771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54772$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54773  fi
54774
54775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54776
54777  path="$MSVC_DLL"
54778  has_colon=`$ECHO $path | $GREP ^.:`
54779  new_path="$path"
54780  if test "x$has_colon" = x; then
54781    # Not in mixed or Windows style, start by that.
54782    new_path=`cmd //c echo $path`
54783  fi
54784
54785
54786  input_path="$new_path"
54787  # Check if we need to convert this using DOS-style short mode. If the path
54788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54789  # take no chances and rewrite it.
54790  # Note: m4 eats our [], so we need to use [ and ] instead.
54791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54792  if test "x$has_forbidden_chars" != x; then
54793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54795  fi
54796
54797
54798  windows_path="$new_path"
54799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54800    unix_path=`$CYGPATH -u "$windows_path"`
54801    new_path="$unix_path"
54802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54804    new_path="$unix_path"
54805  fi
54806
54807  if test "x$path" != "x$new_path"; then
54808    MSVC_DLL="$new_path"
54809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54810$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54811  fi
54812
54813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54815
54816    else
54817      # We're on a unix platform. Hooray! :)
54818      path="$MSVC_DLL"
54819      has_space=`$ECHO "$path" | $GREP " "`
54820      if test "x$has_space" != x; then
54821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54822$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54824      fi
54825
54826      # Use eval to expand a potential ~
54827      eval path="$path"
54828      if test ! -f "$path" && test ! -d "$path"; then
54829        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54830      fi
54831
54832      if test -d "$path"; then
54833        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54834      else
54835        dir="`$DIRNAME "$path"`"
54836        base="`$BASENAME "$path"`"
54837        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54838      fi
54839    fi
54840  fi
54841
54842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54843$as_echo_n "checking for $DLL_NAME... " >&6; }
54844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54845$as_echo "$MSVC_DLL" >&6; }
54846    else
54847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54848$as_echo "incorrect, ignoring" >&6; }
54849      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54850$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54851    fi
54852  fi
54853
54854      if test "x$MSVC_DLL" = x; then
54855        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54856      fi
54857      MSVCP_DLL="$MSVC_DLL"
54858    else
54859
54860  DLL_NAME="${MSVCP_NAME}"
54861  MSVC_DLL=
54862
54863  if test "x$MSVC_DLL" = x; then
54864    # Probe: Using well-known location from Visual Studio 10.0
54865    if test "x$VCINSTALLDIR" != x; then
54866      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54867
54868  windows_path="$CYGWIN_VC_INSTALL_DIR"
54869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54870    unix_path=`$CYGPATH -u "$windows_path"`
54871    CYGWIN_VC_INSTALL_DIR="$unix_path"
54872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54874    CYGWIN_VC_INSTALL_DIR="$unix_path"
54875  fi
54876
54877      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54878        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54879      else
54880        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54881      fi
54882      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54883
54884  DLL_NAME="$DLL_NAME"
54885  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54886  METHOD="well-known location in VCINSTALLDIR"
54887  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54889$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54890
54891    # Need to check if the found msvcr is correct architecture
54892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54893$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54894    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54896      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54897      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54898      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54899        CORRECT_MSVCR_ARCH="PE32 executable"
54900      else
54901        CORRECT_MSVCR_ARCH="PE32+ executable"
54902      fi
54903    else
54904      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54905        CORRECT_MSVCR_ARCH=386
54906      else
54907        CORRECT_MSVCR_ARCH=x86-64
54908      fi
54909    fi
54910    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54912$as_echo "ok" >&6; }
54913      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54914
54915  # Only process if variable expands to non-empty
54916
54917  if test "x$MSVC_DLL" != x; then
54918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54919
54920  # Input might be given as Windows format, start by converting to
54921  # unix format.
54922  path="$MSVC_DLL"
54923  new_path=`$CYGPATH -u "$path"`
54924
54925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54928  # "foo.exe" is OK but "foo" is an error.
54929  #
54930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54931  # It is also a way to make sure we got the proper file name for the real test later on.
54932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54933  if test "x$test_shortpath" = x; then
54934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54935$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54936    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54937  fi
54938
54939  # Call helper function which possibly converts this using DOS-style short mode.
54940  # If so, the updated path is stored in $new_path.
54941
54942  input_path="$new_path"
54943  # Check if we need to convert this using DOS-style short mode. If the path
54944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54945  # take no chances and rewrite it.
54946  # Note: m4 eats our [], so we need to use [ and ] instead.
54947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54948  if test "x$has_forbidden_chars" != x; then
54949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54953      # Going to short mode and back again did indeed matter. Since short mode is
54954      # case insensitive, let's make it lowercase to improve readability.
54955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54956      # Now convert it back to Unix-style (cygpath)
54957      input_path=`$CYGPATH -u "$shortmode_path"`
54958      new_path="$input_path"
54959    fi
54960  fi
54961
54962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54963  if test "x$test_cygdrive_prefix" = x; then
54964    # As a simple fix, exclude /usr/bin since it's not a real path.
54965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54967      # a path prefixed by /cygdrive for fixpath to work.
54968      new_path="$CYGWIN_ROOT_PATH$input_path"
54969    fi
54970  fi
54971
54972
54973  if test "x$path" != "x$new_path"; then
54974    MSVC_DLL="$new_path"
54975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54976$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54977  fi
54978
54979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54980
54981  path="$MSVC_DLL"
54982  has_colon=`$ECHO $path | $GREP ^.:`
54983  new_path="$path"
54984  if test "x$has_colon" = x; then
54985    # Not in mixed or Windows style, start by that.
54986    new_path=`cmd //c echo $path`
54987  fi
54988
54989
54990  input_path="$new_path"
54991  # Check if we need to convert this using DOS-style short mode. If the path
54992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54993  # take no chances and rewrite it.
54994  # Note: m4 eats our [], so we need to use [ and ] instead.
54995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54996  if test "x$has_forbidden_chars" != x; then
54997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54999  fi
55000
55001
55002  windows_path="$new_path"
55003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55004    unix_path=`$CYGPATH -u "$windows_path"`
55005    new_path="$unix_path"
55006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55008    new_path="$unix_path"
55009  fi
55010
55011  if test "x$path" != "x$new_path"; then
55012    MSVC_DLL="$new_path"
55013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55015  fi
55016
55017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55019
55020    else
55021      # We're on a unix platform. Hooray! :)
55022      path="$MSVC_DLL"
55023      has_space=`$ECHO "$path" | $GREP " "`
55024      if test "x$has_space" != x; then
55025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55026$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55027        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55028      fi
55029
55030      # Use eval to expand a potential ~
55031      eval path="$path"
55032      if test ! -f "$path" && test ! -d "$path"; then
55033        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55034      fi
55035
55036      if test -d "$path"; then
55037        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55038      else
55039        dir="`$DIRNAME "$path"`"
55040        base="`$BASENAME "$path"`"
55041        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55042      fi
55043    fi
55044  fi
55045
55046      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55047$as_echo_n "checking for $DLL_NAME... " >&6; }
55048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55049$as_echo "$MSVC_DLL" >&6; }
55050    else
55051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55052$as_echo "incorrect, ignoring" >&6; }
55053      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55054$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55055    fi
55056  fi
55057
55058    fi
55059  fi
55060
55061  if test "x$MSVC_DLL" = x; then
55062    # Probe: Check in the Boot JDK directory.
55063    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55064
55065  DLL_NAME="$DLL_NAME"
55066  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55067  METHOD="well-known location in Boot JDK"
55068  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55069    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55070$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55071
55072    # Need to check if the found msvcr is correct architecture
55073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55074$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55075    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55076    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55077      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55078      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55079      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55080        CORRECT_MSVCR_ARCH="PE32 executable"
55081      else
55082        CORRECT_MSVCR_ARCH="PE32+ executable"
55083      fi
55084    else
55085      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55086        CORRECT_MSVCR_ARCH=386
55087      else
55088        CORRECT_MSVCR_ARCH=x86-64
55089      fi
55090    fi
55091    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55093$as_echo "ok" >&6; }
55094      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55095
55096  # Only process if variable expands to non-empty
55097
55098  if test "x$MSVC_DLL" != x; then
55099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55100
55101  # Input might be given as Windows format, start by converting to
55102  # unix format.
55103  path="$MSVC_DLL"
55104  new_path=`$CYGPATH -u "$path"`
55105
55106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55109  # "foo.exe" is OK but "foo" is an error.
55110  #
55111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55112  # It is also a way to make sure we got the proper file name for the real test later on.
55113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55114  if test "x$test_shortpath" = x; then
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55116$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55117    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55118  fi
55119
55120  # Call helper function which possibly converts this using DOS-style short mode.
55121  # If so, the updated path is stored in $new_path.
55122
55123  input_path="$new_path"
55124  # Check if we need to convert this using DOS-style short mode. If the path
55125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55126  # take no chances and rewrite it.
55127  # Note: m4 eats our [], so we need to use [ and ] instead.
55128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55129  if test "x$has_forbidden_chars" != x; then
55130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55134      # Going to short mode and back again did indeed matter. Since short mode is
55135      # case insensitive, let's make it lowercase to improve readability.
55136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55137      # Now convert it back to Unix-style (cygpath)
55138      input_path=`$CYGPATH -u "$shortmode_path"`
55139      new_path="$input_path"
55140    fi
55141  fi
55142
55143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55144  if test "x$test_cygdrive_prefix" = x; then
55145    # As a simple fix, exclude /usr/bin since it's not a real path.
55146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55148      # a path prefixed by /cygdrive for fixpath to work.
55149      new_path="$CYGWIN_ROOT_PATH$input_path"
55150    fi
55151  fi
55152
55153
55154  if test "x$path" != "x$new_path"; then
55155    MSVC_DLL="$new_path"
55156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55157$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55158  fi
55159
55160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55161
55162  path="$MSVC_DLL"
55163  has_colon=`$ECHO $path | $GREP ^.:`
55164  new_path="$path"
55165  if test "x$has_colon" = x; then
55166    # Not in mixed or Windows style, start by that.
55167    new_path=`cmd //c echo $path`
55168  fi
55169
55170
55171  input_path="$new_path"
55172  # Check if we need to convert this using DOS-style short mode. If the path
55173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55174  # take no chances and rewrite it.
55175  # Note: m4 eats our [], so we need to use [ and ] instead.
55176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55177  if test "x$has_forbidden_chars" != x; then
55178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55180  fi
55181
55182
55183  windows_path="$new_path"
55184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55185    unix_path=`$CYGPATH -u "$windows_path"`
55186    new_path="$unix_path"
55187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55189    new_path="$unix_path"
55190  fi
55191
55192  if test "x$path" != "x$new_path"; then
55193    MSVC_DLL="$new_path"
55194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55196  fi
55197
55198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55200
55201    else
55202      # We're on a unix platform. Hooray! :)
55203      path="$MSVC_DLL"
55204      has_space=`$ECHO "$path" | $GREP " "`
55205      if test "x$has_space" != x; then
55206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55207$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55209      fi
55210
55211      # Use eval to expand a potential ~
55212      eval path="$path"
55213      if test ! -f "$path" && test ! -d "$path"; then
55214        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55215      fi
55216
55217      if test -d "$path"; then
55218        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55219      else
55220        dir="`$DIRNAME "$path"`"
55221        base="`$BASENAME "$path"`"
55222        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55223      fi
55224    fi
55225  fi
55226
55227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55228$as_echo_n "checking for $DLL_NAME... " >&6; }
55229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55230$as_echo "$MSVC_DLL" >&6; }
55231    else
55232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55233$as_echo "incorrect, ignoring" >&6; }
55234      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55235$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55236    fi
55237  fi
55238
55239  fi
55240
55241  if test "x$MSVC_DLL" = x; then
55242    # Probe: Look in the Windows system32 directory
55243    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55244
55245  windows_path="$CYGWIN_SYSTEMROOT"
55246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55247    unix_path=`$CYGPATH -u "$windows_path"`
55248    CYGWIN_SYSTEMROOT="$unix_path"
55249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55251    CYGWIN_SYSTEMROOT="$unix_path"
55252  fi
55253
55254    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55255
55256  DLL_NAME="$DLL_NAME"
55257  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55258  METHOD="well-known location in SYSTEMROOT"
55259  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55261$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55262
55263    # Need to check if the found msvcr is correct architecture
55264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55265$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55266    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55268      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55269      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55270      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55271        CORRECT_MSVCR_ARCH="PE32 executable"
55272      else
55273        CORRECT_MSVCR_ARCH="PE32+ executable"
55274      fi
55275    else
55276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55277        CORRECT_MSVCR_ARCH=386
55278      else
55279        CORRECT_MSVCR_ARCH=x86-64
55280      fi
55281    fi
55282    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55284$as_echo "ok" >&6; }
55285      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55286
55287  # Only process if variable expands to non-empty
55288
55289  if test "x$MSVC_DLL" != x; then
55290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55291
55292  # Input might be given as Windows format, start by converting to
55293  # unix format.
55294  path="$MSVC_DLL"
55295  new_path=`$CYGPATH -u "$path"`
55296
55297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55300  # "foo.exe" is OK but "foo" is an error.
55301  #
55302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55303  # It is also a way to make sure we got the proper file name for the real test later on.
55304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55305  if test "x$test_shortpath" = x; then
55306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55307$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55308    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55309  fi
55310
55311  # Call helper function which possibly converts this using DOS-style short mode.
55312  # If so, the updated path is stored in $new_path.
55313
55314  input_path="$new_path"
55315  # Check if we need to convert this using DOS-style short mode. If the path
55316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55317  # take no chances and rewrite it.
55318  # Note: m4 eats our [], so we need to use [ and ] instead.
55319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55320  if test "x$has_forbidden_chars" != x; then
55321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55325      # Going to short mode and back again did indeed matter. Since short mode is
55326      # case insensitive, let's make it lowercase to improve readability.
55327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55328      # Now convert it back to Unix-style (cygpath)
55329      input_path=`$CYGPATH -u "$shortmode_path"`
55330      new_path="$input_path"
55331    fi
55332  fi
55333
55334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55335  if test "x$test_cygdrive_prefix" = x; then
55336    # As a simple fix, exclude /usr/bin since it's not a real path.
55337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55339      # a path prefixed by /cygdrive for fixpath to work.
55340      new_path="$CYGWIN_ROOT_PATH$input_path"
55341    fi
55342  fi
55343
55344
55345  if test "x$path" != "x$new_path"; then
55346    MSVC_DLL="$new_path"
55347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55348$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55349  fi
55350
55351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55352
55353  path="$MSVC_DLL"
55354  has_colon=`$ECHO $path | $GREP ^.:`
55355  new_path="$path"
55356  if test "x$has_colon" = x; then
55357    # Not in mixed or Windows style, start by that.
55358    new_path=`cmd //c echo $path`
55359  fi
55360
55361
55362  input_path="$new_path"
55363  # Check if we need to convert this using DOS-style short mode. If the path
55364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55365  # take no chances and rewrite it.
55366  # Note: m4 eats our [], so we need to use [ and ] instead.
55367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55368  if test "x$has_forbidden_chars" != x; then
55369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55371  fi
55372
55373
55374  windows_path="$new_path"
55375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55376    unix_path=`$CYGPATH -u "$windows_path"`
55377    new_path="$unix_path"
55378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55380    new_path="$unix_path"
55381  fi
55382
55383  if test "x$path" != "x$new_path"; then
55384    MSVC_DLL="$new_path"
55385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55387  fi
55388
55389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55391
55392    else
55393      # We're on a unix platform. Hooray! :)
55394      path="$MSVC_DLL"
55395      has_space=`$ECHO "$path" | $GREP " "`
55396      if test "x$has_space" != x; then
55397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55398$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55400      fi
55401
55402      # Use eval to expand a potential ~
55403      eval path="$path"
55404      if test ! -f "$path" && test ! -d "$path"; then
55405        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55406      fi
55407
55408      if test -d "$path"; then
55409        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55410      else
55411        dir="`$DIRNAME "$path"`"
55412        base="`$BASENAME "$path"`"
55413        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55414      fi
55415    fi
55416  fi
55417
55418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55419$as_echo_n "checking for $DLL_NAME... " >&6; }
55420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55421$as_echo "$MSVC_DLL" >&6; }
55422    else
55423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55424$as_echo "incorrect, ignoring" >&6; }
55425      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55426$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55427    fi
55428  fi
55429
55430  fi
55431
55432  if test "x$MSVC_DLL" = x; then
55433    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55434    if test "x$VS100COMNTOOLS" != x; then
55435      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55436
55437  windows_path="$CYGWIN_VS_TOOLS_DIR"
55438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55439    unix_path=`$CYGPATH -u "$windows_path"`
55440    CYGWIN_VS_TOOLS_DIR="$unix_path"
55441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55443    CYGWIN_VS_TOOLS_DIR="$unix_path"
55444  fi
55445
55446      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55447        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55448	    | $GREP -i /x64/ | $HEAD --lines 1`
55449      else
55450        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55451	    | $GREP -i /x86/ | $HEAD --lines 1`
55452      fi
55453
55454  DLL_NAME="$DLL_NAME"
55455  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55456  METHOD="search of VS100COMNTOOLS"
55457  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55458    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55459$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55460
55461    # Need to check if the found msvcr is correct architecture
55462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55463$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55464    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55466      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55467      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55468      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55469        CORRECT_MSVCR_ARCH="PE32 executable"
55470      else
55471        CORRECT_MSVCR_ARCH="PE32+ executable"
55472      fi
55473    else
55474      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55475        CORRECT_MSVCR_ARCH=386
55476      else
55477        CORRECT_MSVCR_ARCH=x86-64
55478      fi
55479    fi
55480    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55482$as_echo "ok" >&6; }
55483      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55484
55485  # Only process if variable expands to non-empty
55486
55487  if test "x$MSVC_DLL" != x; then
55488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55489
55490  # Input might be given as Windows format, start by converting to
55491  # unix format.
55492  path="$MSVC_DLL"
55493  new_path=`$CYGPATH -u "$path"`
55494
55495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55498  # "foo.exe" is OK but "foo" is an error.
55499  #
55500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55501  # It is also a way to make sure we got the proper file name for the real test later on.
55502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55503  if test "x$test_shortpath" = x; then
55504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55505$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55506    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55507  fi
55508
55509  # Call helper function which possibly converts this using DOS-style short mode.
55510  # If so, the updated path is stored in $new_path.
55511
55512  input_path="$new_path"
55513  # Check if we need to convert this using DOS-style short mode. If the path
55514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55515  # take no chances and rewrite it.
55516  # Note: m4 eats our [], so we need to use [ and ] instead.
55517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55518  if test "x$has_forbidden_chars" != x; then
55519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55523      # Going to short mode and back again did indeed matter. Since short mode is
55524      # case insensitive, let's make it lowercase to improve readability.
55525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55526      # Now convert it back to Unix-style (cygpath)
55527      input_path=`$CYGPATH -u "$shortmode_path"`
55528      new_path="$input_path"
55529    fi
55530  fi
55531
55532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55533  if test "x$test_cygdrive_prefix" = x; then
55534    # As a simple fix, exclude /usr/bin since it's not a real path.
55535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55537      # a path prefixed by /cygdrive for fixpath to work.
55538      new_path="$CYGWIN_ROOT_PATH$input_path"
55539    fi
55540  fi
55541
55542
55543  if test "x$path" != "x$new_path"; then
55544    MSVC_DLL="$new_path"
55545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55546$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55547  fi
55548
55549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55550
55551  path="$MSVC_DLL"
55552  has_colon=`$ECHO $path | $GREP ^.:`
55553  new_path="$path"
55554  if test "x$has_colon" = x; then
55555    # Not in mixed or Windows style, start by that.
55556    new_path=`cmd //c echo $path`
55557  fi
55558
55559
55560  input_path="$new_path"
55561  # Check if we need to convert this using DOS-style short mode. If the path
55562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55563  # take no chances and rewrite it.
55564  # Note: m4 eats our [], so we need to use [ and ] instead.
55565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55566  if test "x$has_forbidden_chars" != x; then
55567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55569  fi
55570
55571
55572  windows_path="$new_path"
55573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55574    unix_path=`$CYGPATH -u "$windows_path"`
55575    new_path="$unix_path"
55576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55578    new_path="$unix_path"
55579  fi
55580
55581  if test "x$path" != "x$new_path"; then
55582    MSVC_DLL="$new_path"
55583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55584$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55585  fi
55586
55587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55589
55590    else
55591      # We're on a unix platform. Hooray! :)
55592      path="$MSVC_DLL"
55593      has_space=`$ECHO "$path" | $GREP " "`
55594      if test "x$has_space" != x; then
55595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55596$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55597        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55598      fi
55599
55600      # Use eval to expand a potential ~
55601      eval path="$path"
55602      if test ! -f "$path" && test ! -d "$path"; then
55603        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55604      fi
55605
55606      if test -d "$path"; then
55607        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55608      else
55609        dir="`$DIRNAME "$path"`"
55610        base="`$BASENAME "$path"`"
55611        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55612      fi
55613    fi
55614  fi
55615
55616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55617$as_echo_n "checking for $DLL_NAME... " >&6; }
55618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55619$as_echo "$MSVC_DLL" >&6; }
55620    else
55621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55622$as_echo "incorrect, ignoring" >&6; }
55623      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55624$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55625    fi
55626  fi
55627
55628    fi
55629  fi
55630
55631  if test "x$MSVC_DLL" = x; then
55632    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55633    # (This was the original behaviour; kept since it might turn something up)
55634    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55635      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55636        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55637	    | $GREP x64 | $HEAD --lines 1`
55638      else
55639        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55640	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55641        if test "x$POSSIBLE_MSVC_DLL" = x; then
55642          # We're grasping at straws now...
55643          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55644	      | $HEAD --lines 1`
55645        fi
55646      fi
55647
55648
55649  DLL_NAME="$DLL_NAME"
55650  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55651  METHOD="search of VCINSTALLDIR"
55652  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55653    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55654$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55655
55656    # Need to check if the found msvcr is correct architecture
55657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55658$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55659    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55661      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55662      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55663      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55664        CORRECT_MSVCR_ARCH="PE32 executable"
55665      else
55666        CORRECT_MSVCR_ARCH="PE32+ executable"
55667      fi
55668    else
55669      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55670        CORRECT_MSVCR_ARCH=386
55671      else
55672        CORRECT_MSVCR_ARCH=x86-64
55673      fi
55674    fi
55675    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55677$as_echo "ok" >&6; }
55678      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55679
55680  # Only process if variable expands to non-empty
55681
55682  if test "x$MSVC_DLL" != x; then
55683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55684
55685  # Input might be given as Windows format, start by converting to
55686  # unix format.
55687  path="$MSVC_DLL"
55688  new_path=`$CYGPATH -u "$path"`
55689
55690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55693  # "foo.exe" is OK but "foo" is an error.
55694  #
55695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55696  # It is also a way to make sure we got the proper file name for the real test later on.
55697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55698  if test "x$test_shortpath" = x; then
55699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55700$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55701    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55702  fi
55703
55704  # Call helper function which possibly converts this using DOS-style short mode.
55705  # If so, the updated path is stored in $new_path.
55706
55707  input_path="$new_path"
55708  # Check if we need to convert this using DOS-style short mode. If the path
55709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55710  # take no chances and rewrite it.
55711  # Note: m4 eats our [], so we need to use [ and ] instead.
55712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55713  if test "x$has_forbidden_chars" != x; then
55714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55718      # Going to short mode and back again did indeed matter. Since short mode is
55719      # case insensitive, let's make it lowercase to improve readability.
55720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55721      # Now convert it back to Unix-style (cygpath)
55722      input_path=`$CYGPATH -u "$shortmode_path"`
55723      new_path="$input_path"
55724    fi
55725  fi
55726
55727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55728  if test "x$test_cygdrive_prefix" = x; then
55729    # As a simple fix, exclude /usr/bin since it's not a real path.
55730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55732      # a path prefixed by /cygdrive for fixpath to work.
55733      new_path="$CYGWIN_ROOT_PATH$input_path"
55734    fi
55735  fi
55736
55737
55738  if test "x$path" != "x$new_path"; then
55739    MSVC_DLL="$new_path"
55740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55741$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55742  fi
55743
55744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55745
55746  path="$MSVC_DLL"
55747  has_colon=`$ECHO $path | $GREP ^.:`
55748  new_path="$path"
55749  if test "x$has_colon" = x; then
55750    # Not in mixed or Windows style, start by that.
55751    new_path=`cmd //c echo $path`
55752  fi
55753
55754
55755  input_path="$new_path"
55756  # Check if we need to convert this using DOS-style short mode. If the path
55757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55758  # take no chances and rewrite it.
55759  # Note: m4 eats our [], so we need to use [ and ] instead.
55760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55761  if test "x$has_forbidden_chars" != x; then
55762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55764  fi
55765
55766
55767  windows_path="$new_path"
55768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55769    unix_path=`$CYGPATH -u "$windows_path"`
55770    new_path="$unix_path"
55771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55773    new_path="$unix_path"
55774  fi
55775
55776  if test "x$path" != "x$new_path"; then
55777    MSVC_DLL="$new_path"
55778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55779$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55780  fi
55781
55782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55784
55785    else
55786      # We're on a unix platform. Hooray! :)
55787      path="$MSVC_DLL"
55788      has_space=`$ECHO "$path" | $GREP " "`
55789      if test "x$has_space" != x; then
55790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55791$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55792        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55793      fi
55794
55795      # Use eval to expand a potential ~
55796      eval path="$path"
55797      if test ! -f "$path" && test ! -d "$path"; then
55798        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55799      fi
55800
55801      if test -d "$path"; then
55802        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55803      else
55804        dir="`$DIRNAME "$path"`"
55805        base="`$BASENAME "$path"`"
55806        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55807      fi
55808    fi
55809  fi
55810
55811      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55812$as_echo_n "checking for $DLL_NAME... " >&6; }
55813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55814$as_echo "$MSVC_DLL" >&6; }
55815    else
55816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55817$as_echo "incorrect, ignoring" >&6; }
55818      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55819$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55820    fi
55821  fi
55822
55823    fi
55824  fi
55825
55826  if test "x$MSVC_DLL" = x; then
55827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55828$as_echo_n "checking for $DLL_NAME... " >&6; }
55829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55830$as_echo "no" >&6; }
55831    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55832  fi
55833
55834      MSVCP_DLL="$MSVC_DLL"
55835    fi
55836
55837  fi
55838
55839  fi
55840
55841
55842  if test "x$NEEDS_LIB_X11" = xfalse; then
55843    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55844      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55845$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55846    fi
55847    X_CFLAGS=
55848    X_LIBS=
55849  else
55850
55851    if test "x${with_x}" = xno; then
55852      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55853    fi
55854
55855    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55856      # The user has specified a X11 base directory. Use it for includes and
55857      # libraries, unless explicitly overridden.
55858      if test "x$x_includes" = xNONE; then
55859        x_includes="${with_x}/include"
55860      fi
55861      if test "x$x_libraries" = xNONE; then
55862        x_libraries="${with_x}/lib"
55863      fi
55864    else
55865      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55866      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55867      # --x-libraries for the sysroot, if that seems to be correct.
55868      if test "x$SYSROOT" != "x"; then
55869        if test "x$x_includes" = xNONE; then
55870          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55871            x_includes="$SYSROOT/usr/X11R6/include"
55872          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55873            x_includes="$SYSROOT/usr/include"
55874          fi
55875        fi
55876        if test "x$x_libraries" = xNONE; then
55877          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55878            x_libraries="$SYSROOT/usr/X11R6/lib"
55879          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55880            x_libraries="$SYSROOT/usr/lib64"
55881          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55882            x_libraries="$SYSROOT/usr/lib"
55883          fi
55884        fi
55885      fi
55886    fi
55887
55888    # Now let autoconf do it's magic
55889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55890$as_echo_n "checking for X... " >&6; }
55891
55892
55893# Check whether --with-x was given.
55894if test "${with_x+set}" = set; then :
55895  withval=$with_x;
55896fi
55897
55898# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55899if test "x$with_x" = xno; then
55900  # The user explicitly disabled X.
55901  have_x=disabled
55902else
55903  case $x_includes,$x_libraries in #(
55904    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55905    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55906  $as_echo_n "(cached) " >&6
55907else
55908  # One or both of the vars are not set, and there is no cached value.
55909ac_x_includes=no ac_x_libraries=no
55910rm -f -r conftest.dir
55911if mkdir conftest.dir; then
55912  cd conftest.dir
55913  cat >Imakefile <<'_ACEOF'
55914incroot:
55915	@echo incroot='${INCROOT}'
55916usrlibdir:
55917	@echo usrlibdir='${USRLIBDIR}'
55918libdir:
55919	@echo libdir='${LIBDIR}'
55920_ACEOF
55921  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55922    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55923    for ac_var in incroot usrlibdir libdir; do
55924      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55925    done
55926    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55927    for ac_extension in a so sl dylib la dll; do
55928      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55929	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55930	ac_im_usrlibdir=$ac_im_libdir; break
55931      fi
55932    done
55933    # Screen out bogus values from the imake configuration.  They are
55934    # bogus both because they are the default anyway, and because
55935    # using them would break gcc on systems where it needs fixed includes.
55936    case $ac_im_incroot in
55937	/usr/include) ac_x_includes= ;;
55938	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55939    esac
55940    case $ac_im_usrlibdir in
55941	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55942	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55943    esac
55944  fi
55945  cd ..
55946  rm -f -r conftest.dir
55947fi
55948
55949# Standard set of common directories for X headers.
55950# Check X11 before X11Rn because it is often a symlink to the current release.
55951ac_x_header_dirs='
55952/usr/X11/include
55953/usr/X11R7/include
55954/usr/X11R6/include
55955/usr/X11R5/include
55956/usr/X11R4/include
55957
55958/usr/include/X11
55959/usr/include/X11R7
55960/usr/include/X11R6
55961/usr/include/X11R5
55962/usr/include/X11R4
55963
55964/usr/local/X11/include
55965/usr/local/X11R7/include
55966/usr/local/X11R6/include
55967/usr/local/X11R5/include
55968/usr/local/X11R4/include
55969
55970/usr/local/include/X11
55971/usr/local/include/X11R7
55972/usr/local/include/X11R6
55973/usr/local/include/X11R5
55974/usr/local/include/X11R4
55975
55976/usr/X386/include
55977/usr/x386/include
55978/usr/XFree86/include/X11
55979
55980/usr/include
55981/usr/local/include
55982/usr/unsupported/include
55983/usr/athena/include
55984/usr/local/x11r5/include
55985/usr/lpp/Xamples/include
55986
55987/usr/openwin/include
55988/usr/openwin/share/include'
55989
55990if test "$ac_x_includes" = no; then
55991  # Guess where to find include files, by looking for Xlib.h.
55992  # First, try using that file with no special directory specified.
55993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55994/* end confdefs.h.  */
55995#include <X11/Xlib.h>
55996_ACEOF
55997if ac_fn_cxx_try_cpp "$LINENO"; then :
55998  # We can compile using X headers with no special include directory.
55999ac_x_includes=
56000else
56001  for ac_dir in $ac_x_header_dirs; do
56002  if test -r "$ac_dir/X11/Xlib.h"; then
56003    ac_x_includes=$ac_dir
56004    break
56005  fi
56006done
56007fi
56008rm -f conftest.err conftest.i conftest.$ac_ext
56009fi # $ac_x_includes = no
56010
56011if test "$ac_x_libraries" = no; then
56012  # Check for the libraries.
56013  # See if we find them without any special options.
56014  # Don't add to $LIBS permanently.
56015  ac_save_LIBS=$LIBS
56016  LIBS="-lX11 $LIBS"
56017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56018/* end confdefs.h.  */
56019#include <X11/Xlib.h>
56020int
56021main ()
56022{
56023XrmInitialize ()
56024  ;
56025  return 0;
56026}
56027_ACEOF
56028if ac_fn_cxx_try_link "$LINENO"; then :
56029  LIBS=$ac_save_LIBS
56030# We can link X programs with no special library path.
56031ac_x_libraries=
56032else
56033  LIBS=$ac_save_LIBS
56034for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56035do
56036  # Don't even attempt the hair of trying to link an X program!
56037  for ac_extension in a so sl dylib la dll; do
56038    if test -r "$ac_dir/libX11.$ac_extension"; then
56039      ac_x_libraries=$ac_dir
56040      break 2
56041    fi
56042  done
56043done
56044fi
56045rm -f core conftest.err conftest.$ac_objext \
56046    conftest$ac_exeext conftest.$ac_ext
56047fi # $ac_x_libraries = no
56048
56049case $ac_x_includes,$ac_x_libraries in #(
56050  no,* | *,no | *\'*)
56051    # Didn't find X, or a directory has "'" in its name.
56052    ac_cv_have_x="have_x=no";; #(
56053  *)
56054    # Record where we found X for the cache.
56055    ac_cv_have_x="have_x=yes\
56056	ac_x_includes='$ac_x_includes'\
56057	ac_x_libraries='$ac_x_libraries'"
56058esac
56059fi
56060;; #(
56061    *) have_x=yes;;
56062  esac
56063  eval "$ac_cv_have_x"
56064fi # $with_x != no
56065
56066if test "$have_x" != yes; then
56067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56068$as_echo "$have_x" >&6; }
56069  no_x=yes
56070else
56071  # If each of the values was on the command line, it overrides each guess.
56072  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56073  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56074  # Update the cache value to reflect the command line values.
56075  ac_cv_have_x="have_x=yes\
56076	ac_x_includes='$x_includes'\
56077	ac_x_libraries='$x_libraries'"
56078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56079$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56080fi
56081
56082    if test "$no_x" = yes; then
56083  # Not all programs may use this symbol, but it does not hurt to define it.
56084
56085$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56086
56087  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56088else
56089  if test -n "$x_includes"; then
56090    X_CFLAGS="$X_CFLAGS -I$x_includes"
56091  fi
56092
56093  # It would also be nice to do this for all -L options, not just this one.
56094  if test -n "$x_libraries"; then
56095    X_LIBS="$X_LIBS -L$x_libraries"
56096    # For Solaris; some versions of Sun CC require a space after -R and
56097    # others require no space.  Words are not sufficient . . . .
56098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56099$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56100    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56101    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56102    ac_cxx_werror_flag=yes
56103    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56104/* end confdefs.h.  */
56105
56106int
56107main ()
56108{
56109
56110  ;
56111  return 0;
56112}
56113_ACEOF
56114if ac_fn_cxx_try_link "$LINENO"; then :
56115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56116$as_echo "no" >&6; }
56117       X_LIBS="$X_LIBS -R$x_libraries"
56118else
56119  LIBS="$ac_xsave_LIBS -R $x_libraries"
56120       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56121/* end confdefs.h.  */
56122
56123int
56124main ()
56125{
56126
56127  ;
56128  return 0;
56129}
56130_ACEOF
56131if ac_fn_cxx_try_link "$LINENO"; then :
56132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56133$as_echo "yes" >&6; }
56134	  X_LIBS="$X_LIBS -R $x_libraries"
56135else
56136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56137$as_echo "neither works" >&6; }
56138fi
56139rm -f core conftest.err conftest.$ac_objext \
56140    conftest$ac_exeext conftest.$ac_ext
56141fi
56142rm -f core conftest.err conftest.$ac_objext \
56143    conftest$ac_exeext conftest.$ac_ext
56144    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56145    LIBS=$ac_xsave_LIBS
56146  fi
56147
56148  # Check for system-dependent libraries X programs must link with.
56149  # Do this before checking for the system-independent R6 libraries
56150  # (-lICE), since we may need -lsocket or whatever for X linking.
56151
56152  if test "$ISC" = yes; then
56153    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56154  else
56155    # Martyn Johnson says this is needed for Ultrix, if the X
56156    # libraries were built with DECnet support.  And Karl Berry says
56157    # the Alpha needs dnet_stub (dnet does not exist).
56158    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56159    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56160/* end confdefs.h.  */
56161
56162/* Override any GCC internal prototype to avoid an error.
56163   Use char because int might match the return type of a GCC
56164   builtin and then its argument prototype would still apply.  */
56165#ifdef __cplusplus
56166extern "C"
56167#endif
56168char XOpenDisplay ();
56169int
56170main ()
56171{
56172return XOpenDisplay ();
56173  ;
56174  return 0;
56175}
56176_ACEOF
56177if ac_fn_cxx_try_link "$LINENO"; then :
56178
56179else
56180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56181$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56182if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56183  $as_echo_n "(cached) " >&6
56184else
56185  ac_check_lib_save_LIBS=$LIBS
56186LIBS="-ldnet  $LIBS"
56187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56188/* end confdefs.h.  */
56189
56190/* Override any GCC internal prototype to avoid an error.
56191   Use char because int might match the return type of a GCC
56192   builtin and then its argument prototype would still apply.  */
56193#ifdef __cplusplus
56194extern "C"
56195#endif
56196char dnet_ntoa ();
56197int
56198main ()
56199{
56200return dnet_ntoa ();
56201  ;
56202  return 0;
56203}
56204_ACEOF
56205if ac_fn_cxx_try_link "$LINENO"; then :
56206  ac_cv_lib_dnet_dnet_ntoa=yes
56207else
56208  ac_cv_lib_dnet_dnet_ntoa=no
56209fi
56210rm -f core conftest.err conftest.$ac_objext \
56211    conftest$ac_exeext conftest.$ac_ext
56212LIBS=$ac_check_lib_save_LIBS
56213fi
56214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56215$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56216if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56217  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56218fi
56219
56220    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56221      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56222$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56223if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56224  $as_echo_n "(cached) " >&6
56225else
56226  ac_check_lib_save_LIBS=$LIBS
56227LIBS="-ldnet_stub  $LIBS"
56228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56229/* end confdefs.h.  */
56230
56231/* Override any GCC internal prototype to avoid an error.
56232   Use char because int might match the return type of a GCC
56233   builtin and then its argument prototype would still apply.  */
56234#ifdef __cplusplus
56235extern "C"
56236#endif
56237char dnet_ntoa ();
56238int
56239main ()
56240{
56241return dnet_ntoa ();
56242  ;
56243  return 0;
56244}
56245_ACEOF
56246if ac_fn_cxx_try_link "$LINENO"; then :
56247  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56248else
56249  ac_cv_lib_dnet_stub_dnet_ntoa=no
56250fi
56251rm -f core conftest.err conftest.$ac_objext \
56252    conftest$ac_exeext conftest.$ac_ext
56253LIBS=$ac_check_lib_save_LIBS
56254fi
56255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56256$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56257if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56258  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56259fi
56260
56261    fi
56262fi
56263rm -f core conftest.err conftest.$ac_objext \
56264    conftest$ac_exeext conftest.$ac_ext
56265    LIBS="$ac_xsave_LIBS"
56266
56267    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56268    # to get the SysV transport functions.
56269    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56270    # needs -lnsl.
56271    # The nsl library prevents programs from opening the X display
56272    # on Irix 5.2, according to T.E. Dickey.
56273    # The functions gethostbyname, getservbyname, and inet_addr are
56274    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56275    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56276if test "x$ac_cv_func_gethostbyname" = xyes; then :
56277
56278fi
56279
56280    if test $ac_cv_func_gethostbyname = no; then
56281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56282$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56283if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56284  $as_echo_n "(cached) " >&6
56285else
56286  ac_check_lib_save_LIBS=$LIBS
56287LIBS="-lnsl  $LIBS"
56288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56289/* end confdefs.h.  */
56290
56291/* Override any GCC internal prototype to avoid an error.
56292   Use char because int might match the return type of a GCC
56293   builtin and then its argument prototype would still apply.  */
56294#ifdef __cplusplus
56295extern "C"
56296#endif
56297char gethostbyname ();
56298int
56299main ()
56300{
56301return gethostbyname ();
56302  ;
56303  return 0;
56304}
56305_ACEOF
56306if ac_fn_cxx_try_link "$LINENO"; then :
56307  ac_cv_lib_nsl_gethostbyname=yes
56308else
56309  ac_cv_lib_nsl_gethostbyname=no
56310fi
56311rm -f core conftest.err conftest.$ac_objext \
56312    conftest$ac_exeext conftest.$ac_ext
56313LIBS=$ac_check_lib_save_LIBS
56314fi
56315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56316$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56317if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56318  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56319fi
56320
56321      if test $ac_cv_lib_nsl_gethostbyname = no; then
56322	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56323$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56324if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56325  $as_echo_n "(cached) " >&6
56326else
56327  ac_check_lib_save_LIBS=$LIBS
56328LIBS="-lbsd  $LIBS"
56329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56330/* end confdefs.h.  */
56331
56332/* Override any GCC internal prototype to avoid an error.
56333   Use char because int might match the return type of a GCC
56334   builtin and then its argument prototype would still apply.  */
56335#ifdef __cplusplus
56336extern "C"
56337#endif
56338char gethostbyname ();
56339int
56340main ()
56341{
56342return gethostbyname ();
56343  ;
56344  return 0;
56345}
56346_ACEOF
56347if ac_fn_cxx_try_link "$LINENO"; then :
56348  ac_cv_lib_bsd_gethostbyname=yes
56349else
56350  ac_cv_lib_bsd_gethostbyname=no
56351fi
56352rm -f core conftest.err conftest.$ac_objext \
56353    conftest$ac_exeext conftest.$ac_ext
56354LIBS=$ac_check_lib_save_LIBS
56355fi
56356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56357$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56358if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56359  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56360fi
56361
56362      fi
56363    fi
56364
56365    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56366    # socket/setsockopt and other routines are undefined under SCO ODT
56367    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56368    # on later versions), says Simon Leinen: it contains gethostby*
56369    # variants that don't use the name server (or something).  -lsocket
56370    # must be given before -lnsl if both are needed.  We assume that
56371    # if connect needs -lnsl, so does gethostbyname.
56372    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56373if test "x$ac_cv_func_connect" = xyes; then :
56374
56375fi
56376
56377    if test $ac_cv_func_connect = no; then
56378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56379$as_echo_n "checking for connect in -lsocket... " >&6; }
56380if ${ac_cv_lib_socket_connect+:} false; then :
56381  $as_echo_n "(cached) " >&6
56382else
56383  ac_check_lib_save_LIBS=$LIBS
56384LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56386/* end confdefs.h.  */
56387
56388/* Override any GCC internal prototype to avoid an error.
56389   Use char because int might match the return type of a GCC
56390   builtin and then its argument prototype would still apply.  */
56391#ifdef __cplusplus
56392extern "C"
56393#endif
56394char connect ();
56395int
56396main ()
56397{
56398return connect ();
56399  ;
56400  return 0;
56401}
56402_ACEOF
56403if ac_fn_cxx_try_link "$LINENO"; then :
56404  ac_cv_lib_socket_connect=yes
56405else
56406  ac_cv_lib_socket_connect=no
56407fi
56408rm -f core conftest.err conftest.$ac_objext \
56409    conftest$ac_exeext conftest.$ac_ext
56410LIBS=$ac_check_lib_save_LIBS
56411fi
56412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56413$as_echo "$ac_cv_lib_socket_connect" >&6; }
56414if test "x$ac_cv_lib_socket_connect" = xyes; then :
56415  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56416fi
56417
56418    fi
56419
56420    # Guillermo Gomez says -lposix is necessary on A/UX.
56421    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56422if test "x$ac_cv_func_remove" = xyes; then :
56423
56424fi
56425
56426    if test $ac_cv_func_remove = no; then
56427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56428$as_echo_n "checking for remove in -lposix... " >&6; }
56429if ${ac_cv_lib_posix_remove+:} false; then :
56430  $as_echo_n "(cached) " >&6
56431else
56432  ac_check_lib_save_LIBS=$LIBS
56433LIBS="-lposix  $LIBS"
56434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56435/* end confdefs.h.  */
56436
56437/* Override any GCC internal prototype to avoid an error.
56438   Use char because int might match the return type of a GCC
56439   builtin and then its argument prototype would still apply.  */
56440#ifdef __cplusplus
56441extern "C"
56442#endif
56443char remove ();
56444int
56445main ()
56446{
56447return remove ();
56448  ;
56449  return 0;
56450}
56451_ACEOF
56452if ac_fn_cxx_try_link "$LINENO"; then :
56453  ac_cv_lib_posix_remove=yes
56454else
56455  ac_cv_lib_posix_remove=no
56456fi
56457rm -f core conftest.err conftest.$ac_objext \
56458    conftest$ac_exeext conftest.$ac_ext
56459LIBS=$ac_check_lib_save_LIBS
56460fi
56461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56462$as_echo "$ac_cv_lib_posix_remove" >&6; }
56463if test "x$ac_cv_lib_posix_remove" = xyes; then :
56464  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56465fi
56466
56467    fi
56468
56469    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56470    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56471if test "x$ac_cv_func_shmat" = xyes; then :
56472
56473fi
56474
56475    if test $ac_cv_func_shmat = no; then
56476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56477$as_echo_n "checking for shmat in -lipc... " >&6; }
56478if ${ac_cv_lib_ipc_shmat+:} false; then :
56479  $as_echo_n "(cached) " >&6
56480else
56481  ac_check_lib_save_LIBS=$LIBS
56482LIBS="-lipc  $LIBS"
56483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56484/* end confdefs.h.  */
56485
56486/* Override any GCC internal prototype to avoid an error.
56487   Use char because int might match the return type of a GCC
56488   builtin and then its argument prototype would still apply.  */
56489#ifdef __cplusplus
56490extern "C"
56491#endif
56492char shmat ();
56493int
56494main ()
56495{
56496return shmat ();
56497  ;
56498  return 0;
56499}
56500_ACEOF
56501if ac_fn_cxx_try_link "$LINENO"; then :
56502  ac_cv_lib_ipc_shmat=yes
56503else
56504  ac_cv_lib_ipc_shmat=no
56505fi
56506rm -f core conftest.err conftest.$ac_objext \
56507    conftest$ac_exeext conftest.$ac_ext
56508LIBS=$ac_check_lib_save_LIBS
56509fi
56510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56511$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56512if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56513  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56514fi
56515
56516    fi
56517  fi
56518
56519  # Check for libraries that X11R6 Xt/Xaw programs need.
56520  ac_save_LDFLAGS=$LDFLAGS
56521  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56522  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56523  # check for ICE first), but we must link in the order -lSM -lICE or
56524  # we get undefined symbols.  So assume we have SM if we have ICE.
56525  # These have to be linked with before -lX11, unlike the other
56526  # libraries we check for below, so use a different variable.
56527  # John Interrante, Karl Berry
56528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56529$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56530if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56531  $as_echo_n "(cached) " >&6
56532else
56533  ac_check_lib_save_LIBS=$LIBS
56534LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56536/* end confdefs.h.  */
56537
56538/* Override any GCC internal prototype to avoid an error.
56539   Use char because int might match the return type of a GCC
56540   builtin and then its argument prototype would still apply.  */
56541#ifdef __cplusplus
56542extern "C"
56543#endif
56544char IceConnectionNumber ();
56545int
56546main ()
56547{
56548return IceConnectionNumber ();
56549  ;
56550  return 0;
56551}
56552_ACEOF
56553if ac_fn_cxx_try_link "$LINENO"; then :
56554  ac_cv_lib_ICE_IceConnectionNumber=yes
56555else
56556  ac_cv_lib_ICE_IceConnectionNumber=no
56557fi
56558rm -f core conftest.err conftest.$ac_objext \
56559    conftest$ac_exeext conftest.$ac_ext
56560LIBS=$ac_check_lib_save_LIBS
56561fi
56562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56563$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56564if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56565  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56566fi
56567
56568  LDFLAGS=$ac_save_LDFLAGS
56569
56570fi
56571
56572
56573    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56574    # this doesn't make sense so we remove it.
56575    if test "x$COMPILE_TYPE" = xcross; then
56576      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56577    fi
56578
56579    if test "x$no_x" = xyes; then
56580
56581  # Print a helpful message on how to acquire the necessary build dependency.
56582  # x11 is the help tag: freetype, cups, alsa etc
56583  MISSING_DEPENDENCY=x11
56584
56585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56586    cygwin_help $MISSING_DEPENDENCY
56587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56588    msys_help $MISSING_DEPENDENCY
56589  else
56590    PKGHANDLER_COMMAND=
56591
56592    case $PKGHANDLER in
56593      apt-get)
56594        apt_help     $MISSING_DEPENDENCY ;;
56595      yum)
56596        yum_help     $MISSING_DEPENDENCY ;;
56597      brew)
56598        brew_help    $MISSING_DEPENDENCY ;;
56599      port)
56600        port_help    $MISSING_DEPENDENCY ;;
56601      pkgutil)
56602        pkgutil_help $MISSING_DEPENDENCY ;;
56603      pkgadd)
56604        pkgadd_help  $MISSING_DEPENDENCY ;;
56605    esac
56606
56607    if test "x$PKGHANDLER_COMMAND" != x; then
56608      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56609    fi
56610  fi
56611
56612      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56613    fi
56614
56615    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56616      OPENWIN_HOME="/usr/openwin"
56617      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56618      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56619          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56620    fi
56621
56622    ac_ext=c
56623ac_cpp='$CPP $CPPFLAGS'
56624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56626ac_compiler_gnu=$ac_cv_c_compiler_gnu
56627
56628    OLD_CFLAGS="$CFLAGS"
56629    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56630
56631    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56632    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56633do :
56634  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56635ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56636          # include <X11/Xlib.h>
56637          # include <X11/Xutil.h>
56638
56639
56640"
56641if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56642  cat >>confdefs.h <<_ACEOF
56643#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56644_ACEOF
56645 X11_HEADERS_OK=yes
56646else
56647  X11_HEADERS_OK=no; break
56648fi
56649
56650done
56651
56652
56653    if test "x$X11_HEADERS_OK" = xno; then
56654
56655  # Print a helpful message on how to acquire the necessary build dependency.
56656  # x11 is the help tag: freetype, cups, alsa etc
56657  MISSING_DEPENDENCY=x11
56658
56659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56660    cygwin_help $MISSING_DEPENDENCY
56661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56662    msys_help $MISSING_DEPENDENCY
56663  else
56664    PKGHANDLER_COMMAND=
56665
56666    case $PKGHANDLER in
56667      apt-get)
56668        apt_help     $MISSING_DEPENDENCY ;;
56669      yum)
56670        yum_help     $MISSING_DEPENDENCY ;;
56671      brew)
56672        brew_help    $MISSING_DEPENDENCY ;;
56673      port)
56674        port_help    $MISSING_DEPENDENCY ;;
56675      pkgutil)
56676        pkgutil_help $MISSING_DEPENDENCY ;;
56677      pkgadd)
56678        pkgadd_help  $MISSING_DEPENDENCY ;;
56679    esac
56680
56681    if test "x$PKGHANDLER_COMMAND" != x; then
56682      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56683    fi
56684  fi
56685
56686      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56687    fi
56688
56689    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56690    # defined in libawt_xawt.
56691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56692$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56693    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56694/* end confdefs.h.  */
56695#include <X11/extensions/Xrender.h>
56696int
56697main ()
56698{
56699XLinearGradient x;
56700  ;
56701  return 0;
56702}
56703_ACEOF
56704if ac_fn_c_try_compile "$LINENO"; then :
56705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56706$as_echo "yes" >&6; }
56707else
56708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56709$as_echo "no" >&6; }
56710         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56711fi
56712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56713
56714    CFLAGS="$OLD_CFLAGS"
56715    ac_ext=cpp
56716ac_cpp='$CXXCPP $CPPFLAGS'
56717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56720
56721  fi # NEEDS_LIB_X11
56722
56723
56724
56725
56726
56727
56728# Check whether --with-cups was given.
56729if test "${with_cups+set}" = set; then :
56730  withval=$with_cups;
56731fi
56732
56733
56734# Check whether --with-cups-include was given.
56735if test "${with_cups_include+set}" = set; then :
56736  withval=$with_cups_include;
56737fi
56738
56739
56740  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56741    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56742        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56743      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56744$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56745    fi
56746    CUPS_CFLAGS=
56747  else
56748    CUPS_FOUND=no
56749
56750    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56751      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56752    fi
56753
56754    if test "x${with_cups}" != x; then
56755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56756$as_echo_n "checking for cups headers... " >&6; }
56757      if test -s "${with_cups}/include/cups/cups.h"; then
56758        CUPS_CFLAGS="-I${with_cups}/include"
56759        CUPS_FOUND=yes
56760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56761$as_echo "$CUPS_FOUND" >&6; }
56762      else
56763        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56764      fi
56765    fi
56766    if test "x${with_cups_include}" != x; then
56767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56768$as_echo_n "checking for cups headers... " >&6; }
56769      if test -s "${with_cups_include}/cups/cups.h"; then
56770        CUPS_CFLAGS="-I${with_cups_include}"
56771        CUPS_FOUND=yes
56772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56773$as_echo "$CUPS_FOUND" >&6; }
56774      else
56775        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56776      fi
56777    fi
56778    if test "x$CUPS_FOUND" = xno; then
56779      # Are the cups headers installed in the default /usr/include location?
56780      for ac_header in cups/cups.h cups/ppd.h
56781do :
56782  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56783ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56784if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56785  cat >>confdefs.h <<_ACEOF
56786#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56787_ACEOF
56788
56789          CUPS_FOUND=yes
56790          CUPS_CFLAGS=
56791          DEFAULT_CUPS=yes
56792
56793fi
56794
56795done
56796
56797    fi
56798    if test "x$CUPS_FOUND" = xno; then
56799
56800  # Print a helpful message on how to acquire the necessary build dependency.
56801  # cups is the help tag: freetype, cups, alsa etc
56802  MISSING_DEPENDENCY=cups
56803
56804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56805    cygwin_help $MISSING_DEPENDENCY
56806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56807    msys_help $MISSING_DEPENDENCY
56808  else
56809    PKGHANDLER_COMMAND=
56810
56811    case $PKGHANDLER in
56812      apt-get)
56813        apt_help     $MISSING_DEPENDENCY ;;
56814      yum)
56815        yum_help     $MISSING_DEPENDENCY ;;
56816      brew)
56817        brew_help    $MISSING_DEPENDENCY ;;
56818      port)
56819        port_help    $MISSING_DEPENDENCY ;;
56820      pkgutil)
56821        pkgutil_help $MISSING_DEPENDENCY ;;
56822      pkgadd)
56823        pkgadd_help  $MISSING_DEPENDENCY ;;
56824    esac
56825
56826    if test "x$PKGHANDLER_COMMAND" != x; then
56827      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56828    fi
56829  fi
56830
56831      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56832    fi
56833  fi
56834
56835
56836
56837
56838
56839# Check whether --with-freetype was given.
56840if test "${with_freetype+set}" = set; then :
56841  withval=$with_freetype;
56842fi
56843
56844
56845# Check whether --with-freetype-include was given.
56846if test "${with_freetype_include+set}" = set; then :
56847  withval=$with_freetype_include;
56848fi
56849
56850
56851# Check whether --with-freetype-lib was given.
56852if test "${with_freetype_lib+set}" = set; then :
56853  withval=$with_freetype_lib;
56854fi
56855
56856
56857# Check whether --with-freetype-src was given.
56858if test "${with_freetype_src+set}" = set; then :
56859  withval=$with_freetype_src;
56860fi
56861
56862  # Check whether --enable-freetype-bundling was given.
56863if test "${enable_freetype_bundling+set}" = set; then :
56864  enableval=$enable_freetype_bundling;
56865fi
56866
56867
56868  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56869  FREETYPE_BASE_NAME=freetype
56870  FREETYPE_CFLAGS=
56871  FREETYPE_LIBS=
56872  FREETYPE_BUNDLE_LIB_PATH=
56873
56874  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56875    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56876        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56877        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56878        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56879      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56880$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56881    fi
56882    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56883      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56884$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56885    fi
56886  else
56887    # freetype is needed to build; go get it!
56888
56889    BUNDLE_FREETYPE="$enable_freetype_bundling"
56890
56891    if  test "x$with_freetype_src" != x; then
56892      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56893        # Try to build freetype if --with-freetype-src was given on Windows
56894
56895  FREETYPE_SRC_PATH="$with_freetype_src"
56896  BUILD_FREETYPE=yes
56897
56898  # Check if the freetype sources are acessible..
56899  if ! test -d $FREETYPE_SRC_PATH; then
56900    { $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
56901$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56902    BUILD_FREETYPE=no
56903  fi
56904  # ..and contain a vc2010 project file
56905  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56906  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56907    { $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
56908$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56909    BUILD_FREETYPE=no
56910  fi
56911  # Now check if configure found a version of 'msbuild.exe'
56912  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56913    { $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
56914$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;}
56915    BUILD_FREETYPE=no
56916  fi
56917
56918  # Ready to go..
56919  if test "x$BUILD_FREETYPE" = xyes; then
56920    # msbuild requires trailing slashes for output directories
56921    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56922    freetype_lib_path_unix="$freetype_lib_path"
56923    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56924
56925  unix_path="$vcxproj_path"
56926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56927    windows_path=`$CYGPATH -m "$unix_path"`
56928    vcxproj_path="$windows_path"
56929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56930    windows_path=`cmd //c echo $unix_path`
56931    vcxproj_path="$windows_path"
56932  fi
56933
56934
56935  unix_path="$freetype_lib_path"
56936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56937    windows_path=`$CYGPATH -m "$unix_path"`
56938    freetype_lib_path="$windows_path"
56939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56940    windows_path=`cmd //c echo $unix_path`
56941    freetype_lib_path="$windows_path"
56942  fi
56943
56944
56945  unix_path="$freetype_obj_path"
56946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56947    windows_path=`$CYGPATH -m "$unix_path"`
56948    freetype_obj_path="$windows_path"
56949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56950    windows_path=`cmd //c echo $unix_path`
56951    freetype_obj_path="$windows_path"
56952  fi
56953
56954    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56955      freetype_platform=x64
56956    else
56957      freetype_platform=win32
56958    fi
56959
56960    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56961    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56962    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56963    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56964    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56965$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56966
56967    # First we try to build the freetype.dll
56968    $ECHO -e "@echo off\n"\
56969        "$MSBUILD $vcxproj_path "\
56970        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56971        "/p:Configuration=\"Release Multithreaded\" "\
56972        "/p:Platform=$freetype_platform "\
56973        "/p:ConfigurationType=DynamicLibrary "\
56974        "/p:TargetName=freetype "\
56975        "/p:OutDir=\"$freetype_lib_path\" "\
56976        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56977    cmd /c freetype.bat
56978
56979    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56980      # If that succeeds we also build freetype.lib
56981      $ECHO -e "@echo off\n"\
56982          "$MSBUILD $vcxproj_path "\
56983          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56984          "/p:Configuration=\"Release Multithreaded\" "\
56985          "/p:Platform=$freetype_platform "\
56986          "/p:ConfigurationType=StaticLibrary "\
56987          "/p:TargetName=freetype "\
56988          "/p:OutDir=\"$freetype_lib_path\" "\
56989          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56990      cmd /c freetype.bat
56991
56992      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56993        # Once we build both, lib and dll, set freetype lib and include path appropriately
56994        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56995        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56996        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56997$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56998      else
56999        BUILD_FREETYPE=no
57000      fi
57001    else
57002      BUILD_FREETYPE=no
57003    fi
57004  fi
57005
57006        if test "x$BUILD_FREETYPE" = xyes; then
57007          # Okay, we built it. Check that it works.
57008
57009  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57010  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57011  METHOD="--with-freetype-src"
57012
57013  # Let's start with an optimistic view of the world :-)
57014  FOUND_FREETYPE=yes
57015
57016  # First look for the canonical freetype main include file ft2build.h.
57017  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57018    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57019    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57020    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57021      # Fail.
57022      FOUND_FREETYPE=no
57023    fi
57024  fi
57025
57026  if test "x$FOUND_FREETYPE" = xyes; then
57027    # Include file found, let's continue the sanity check.
57028    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57029$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57030
57031    # Reset to default value
57032    FREETYPE_BASE_NAME=freetype
57033    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57034    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57035      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57036          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57037        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57038        # for the .6 version explicitly.
57039        FREETYPE_BASE_NAME=freetype.6
57040        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57041        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57042$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57043      else
57044        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57045$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57046        FOUND_FREETYPE=no
57047      fi
57048    else
57049      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57050        # On Windows, we will need both .lib and .dll file.
57051        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57052          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57053$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57054          FOUND_FREETYPE=no
57055        fi
57056      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57057          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57058        # Found lib in isa dir, use that instead.
57059        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57060        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57061$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57062      fi
57063    fi
57064  fi
57065
57066  if test "x$FOUND_FREETYPE" = xyes; then
57067
57068  # Only process if variable expands to non-empty
57069
57070  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57072
57073  # Input might be given as Windows format, start by converting to
57074  # unix format.
57075  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57076  new_path=`$CYGPATH -u "$path"`
57077
57078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57081  # "foo.exe" is OK but "foo" is an error.
57082  #
57083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57084  # It is also a way to make sure we got the proper file name for the real test later on.
57085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57086  if test "x$test_shortpath" = x; then
57087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57089    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57090  fi
57091
57092  # Call helper function which possibly converts this using DOS-style short mode.
57093  # If so, the updated path is stored in $new_path.
57094
57095  input_path="$new_path"
57096  # Check if we need to convert this using DOS-style short mode. If the path
57097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57098  # take no chances and rewrite it.
57099  # Note: m4 eats our [], so we need to use [ and ] instead.
57100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57101  if test "x$has_forbidden_chars" != x; then
57102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57106      # Going to short mode and back again did indeed matter. Since short mode is
57107      # case insensitive, let's make it lowercase to improve readability.
57108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57109      # Now convert it back to Unix-style (cygpath)
57110      input_path=`$CYGPATH -u "$shortmode_path"`
57111      new_path="$input_path"
57112    fi
57113  fi
57114
57115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57116  if test "x$test_cygdrive_prefix" = x; then
57117    # As a simple fix, exclude /usr/bin since it's not a real path.
57118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57120      # a path prefixed by /cygdrive for fixpath to work.
57121      new_path="$CYGWIN_ROOT_PATH$input_path"
57122    fi
57123  fi
57124
57125
57126  if test "x$path" != "x$new_path"; then
57127    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57130  fi
57131
57132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57133
57134  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57135  has_colon=`$ECHO $path | $GREP ^.:`
57136  new_path="$path"
57137  if test "x$has_colon" = x; then
57138    # Not in mixed or Windows style, start by that.
57139    new_path=`cmd //c echo $path`
57140  fi
57141
57142
57143  input_path="$new_path"
57144  # Check if we need to convert this using DOS-style short mode. If the path
57145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57146  # take no chances and rewrite it.
57147  # Note: m4 eats our [], so we need to use [ and ] instead.
57148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57149  if test "x$has_forbidden_chars" != x; then
57150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57152  fi
57153
57154
57155  windows_path="$new_path"
57156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57157    unix_path=`$CYGPATH -u "$windows_path"`
57158    new_path="$unix_path"
57159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57161    new_path="$unix_path"
57162  fi
57163
57164  if test "x$path" != "x$new_path"; then
57165    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57168  fi
57169
57170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57172
57173    else
57174      # We're on a unix platform. Hooray! :)
57175      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57176      has_space=`$ECHO "$path" | $GREP " "`
57177      if test "x$has_space" != x; then
57178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57181      fi
57182
57183      # Use eval to expand a potential ~
57184      eval path="$path"
57185      if test ! -f "$path" && test ! -d "$path"; then
57186        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57187      fi
57188
57189      if test -d "$path"; then
57190        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57191      else
57192        dir="`$DIRNAME "$path"`"
57193        base="`$BASENAME "$path"`"
57194        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57195      fi
57196    fi
57197  fi
57198
57199
57200  # Only process if variable expands to non-empty
57201
57202  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57204
57205  # Input might be given as Windows format, start by converting to
57206  # unix format.
57207  path="$POTENTIAL_FREETYPE_LIB_PATH"
57208  new_path=`$CYGPATH -u "$path"`
57209
57210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57213  # "foo.exe" is OK but "foo" is an error.
57214  #
57215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57216  # It is also a way to make sure we got the proper file name for the real test later on.
57217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57218  if test "x$test_shortpath" = x; then
57219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57220$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57221    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57222  fi
57223
57224  # Call helper function which possibly converts this using DOS-style short mode.
57225  # If so, the updated path is stored in $new_path.
57226
57227  input_path="$new_path"
57228  # Check if we need to convert this using DOS-style short mode. If the path
57229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57230  # take no chances and rewrite it.
57231  # Note: m4 eats our [], so we need to use [ and ] instead.
57232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57233  if test "x$has_forbidden_chars" != x; then
57234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57238      # Going to short mode and back again did indeed matter. Since short mode is
57239      # case insensitive, let's make it lowercase to improve readability.
57240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57241      # Now convert it back to Unix-style (cygpath)
57242      input_path=`$CYGPATH -u "$shortmode_path"`
57243      new_path="$input_path"
57244    fi
57245  fi
57246
57247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57248  if test "x$test_cygdrive_prefix" = x; then
57249    # As a simple fix, exclude /usr/bin since it's not a real path.
57250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57252      # a path prefixed by /cygdrive for fixpath to work.
57253      new_path="$CYGWIN_ROOT_PATH$input_path"
57254    fi
57255  fi
57256
57257
57258  if test "x$path" != "x$new_path"; then
57259    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57261$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57262  fi
57263
57264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57265
57266  path="$POTENTIAL_FREETYPE_LIB_PATH"
57267  has_colon=`$ECHO $path | $GREP ^.:`
57268  new_path="$path"
57269  if test "x$has_colon" = x; then
57270    # Not in mixed or Windows style, start by that.
57271    new_path=`cmd //c echo $path`
57272  fi
57273
57274
57275  input_path="$new_path"
57276  # Check if we need to convert this using DOS-style short mode. If the path
57277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57278  # take no chances and rewrite it.
57279  # Note: m4 eats our [], so we need to use [ and ] instead.
57280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57281  if test "x$has_forbidden_chars" != x; then
57282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57284  fi
57285
57286
57287  windows_path="$new_path"
57288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57289    unix_path=`$CYGPATH -u "$windows_path"`
57290    new_path="$unix_path"
57291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57293    new_path="$unix_path"
57294  fi
57295
57296  if test "x$path" != "x$new_path"; then
57297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57300  fi
57301
57302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57304
57305    else
57306      # We're on a unix platform. Hooray! :)
57307      path="$POTENTIAL_FREETYPE_LIB_PATH"
57308      has_space=`$ECHO "$path" | $GREP " "`
57309      if test "x$has_space" != x; then
57310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57313      fi
57314
57315      # Use eval to expand a potential ~
57316      eval path="$path"
57317      if test ! -f "$path" && test ! -d "$path"; then
57318        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57319      fi
57320
57321      if test -d "$path"; then
57322        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57323      else
57324        dir="`$DIRNAME "$path"`"
57325        base="`$BASENAME "$path"`"
57326        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57327      fi
57328    fi
57329  fi
57330
57331
57332    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57334$as_echo_n "checking for freetype includes... " >&6; }
57335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57336$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57337    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57339$as_echo_n "checking for freetype libraries... " >&6; }
57340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57341$as_echo "$FREETYPE_LIB_PATH" >&6; }
57342  fi
57343
57344          if test "x$FOUND_FREETYPE" != xyes; then
57345            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57346          fi
57347        else
57348          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57349$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57350          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57351        fi
57352      else
57353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57354$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57355      fi
57356    fi
57357
57358    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57359      # User has specified settings
57360
57361      if test "x$BUNDLE_FREETYPE" = x; then
57362        # If not specified, default is to bundle freetype
57363        BUNDLE_FREETYPE=yes
57364      fi
57365
57366      if test "x$with_freetype" != x; then
57367        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57368        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57369      fi
57370
57371      # Allow --with-freetype-lib and --with-freetype-include to override
57372      if test "x$with_freetype_include" != x; then
57373        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57374      fi
57375      if test "x$with_freetype_lib" != x; then
57376        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57377      fi
57378
57379      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57380        # Okay, we got it. Check that it works.
57381
57382  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57383  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57384  METHOD="--with-freetype"
57385
57386  # Let's start with an optimistic view of the world :-)
57387  FOUND_FREETYPE=yes
57388
57389  # First look for the canonical freetype main include file ft2build.h.
57390  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57391    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57392    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57393    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57394      # Fail.
57395      FOUND_FREETYPE=no
57396    fi
57397  fi
57398
57399  if test "x$FOUND_FREETYPE" = xyes; then
57400    # Include file found, let's continue the sanity check.
57401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57402$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57403
57404    # Reset to default value
57405    FREETYPE_BASE_NAME=freetype
57406    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57407    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57408      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57409          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57410        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57411        # for the .6 version explicitly.
57412        FREETYPE_BASE_NAME=freetype.6
57413        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57414        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57415$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57416      else
57417        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57418$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57419        FOUND_FREETYPE=no
57420      fi
57421    else
57422      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57423        # On Windows, we will need both .lib and .dll file.
57424        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57425          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57426$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57427          FOUND_FREETYPE=no
57428        fi
57429      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57430          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57431        # Found lib in isa dir, use that instead.
57432        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57433        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57434$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57435      fi
57436    fi
57437  fi
57438
57439  if test "x$FOUND_FREETYPE" = xyes; then
57440
57441  # Only process if variable expands to non-empty
57442
57443  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57445
57446  # Input might be given as Windows format, start by converting to
57447  # unix format.
57448  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57449  new_path=`$CYGPATH -u "$path"`
57450
57451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57454  # "foo.exe" is OK but "foo" is an error.
57455  #
57456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57457  # It is also a way to make sure we got the proper file name for the real test later on.
57458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57459  if test "x$test_shortpath" = x; then
57460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57462    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57463  fi
57464
57465  # Call helper function which possibly converts this using DOS-style short mode.
57466  # If so, the updated path is stored in $new_path.
57467
57468  input_path="$new_path"
57469  # Check if we need to convert this using DOS-style short mode. If the path
57470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57471  # take no chances and rewrite it.
57472  # Note: m4 eats our [], so we need to use [ and ] instead.
57473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57474  if test "x$has_forbidden_chars" != x; then
57475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57479      # Going to short mode and back again did indeed matter. Since short mode is
57480      # case insensitive, let's make it lowercase to improve readability.
57481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57482      # Now convert it back to Unix-style (cygpath)
57483      input_path=`$CYGPATH -u "$shortmode_path"`
57484      new_path="$input_path"
57485    fi
57486  fi
57487
57488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57489  if test "x$test_cygdrive_prefix" = x; then
57490    # As a simple fix, exclude /usr/bin since it's not a real path.
57491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57493      # a path prefixed by /cygdrive for fixpath to work.
57494      new_path="$CYGWIN_ROOT_PATH$input_path"
57495    fi
57496  fi
57497
57498
57499  if test "x$path" != "x$new_path"; then
57500    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57503  fi
57504
57505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57506
57507  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57508  has_colon=`$ECHO $path | $GREP ^.:`
57509  new_path="$path"
57510  if test "x$has_colon" = x; then
57511    # Not in mixed or Windows style, start by that.
57512    new_path=`cmd //c echo $path`
57513  fi
57514
57515
57516  input_path="$new_path"
57517  # Check if we need to convert this using DOS-style short mode. If the path
57518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57519  # take no chances and rewrite it.
57520  # Note: m4 eats our [], so we need to use [ and ] instead.
57521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57522  if test "x$has_forbidden_chars" != x; then
57523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57525  fi
57526
57527
57528  windows_path="$new_path"
57529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57530    unix_path=`$CYGPATH -u "$windows_path"`
57531    new_path="$unix_path"
57532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57534    new_path="$unix_path"
57535  fi
57536
57537  if test "x$path" != "x$new_path"; then
57538    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57541  fi
57542
57543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57545
57546    else
57547      # We're on a unix platform. Hooray! :)
57548      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57549      has_space=`$ECHO "$path" | $GREP " "`
57550      if test "x$has_space" != x; then
57551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57554      fi
57555
57556      # Use eval to expand a potential ~
57557      eval path="$path"
57558      if test ! -f "$path" && test ! -d "$path"; then
57559        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57560      fi
57561
57562      if test -d "$path"; then
57563        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57564      else
57565        dir="`$DIRNAME "$path"`"
57566        base="`$BASENAME "$path"`"
57567        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57568      fi
57569    fi
57570  fi
57571
57572
57573  # Only process if variable expands to non-empty
57574
57575  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57577
57578  # Input might be given as Windows format, start by converting to
57579  # unix format.
57580  path="$POTENTIAL_FREETYPE_LIB_PATH"
57581  new_path=`$CYGPATH -u "$path"`
57582
57583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57586  # "foo.exe" is OK but "foo" is an error.
57587  #
57588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57589  # It is also a way to make sure we got the proper file name for the real test later on.
57590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57591  if test "x$test_shortpath" = x; then
57592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57594    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57595  fi
57596
57597  # Call helper function which possibly converts this using DOS-style short mode.
57598  # If so, the updated path is stored in $new_path.
57599
57600  input_path="$new_path"
57601  # Check if we need to convert this using DOS-style short mode. If the path
57602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57603  # take no chances and rewrite it.
57604  # Note: m4 eats our [], so we need to use [ and ] instead.
57605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57606  if test "x$has_forbidden_chars" != x; then
57607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57611      # Going to short mode and back again did indeed matter. Since short mode is
57612      # case insensitive, let's make it lowercase to improve readability.
57613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57614      # Now convert it back to Unix-style (cygpath)
57615      input_path=`$CYGPATH -u "$shortmode_path"`
57616      new_path="$input_path"
57617    fi
57618  fi
57619
57620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57621  if test "x$test_cygdrive_prefix" = x; then
57622    # As a simple fix, exclude /usr/bin since it's not a real path.
57623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57625      # a path prefixed by /cygdrive for fixpath to work.
57626      new_path="$CYGWIN_ROOT_PATH$input_path"
57627    fi
57628  fi
57629
57630
57631  if test "x$path" != "x$new_path"; then
57632    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57635  fi
57636
57637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57638
57639  path="$POTENTIAL_FREETYPE_LIB_PATH"
57640  has_colon=`$ECHO $path | $GREP ^.:`
57641  new_path="$path"
57642  if test "x$has_colon" = x; then
57643    # Not in mixed or Windows style, start by that.
57644    new_path=`cmd //c echo $path`
57645  fi
57646
57647
57648  input_path="$new_path"
57649  # Check if we need to convert this using DOS-style short mode. If the path
57650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57651  # take no chances and rewrite it.
57652  # Note: m4 eats our [], so we need to use [ and ] instead.
57653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57654  if test "x$has_forbidden_chars" != x; then
57655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57657  fi
57658
57659
57660  windows_path="$new_path"
57661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57662    unix_path=`$CYGPATH -u "$windows_path"`
57663    new_path="$unix_path"
57664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57666    new_path="$unix_path"
57667  fi
57668
57669  if test "x$path" != "x$new_path"; then
57670    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57673  fi
57674
57675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57677
57678    else
57679      # We're on a unix platform. Hooray! :)
57680      path="$POTENTIAL_FREETYPE_LIB_PATH"
57681      has_space=`$ECHO "$path" | $GREP " "`
57682      if test "x$has_space" != x; then
57683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57686      fi
57687
57688      # Use eval to expand a potential ~
57689      eval path="$path"
57690      if test ! -f "$path" && test ! -d "$path"; then
57691        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57692      fi
57693
57694      if test -d "$path"; then
57695        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57696      else
57697        dir="`$DIRNAME "$path"`"
57698        base="`$BASENAME "$path"`"
57699        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57700      fi
57701    fi
57702  fi
57703
57704
57705    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57707$as_echo_n "checking for freetype includes... " >&6; }
57708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57709$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57710    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57712$as_echo_n "checking for freetype libraries... " >&6; }
57713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57714$as_echo "$FREETYPE_LIB_PATH" >&6; }
57715  fi
57716
57717        if test "x$FOUND_FREETYPE" != xyes; then
57718          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57719        fi
57720      else
57721        # User specified only one of lib or include. This is an error.
57722        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57723          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57724$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57725          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57726        else
57727          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57728$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57729          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57730        fi
57731      fi
57732    else
57733      # User did not specify settings, but we need freetype. Try to locate it.
57734
57735      if test "x$BUNDLE_FREETYPE" = x; then
57736        # If not specified, default is to bundle freetype only on windows
57737        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57738          BUNDLE_FREETYPE=yes
57739        else
57740          BUNDLE_FREETYPE=no
57741        fi
57742      fi
57743
57744      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57745      if test "x$SYSROOT" = x; then
57746        if test "x$FOUND_FREETYPE" != xyes; then
57747          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57748          if test "x$PKG_CONFIG" != x; then
57749
57750pkg_failed=no
57751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57752$as_echo_n "checking for FREETYPE... " >&6; }
57753
57754if test -n "$FREETYPE_CFLAGS"; then
57755    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57756 elif test -n "$PKG_CONFIG"; then
57757    if test -n "$PKG_CONFIG" && \
57758    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57759  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57760  ac_status=$?
57761  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57762  test $ac_status = 0; }; then
57763  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57764else
57765  pkg_failed=yes
57766fi
57767 else
57768    pkg_failed=untried
57769fi
57770if test -n "$FREETYPE_LIBS"; then
57771    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57772 elif test -n "$PKG_CONFIG"; then
57773    if test -n "$PKG_CONFIG" && \
57774    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57775  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57776  ac_status=$?
57777  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57778  test $ac_status = 0; }; then
57779  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57780else
57781  pkg_failed=yes
57782fi
57783 else
57784    pkg_failed=untried
57785fi
57786
57787
57788
57789if test $pkg_failed = yes; then
57790
57791if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57792        _pkg_short_errors_supported=yes
57793else
57794        _pkg_short_errors_supported=no
57795fi
57796        if test $_pkg_short_errors_supported = yes; then
57797	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57798        else
57799	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57800        fi
57801	# Put the nasty error message in config.log where it belongs
57802	echo "$FREETYPE_PKG_ERRORS" >&5
57803
57804	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57805$as_echo "no" >&6; }
57806                FOUND_FREETYPE=no
57807elif test $pkg_failed = untried; then
57808	FOUND_FREETYPE=no
57809else
57810	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57811	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57813$as_echo "yes" >&6; }
57814	FOUND_FREETYPE=yes
57815fi
57816            if test "x$FOUND_FREETYPE" = xyes; then
57817              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57818              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57819              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57820              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57821                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57822              fi
57823              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57824              if test "x$BUNDLE_FREETYPE" = xyes; then
57825                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57826$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57827                FOUND_FREETYPE=no
57828              else
57829                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57830$as_echo_n "checking for freetype... " >&6; }
57831                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57832$as_echo "yes (using pkg-config)" >&6; }
57833              fi
57834            fi
57835          fi
57836        fi
57837      fi
57838
57839      if test "x$FOUND_FREETYPE" != xyes; then
57840        # Check in well-known locations
57841        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57842          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57843
57844  windows_path="$FREETYPE_BASE_DIR"
57845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57846    unix_path=`$CYGPATH -u "$windows_path"`
57847    FREETYPE_BASE_DIR="$unix_path"
57848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57850    FREETYPE_BASE_DIR="$unix_path"
57851  fi
57852
57853
57854  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57855  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57856  METHOD="well-known location"
57857
57858  # Let's start with an optimistic view of the world :-)
57859  FOUND_FREETYPE=yes
57860
57861  # First look for the canonical freetype main include file ft2build.h.
57862  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57863    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57864    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57865    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57866      # Fail.
57867      FOUND_FREETYPE=no
57868    fi
57869  fi
57870
57871  if test "x$FOUND_FREETYPE" = xyes; then
57872    # Include file found, let's continue the sanity check.
57873    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57874$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57875
57876    # Reset to default value
57877    FREETYPE_BASE_NAME=freetype
57878    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57879    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57880      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57881          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57882        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57883        # for the .6 version explicitly.
57884        FREETYPE_BASE_NAME=freetype.6
57885        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57886        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57887$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57888      else
57889        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57890$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57891        FOUND_FREETYPE=no
57892      fi
57893    else
57894      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57895        # On Windows, we will need both .lib and .dll file.
57896        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57897          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57898$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57899          FOUND_FREETYPE=no
57900        fi
57901      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57902          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57903        # Found lib in isa dir, use that instead.
57904        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57905        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57906$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57907      fi
57908    fi
57909  fi
57910
57911  if test "x$FOUND_FREETYPE" = xyes; then
57912
57913  # Only process if variable expands to non-empty
57914
57915  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57917
57918  # Input might be given as Windows format, start by converting to
57919  # unix format.
57920  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57921  new_path=`$CYGPATH -u "$path"`
57922
57923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57926  # "foo.exe" is OK but "foo" is an error.
57927  #
57928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57929  # It is also a way to make sure we got the proper file name for the real test later on.
57930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57931  if test "x$test_shortpath" = x; then
57932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57935  fi
57936
57937  # Call helper function which possibly converts this using DOS-style short mode.
57938  # If so, the updated path is stored in $new_path.
57939
57940  input_path="$new_path"
57941  # Check if we need to convert this using DOS-style short mode. If the path
57942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57943  # take no chances and rewrite it.
57944  # Note: m4 eats our [], so we need to use [ and ] instead.
57945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57946  if test "x$has_forbidden_chars" != x; then
57947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57951      # Going to short mode and back again did indeed matter. Since short mode is
57952      # case insensitive, let's make it lowercase to improve readability.
57953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57954      # Now convert it back to Unix-style (cygpath)
57955      input_path=`$CYGPATH -u "$shortmode_path"`
57956      new_path="$input_path"
57957    fi
57958  fi
57959
57960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57961  if test "x$test_cygdrive_prefix" = x; then
57962    # As a simple fix, exclude /usr/bin since it's not a real path.
57963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57965      # a path prefixed by /cygdrive for fixpath to work.
57966      new_path="$CYGWIN_ROOT_PATH$input_path"
57967    fi
57968  fi
57969
57970
57971  if test "x$path" != "x$new_path"; then
57972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57975  fi
57976
57977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57978
57979  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57980  has_colon=`$ECHO $path | $GREP ^.:`
57981  new_path="$path"
57982  if test "x$has_colon" = x; then
57983    # Not in mixed or Windows style, start by that.
57984    new_path=`cmd //c echo $path`
57985  fi
57986
57987
57988  input_path="$new_path"
57989  # Check if we need to convert this using DOS-style short mode. If the path
57990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57991  # take no chances and rewrite it.
57992  # Note: m4 eats our [], so we need to use [ and ] instead.
57993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57994  if test "x$has_forbidden_chars" != x; then
57995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57997  fi
57998
57999
58000  windows_path="$new_path"
58001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58002    unix_path=`$CYGPATH -u "$windows_path"`
58003    new_path="$unix_path"
58004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58006    new_path="$unix_path"
58007  fi
58008
58009  if test "x$path" != "x$new_path"; then
58010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58013  fi
58014
58015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58017
58018    else
58019      # We're on a unix platform. Hooray! :)
58020      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58021      has_space=`$ECHO "$path" | $GREP " "`
58022      if test "x$has_space" != x; then
58023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58026      fi
58027
58028      # Use eval to expand a potential ~
58029      eval path="$path"
58030      if test ! -f "$path" && test ! -d "$path"; then
58031        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58032      fi
58033
58034      if test -d "$path"; then
58035        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58036      else
58037        dir="`$DIRNAME "$path"`"
58038        base="`$BASENAME "$path"`"
58039        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58040      fi
58041    fi
58042  fi
58043
58044
58045  # Only process if variable expands to non-empty
58046
58047  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58049
58050  # Input might be given as Windows format, start by converting to
58051  # unix format.
58052  path="$POTENTIAL_FREETYPE_LIB_PATH"
58053  new_path=`$CYGPATH -u "$path"`
58054
58055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58058  # "foo.exe" is OK but "foo" is an error.
58059  #
58060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58061  # It is also a way to make sure we got the proper file name for the real test later on.
58062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58063  if test "x$test_shortpath" = x; then
58064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58066    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58067  fi
58068
58069  # Call helper function which possibly converts this using DOS-style short mode.
58070  # If so, the updated path is stored in $new_path.
58071
58072  input_path="$new_path"
58073  # Check if we need to convert this using DOS-style short mode. If the path
58074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58075  # take no chances and rewrite it.
58076  # Note: m4 eats our [], so we need to use [ and ] instead.
58077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58078  if test "x$has_forbidden_chars" != x; then
58079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58083      # Going to short mode and back again did indeed matter. Since short mode is
58084      # case insensitive, let's make it lowercase to improve readability.
58085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58086      # Now convert it back to Unix-style (cygpath)
58087      input_path=`$CYGPATH -u "$shortmode_path"`
58088      new_path="$input_path"
58089    fi
58090  fi
58091
58092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58093  if test "x$test_cygdrive_prefix" = x; then
58094    # As a simple fix, exclude /usr/bin since it's not a real path.
58095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58097      # a path prefixed by /cygdrive for fixpath to work.
58098      new_path="$CYGWIN_ROOT_PATH$input_path"
58099    fi
58100  fi
58101
58102
58103  if test "x$path" != "x$new_path"; then
58104    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58107  fi
58108
58109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58110
58111  path="$POTENTIAL_FREETYPE_LIB_PATH"
58112  has_colon=`$ECHO $path | $GREP ^.:`
58113  new_path="$path"
58114  if test "x$has_colon" = x; then
58115    # Not in mixed or Windows style, start by that.
58116    new_path=`cmd //c echo $path`
58117  fi
58118
58119
58120  input_path="$new_path"
58121  # Check if we need to convert this using DOS-style short mode. If the path
58122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58123  # take no chances and rewrite it.
58124  # Note: m4 eats our [], so we need to use [ and ] instead.
58125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58126  if test "x$has_forbidden_chars" != x; then
58127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58129  fi
58130
58131
58132  windows_path="$new_path"
58133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58134    unix_path=`$CYGPATH -u "$windows_path"`
58135    new_path="$unix_path"
58136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58138    new_path="$unix_path"
58139  fi
58140
58141  if test "x$path" != "x$new_path"; then
58142    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58144$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58145  fi
58146
58147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58149
58150    else
58151      # We're on a unix platform. Hooray! :)
58152      path="$POTENTIAL_FREETYPE_LIB_PATH"
58153      has_space=`$ECHO "$path" | $GREP " "`
58154      if test "x$has_space" != x; then
58155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58156$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58158      fi
58159
58160      # Use eval to expand a potential ~
58161      eval path="$path"
58162      if test ! -f "$path" && test ! -d "$path"; then
58163        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58164      fi
58165
58166      if test -d "$path"; then
58167        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58168      else
58169        dir="`$DIRNAME "$path"`"
58170        base="`$BASENAME "$path"`"
58171        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58172      fi
58173    fi
58174  fi
58175
58176
58177    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58179$as_echo_n "checking for freetype includes... " >&6; }
58180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58181$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58182    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58184$as_echo_n "checking for freetype libraries... " >&6; }
58185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58186$as_echo "$FREETYPE_LIB_PATH" >&6; }
58187  fi
58188
58189          if test "x$FOUND_FREETYPE" != xyes; then
58190            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58191
58192  windows_path="$FREETYPE_BASE_DIR"
58193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58194    unix_path=`$CYGPATH -u "$windows_path"`
58195    FREETYPE_BASE_DIR="$unix_path"
58196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58198    FREETYPE_BASE_DIR="$unix_path"
58199  fi
58200
58201
58202  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58203  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58204  METHOD="well-known location"
58205
58206  # Let's start with an optimistic view of the world :-)
58207  FOUND_FREETYPE=yes
58208
58209  # First look for the canonical freetype main include file ft2build.h.
58210  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58211    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58212    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58213    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58214      # Fail.
58215      FOUND_FREETYPE=no
58216    fi
58217  fi
58218
58219  if test "x$FOUND_FREETYPE" = xyes; then
58220    # Include file found, let's continue the sanity check.
58221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58222$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58223
58224    # Reset to default value
58225    FREETYPE_BASE_NAME=freetype
58226    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58227    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58228      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58229          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58230        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58231        # for the .6 version explicitly.
58232        FREETYPE_BASE_NAME=freetype.6
58233        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58234        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58235$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58236      else
58237        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58238$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58239        FOUND_FREETYPE=no
58240      fi
58241    else
58242      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58243        # On Windows, we will need both .lib and .dll file.
58244        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58245          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58246$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58247          FOUND_FREETYPE=no
58248        fi
58249      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58250          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58251        # Found lib in isa dir, use that instead.
58252        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58253        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58254$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58255      fi
58256    fi
58257  fi
58258
58259  if test "x$FOUND_FREETYPE" = xyes; then
58260
58261  # Only process if variable expands to non-empty
58262
58263  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58265
58266  # Input might be given as Windows format, start by converting to
58267  # unix format.
58268  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58269  new_path=`$CYGPATH -u "$path"`
58270
58271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58274  # "foo.exe" is OK but "foo" is an error.
58275  #
58276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58277  # It is also a way to make sure we got the proper file name for the real test later on.
58278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58279  if test "x$test_shortpath" = x; then
58280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58282    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58283  fi
58284
58285  # Call helper function which possibly converts this using DOS-style short mode.
58286  # If so, the updated path is stored in $new_path.
58287
58288  input_path="$new_path"
58289  # Check if we need to convert this using DOS-style short mode. If the path
58290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58291  # take no chances and rewrite it.
58292  # Note: m4 eats our [], so we need to use [ and ] instead.
58293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58294  if test "x$has_forbidden_chars" != x; then
58295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58299      # Going to short mode and back again did indeed matter. Since short mode is
58300      # case insensitive, let's make it lowercase to improve readability.
58301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58302      # Now convert it back to Unix-style (cygpath)
58303      input_path=`$CYGPATH -u "$shortmode_path"`
58304      new_path="$input_path"
58305    fi
58306  fi
58307
58308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58309  if test "x$test_cygdrive_prefix" = x; then
58310    # As a simple fix, exclude /usr/bin since it's not a real path.
58311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58313      # a path prefixed by /cygdrive for fixpath to work.
58314      new_path="$CYGWIN_ROOT_PATH$input_path"
58315    fi
58316  fi
58317
58318
58319  if test "x$path" != "x$new_path"; then
58320    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58323  fi
58324
58325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58326
58327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58328  has_colon=`$ECHO $path | $GREP ^.:`
58329  new_path="$path"
58330  if test "x$has_colon" = x; then
58331    # Not in mixed or Windows style, start by that.
58332    new_path=`cmd //c echo $path`
58333  fi
58334
58335
58336  input_path="$new_path"
58337  # Check if we need to convert this using DOS-style short mode. If the path
58338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58339  # take no chances and rewrite it.
58340  # Note: m4 eats our [], so we need to use [ and ] instead.
58341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58342  if test "x$has_forbidden_chars" != x; then
58343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58345  fi
58346
58347
58348  windows_path="$new_path"
58349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58350    unix_path=`$CYGPATH -u "$windows_path"`
58351    new_path="$unix_path"
58352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58354    new_path="$unix_path"
58355  fi
58356
58357  if test "x$path" != "x$new_path"; then
58358    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58361  fi
58362
58363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58365
58366    else
58367      # We're on a unix platform. Hooray! :)
58368      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58369      has_space=`$ECHO "$path" | $GREP " "`
58370      if test "x$has_space" != x; then
58371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58374      fi
58375
58376      # Use eval to expand a potential ~
58377      eval path="$path"
58378      if test ! -f "$path" && test ! -d "$path"; then
58379        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58380      fi
58381
58382      if test -d "$path"; then
58383        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58384      else
58385        dir="`$DIRNAME "$path"`"
58386        base="`$BASENAME "$path"`"
58387        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58388      fi
58389    fi
58390  fi
58391
58392
58393  # Only process if variable expands to non-empty
58394
58395  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58397
58398  # Input might be given as Windows format, start by converting to
58399  # unix format.
58400  path="$POTENTIAL_FREETYPE_LIB_PATH"
58401  new_path=`$CYGPATH -u "$path"`
58402
58403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58406  # "foo.exe" is OK but "foo" is an error.
58407  #
58408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58409  # It is also a way to make sure we got the proper file name for the real test later on.
58410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58411  if test "x$test_shortpath" = x; then
58412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58414    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58415  fi
58416
58417  # Call helper function which possibly converts this using DOS-style short mode.
58418  # If so, the updated path is stored in $new_path.
58419
58420  input_path="$new_path"
58421  # Check if we need to convert this using DOS-style short mode. If the path
58422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58423  # take no chances and rewrite it.
58424  # Note: m4 eats our [], so we need to use [ and ] instead.
58425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58426  if test "x$has_forbidden_chars" != x; then
58427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58431      # Going to short mode and back again did indeed matter. Since short mode is
58432      # case insensitive, let's make it lowercase to improve readability.
58433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58434      # Now convert it back to Unix-style (cygpath)
58435      input_path=`$CYGPATH -u "$shortmode_path"`
58436      new_path="$input_path"
58437    fi
58438  fi
58439
58440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58441  if test "x$test_cygdrive_prefix" = x; then
58442    # As a simple fix, exclude /usr/bin since it's not a real path.
58443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58445      # a path prefixed by /cygdrive for fixpath to work.
58446      new_path="$CYGWIN_ROOT_PATH$input_path"
58447    fi
58448  fi
58449
58450
58451  if test "x$path" != "x$new_path"; then
58452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58455  fi
58456
58457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58458
58459  path="$POTENTIAL_FREETYPE_LIB_PATH"
58460  has_colon=`$ECHO $path | $GREP ^.:`
58461  new_path="$path"
58462  if test "x$has_colon" = x; then
58463    # Not in mixed or Windows style, start by that.
58464    new_path=`cmd //c echo $path`
58465  fi
58466
58467
58468  input_path="$new_path"
58469  # Check if we need to convert this using DOS-style short mode. If the path
58470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58471  # take no chances and rewrite it.
58472  # Note: m4 eats our [], so we need to use [ and ] instead.
58473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58474  if test "x$has_forbidden_chars" != x; then
58475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58477  fi
58478
58479
58480  windows_path="$new_path"
58481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58482    unix_path=`$CYGPATH -u "$windows_path"`
58483    new_path="$unix_path"
58484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58486    new_path="$unix_path"
58487  fi
58488
58489  if test "x$path" != "x$new_path"; then
58490    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58493  fi
58494
58495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58497
58498    else
58499      # We're on a unix platform. Hooray! :)
58500      path="$POTENTIAL_FREETYPE_LIB_PATH"
58501      has_space=`$ECHO "$path" | $GREP " "`
58502      if test "x$has_space" != x; then
58503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58506      fi
58507
58508      # Use eval to expand a potential ~
58509      eval path="$path"
58510      if test ! -f "$path" && test ! -d "$path"; then
58511        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58512      fi
58513
58514      if test -d "$path"; then
58515        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58516      else
58517        dir="`$DIRNAME "$path"`"
58518        base="`$BASENAME "$path"`"
58519        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58520      fi
58521    fi
58522  fi
58523
58524
58525    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58527$as_echo_n "checking for freetype includes... " >&6; }
58528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58529$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58530    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58531    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58532$as_echo_n "checking for freetype libraries... " >&6; }
58533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58534$as_echo "$FREETYPE_LIB_PATH" >&6; }
58535  fi
58536
58537          fi
58538          if test "x$FOUND_FREETYPE" != xyes; then
58539            FREETYPE_BASE_DIR="$HOME/freetype"
58540
58541  windows_path="$FREETYPE_BASE_DIR"
58542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58543    unix_path=`$CYGPATH -u "$windows_path"`
58544    FREETYPE_BASE_DIR="$unix_path"
58545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58547    FREETYPE_BASE_DIR="$unix_path"
58548  fi
58549
58550            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58551
58552  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58553  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58554  METHOD="well-known location"
58555
58556  # Let's start with an optimistic view of the world :-)
58557  FOUND_FREETYPE=yes
58558
58559  # First look for the canonical freetype main include file ft2build.h.
58560  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58561    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58562    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58563    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58564      # Fail.
58565      FOUND_FREETYPE=no
58566    fi
58567  fi
58568
58569  if test "x$FOUND_FREETYPE" = xyes; then
58570    # Include file found, let's continue the sanity check.
58571    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58572$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58573
58574    # Reset to default value
58575    FREETYPE_BASE_NAME=freetype
58576    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58577    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58578      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58579          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58580        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58581        # for the .6 version explicitly.
58582        FREETYPE_BASE_NAME=freetype.6
58583        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58584        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58585$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58586      else
58587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58588$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58589        FOUND_FREETYPE=no
58590      fi
58591    else
58592      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58593        # On Windows, we will need both .lib and .dll file.
58594        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58595          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58596$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58597          FOUND_FREETYPE=no
58598        fi
58599      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58600          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58601        # Found lib in isa dir, use that instead.
58602        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58603        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58604$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58605      fi
58606    fi
58607  fi
58608
58609  if test "x$FOUND_FREETYPE" = xyes; then
58610
58611  # Only process if variable expands to non-empty
58612
58613  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58615
58616  # Input might be given as Windows format, start by converting to
58617  # unix format.
58618  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58619  new_path=`$CYGPATH -u "$path"`
58620
58621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58624  # "foo.exe" is OK but "foo" is an error.
58625  #
58626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58627  # It is also a way to make sure we got the proper file name for the real test later on.
58628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58629  if test "x$test_shortpath" = x; then
58630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58631$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58632    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58633  fi
58634
58635  # Call helper function which possibly converts this using DOS-style short mode.
58636  # If so, the updated path is stored in $new_path.
58637
58638  input_path="$new_path"
58639  # Check if we need to convert this using DOS-style short mode. If the path
58640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58641  # take no chances and rewrite it.
58642  # Note: m4 eats our [], so we need to use [ and ] instead.
58643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58644  if test "x$has_forbidden_chars" != x; then
58645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58649      # Going to short mode and back again did indeed matter. Since short mode is
58650      # case insensitive, let's make it lowercase to improve readability.
58651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58652      # Now convert it back to Unix-style (cygpath)
58653      input_path=`$CYGPATH -u "$shortmode_path"`
58654      new_path="$input_path"
58655    fi
58656  fi
58657
58658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58659  if test "x$test_cygdrive_prefix" = x; then
58660    # As a simple fix, exclude /usr/bin since it's not a real path.
58661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58663      # a path prefixed by /cygdrive for fixpath to work.
58664      new_path="$CYGWIN_ROOT_PATH$input_path"
58665    fi
58666  fi
58667
58668
58669  if test "x$path" != "x$new_path"; then
58670    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58673  fi
58674
58675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58676
58677  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58678  has_colon=`$ECHO $path | $GREP ^.:`
58679  new_path="$path"
58680  if test "x$has_colon" = x; then
58681    # Not in mixed or Windows style, start by that.
58682    new_path=`cmd //c echo $path`
58683  fi
58684
58685
58686  input_path="$new_path"
58687  # Check if we need to convert this using DOS-style short mode. If the path
58688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58689  # take no chances and rewrite it.
58690  # Note: m4 eats our [], so we need to use [ and ] instead.
58691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58692  if test "x$has_forbidden_chars" != x; then
58693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58695  fi
58696
58697
58698  windows_path="$new_path"
58699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58700    unix_path=`$CYGPATH -u "$windows_path"`
58701    new_path="$unix_path"
58702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58704    new_path="$unix_path"
58705  fi
58706
58707  if test "x$path" != "x$new_path"; then
58708    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58710$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58711  fi
58712
58713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58715
58716    else
58717      # We're on a unix platform. Hooray! :)
58718      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58719      has_space=`$ECHO "$path" | $GREP " "`
58720      if test "x$has_space" != x; then
58721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58722$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58724      fi
58725
58726      # Use eval to expand a potential ~
58727      eval path="$path"
58728      if test ! -f "$path" && test ! -d "$path"; then
58729        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58730      fi
58731
58732      if test -d "$path"; then
58733        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58734      else
58735        dir="`$DIRNAME "$path"`"
58736        base="`$BASENAME "$path"`"
58737        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58738      fi
58739    fi
58740  fi
58741
58742
58743  # Only process if variable expands to non-empty
58744
58745  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58747
58748  # Input might be given as Windows format, start by converting to
58749  # unix format.
58750  path="$POTENTIAL_FREETYPE_LIB_PATH"
58751  new_path=`$CYGPATH -u "$path"`
58752
58753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58756  # "foo.exe" is OK but "foo" is an error.
58757  #
58758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58759  # It is also a way to make sure we got the proper file name for the real test later on.
58760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58761  if test "x$test_shortpath" = x; then
58762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58763$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58764    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58765  fi
58766
58767  # Call helper function which possibly converts this using DOS-style short mode.
58768  # If so, the updated path is stored in $new_path.
58769
58770  input_path="$new_path"
58771  # Check if we need to convert this using DOS-style short mode. If the path
58772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58773  # take no chances and rewrite it.
58774  # Note: m4 eats our [], so we need to use [ and ] instead.
58775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58776  if test "x$has_forbidden_chars" != x; then
58777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58781      # Going to short mode and back again did indeed matter. Since short mode is
58782      # case insensitive, let's make it lowercase to improve readability.
58783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58784      # Now convert it back to Unix-style (cygpath)
58785      input_path=`$CYGPATH -u "$shortmode_path"`
58786      new_path="$input_path"
58787    fi
58788  fi
58789
58790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58791  if test "x$test_cygdrive_prefix" = x; then
58792    # As a simple fix, exclude /usr/bin since it's not a real path.
58793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58795      # a path prefixed by /cygdrive for fixpath to work.
58796      new_path="$CYGWIN_ROOT_PATH$input_path"
58797    fi
58798  fi
58799
58800
58801  if test "x$path" != "x$new_path"; then
58802    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58804$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58805  fi
58806
58807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58808
58809  path="$POTENTIAL_FREETYPE_LIB_PATH"
58810  has_colon=`$ECHO $path | $GREP ^.:`
58811  new_path="$path"
58812  if test "x$has_colon" = x; then
58813    # Not in mixed or Windows style, start by that.
58814    new_path=`cmd //c echo $path`
58815  fi
58816
58817
58818  input_path="$new_path"
58819  # Check if we need to convert this using DOS-style short mode. If the path
58820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58821  # take no chances and rewrite it.
58822  # Note: m4 eats our [], so we need to use [ and ] instead.
58823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58824  if test "x$has_forbidden_chars" != x; then
58825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58827  fi
58828
58829
58830  windows_path="$new_path"
58831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58832    unix_path=`$CYGPATH -u "$windows_path"`
58833    new_path="$unix_path"
58834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58836    new_path="$unix_path"
58837  fi
58838
58839  if test "x$path" != "x$new_path"; then
58840    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58843  fi
58844
58845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58847
58848    else
58849      # We're on a unix platform. Hooray! :)
58850      path="$POTENTIAL_FREETYPE_LIB_PATH"
58851      has_space=`$ECHO "$path" | $GREP " "`
58852      if test "x$has_space" != x; then
58853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58854$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58856      fi
58857
58858      # Use eval to expand a potential ~
58859      eval path="$path"
58860      if test ! -f "$path" && test ! -d "$path"; then
58861        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58862      fi
58863
58864      if test -d "$path"; then
58865        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58866      else
58867        dir="`$DIRNAME "$path"`"
58868        base="`$BASENAME "$path"`"
58869        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58870      fi
58871    fi
58872  fi
58873
58874
58875    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58877$as_echo_n "checking for freetype includes... " >&6; }
58878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58879$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58880    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58882$as_echo_n "checking for freetype libraries... " >&6; }
58883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58884$as_echo "$FREETYPE_LIB_PATH" >&6; }
58885  fi
58886
58887            else
58888
58889  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58890  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58891  METHOD="well-known location"
58892
58893  # Let's start with an optimistic view of the world :-)
58894  FOUND_FREETYPE=yes
58895
58896  # First look for the canonical freetype main include file ft2build.h.
58897  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58898    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58899    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58900    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58901      # Fail.
58902      FOUND_FREETYPE=no
58903    fi
58904  fi
58905
58906  if test "x$FOUND_FREETYPE" = xyes; then
58907    # Include file found, let's continue the sanity check.
58908    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58909$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58910
58911    # Reset to default value
58912    FREETYPE_BASE_NAME=freetype
58913    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58914    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58915      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58917        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58918        # for the .6 version explicitly.
58919        FREETYPE_BASE_NAME=freetype.6
58920        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58921        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58922$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58923      else
58924        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58926        FOUND_FREETYPE=no
58927      fi
58928    else
58929      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58930        # On Windows, we will need both .lib and .dll file.
58931        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58932          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58933$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58934          FOUND_FREETYPE=no
58935        fi
58936      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58937          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58938        # Found lib in isa dir, use that instead.
58939        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58940        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58941$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58942      fi
58943    fi
58944  fi
58945
58946  if test "x$FOUND_FREETYPE" = xyes; then
58947
58948  # Only process if variable expands to non-empty
58949
58950  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58952
58953  # Input might be given as Windows format, start by converting to
58954  # unix format.
58955  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58956  new_path=`$CYGPATH -u "$path"`
58957
58958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58961  # "foo.exe" is OK but "foo" is an error.
58962  #
58963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58964  # It is also a way to make sure we got the proper file name for the real test later on.
58965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58966  if test "x$test_shortpath" = x; then
58967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58969    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58970  fi
58971
58972  # Call helper function which possibly converts this using DOS-style short mode.
58973  # If so, the updated path is stored in $new_path.
58974
58975  input_path="$new_path"
58976  # Check if we need to convert this using DOS-style short mode. If the path
58977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58978  # take no chances and rewrite it.
58979  # Note: m4 eats our [], so we need to use [ and ] instead.
58980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58981  if test "x$has_forbidden_chars" != x; then
58982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58986      # Going to short mode and back again did indeed matter. Since short mode is
58987      # case insensitive, let's make it lowercase to improve readability.
58988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58989      # Now convert it back to Unix-style (cygpath)
58990      input_path=`$CYGPATH -u "$shortmode_path"`
58991      new_path="$input_path"
58992    fi
58993  fi
58994
58995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58996  if test "x$test_cygdrive_prefix" = x; then
58997    # As a simple fix, exclude /usr/bin since it's not a real path.
58998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59000      # a path prefixed by /cygdrive for fixpath to work.
59001      new_path="$CYGWIN_ROOT_PATH$input_path"
59002    fi
59003  fi
59004
59005
59006  if test "x$path" != "x$new_path"; then
59007    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59010  fi
59011
59012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59013
59014  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59015  has_colon=`$ECHO $path | $GREP ^.:`
59016  new_path="$path"
59017  if test "x$has_colon" = x; then
59018    # Not in mixed or Windows style, start by that.
59019    new_path=`cmd //c echo $path`
59020  fi
59021
59022
59023  input_path="$new_path"
59024  # Check if we need to convert this using DOS-style short mode. If the path
59025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59026  # take no chances and rewrite it.
59027  # Note: m4 eats our [], so we need to use [ and ] instead.
59028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59029  if test "x$has_forbidden_chars" != x; then
59030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59032  fi
59033
59034
59035  windows_path="$new_path"
59036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59037    unix_path=`$CYGPATH -u "$windows_path"`
59038    new_path="$unix_path"
59039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59041    new_path="$unix_path"
59042  fi
59043
59044  if test "x$path" != "x$new_path"; then
59045    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59048  fi
59049
59050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59052
59053    else
59054      # We're on a unix platform. Hooray! :)
59055      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59056      has_space=`$ECHO "$path" | $GREP " "`
59057      if test "x$has_space" != x; then
59058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59061      fi
59062
59063      # Use eval to expand a potential ~
59064      eval path="$path"
59065      if test ! -f "$path" && test ! -d "$path"; then
59066        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59067      fi
59068
59069      if test -d "$path"; then
59070        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59071      else
59072        dir="`$DIRNAME "$path"`"
59073        base="`$BASENAME "$path"`"
59074        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59075      fi
59076    fi
59077  fi
59078
59079
59080  # Only process if variable expands to non-empty
59081
59082  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59084
59085  # Input might be given as Windows format, start by converting to
59086  # unix format.
59087  path="$POTENTIAL_FREETYPE_LIB_PATH"
59088  new_path=`$CYGPATH -u "$path"`
59089
59090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59093  # "foo.exe" is OK but "foo" is an error.
59094  #
59095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59096  # It is also a way to make sure we got the proper file name for the real test later on.
59097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59098  if test "x$test_shortpath" = x; then
59099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59101    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59102  fi
59103
59104  # Call helper function which possibly converts this using DOS-style short mode.
59105  # If so, the updated path is stored in $new_path.
59106
59107  input_path="$new_path"
59108  # Check if we need to convert this using DOS-style short mode. If the path
59109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59110  # take no chances and rewrite it.
59111  # Note: m4 eats our [], so we need to use [ and ] instead.
59112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59113  if test "x$has_forbidden_chars" != x; then
59114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59118      # Going to short mode and back again did indeed matter. Since short mode is
59119      # case insensitive, let's make it lowercase to improve readability.
59120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59121      # Now convert it back to Unix-style (cygpath)
59122      input_path=`$CYGPATH -u "$shortmode_path"`
59123      new_path="$input_path"
59124    fi
59125  fi
59126
59127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59128  if test "x$test_cygdrive_prefix" = x; then
59129    # As a simple fix, exclude /usr/bin since it's not a real path.
59130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59132      # a path prefixed by /cygdrive for fixpath to work.
59133      new_path="$CYGWIN_ROOT_PATH$input_path"
59134    fi
59135  fi
59136
59137
59138  if test "x$path" != "x$new_path"; then
59139    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59142  fi
59143
59144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59145
59146  path="$POTENTIAL_FREETYPE_LIB_PATH"
59147  has_colon=`$ECHO $path | $GREP ^.:`
59148  new_path="$path"
59149  if test "x$has_colon" = x; then
59150    # Not in mixed or Windows style, start by that.
59151    new_path=`cmd //c echo $path`
59152  fi
59153
59154
59155  input_path="$new_path"
59156  # Check if we need to convert this using DOS-style short mode. If the path
59157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59158  # take no chances and rewrite it.
59159  # Note: m4 eats our [], so we need to use [ and ] instead.
59160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59161  if test "x$has_forbidden_chars" != x; then
59162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59164  fi
59165
59166
59167  windows_path="$new_path"
59168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59169    unix_path=`$CYGPATH -u "$windows_path"`
59170    new_path="$unix_path"
59171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59173    new_path="$unix_path"
59174  fi
59175
59176  if test "x$path" != "x$new_path"; then
59177    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59180  fi
59181
59182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59184
59185    else
59186      # We're on a unix platform. Hooray! :)
59187      path="$POTENTIAL_FREETYPE_LIB_PATH"
59188      has_space=`$ECHO "$path" | $GREP " "`
59189      if test "x$has_space" != x; then
59190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59191$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59193      fi
59194
59195      # Use eval to expand a potential ~
59196      eval path="$path"
59197      if test ! -f "$path" && test ! -d "$path"; then
59198        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59199      fi
59200
59201      if test -d "$path"; then
59202        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59203      else
59204        dir="`$DIRNAME "$path"`"
59205        base="`$BASENAME "$path"`"
59206        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59207      fi
59208    fi
59209  fi
59210
59211
59212    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59214$as_echo_n "checking for freetype includes... " >&6; }
59215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59216$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59217    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59219$as_echo_n "checking for freetype libraries... " >&6; }
59220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59221$as_echo "$FREETYPE_LIB_PATH" >&6; }
59222  fi
59223
59224            fi
59225            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59226                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59227              # Source is available, as a last resort try to build freetype in default location
59228
59229  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59230  BUILD_FREETYPE=yes
59231
59232  # Check if the freetype sources are acessible..
59233  if ! test -d $FREETYPE_SRC_PATH; then
59234    { $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
59235$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59236    BUILD_FREETYPE=no
59237  fi
59238  # ..and contain a vc2010 project file
59239  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59240  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59241    { $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
59242$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59243    BUILD_FREETYPE=no
59244  fi
59245  # Now check if configure found a version of 'msbuild.exe'
59246  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59247    { $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
59248$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;}
59249    BUILD_FREETYPE=no
59250  fi
59251
59252  # Ready to go..
59253  if test "x$BUILD_FREETYPE" = xyes; then
59254    # msbuild requires trailing slashes for output directories
59255    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59256    freetype_lib_path_unix="$freetype_lib_path"
59257    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59258
59259  unix_path="$vcxproj_path"
59260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59261    windows_path=`$CYGPATH -m "$unix_path"`
59262    vcxproj_path="$windows_path"
59263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59264    windows_path=`cmd //c echo $unix_path`
59265    vcxproj_path="$windows_path"
59266  fi
59267
59268
59269  unix_path="$freetype_lib_path"
59270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59271    windows_path=`$CYGPATH -m "$unix_path"`
59272    freetype_lib_path="$windows_path"
59273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59274    windows_path=`cmd //c echo $unix_path`
59275    freetype_lib_path="$windows_path"
59276  fi
59277
59278
59279  unix_path="$freetype_obj_path"
59280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59281    windows_path=`$CYGPATH -m "$unix_path"`
59282    freetype_obj_path="$windows_path"
59283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59284    windows_path=`cmd //c echo $unix_path`
59285    freetype_obj_path="$windows_path"
59286  fi
59287
59288    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59289      freetype_platform=x64
59290    else
59291      freetype_platform=win32
59292    fi
59293
59294    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59295    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59296    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59297    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59298    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59299$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59300
59301    # First we try to build the freetype.dll
59302    $ECHO -e "@echo off\n"\
59303        "$MSBUILD $vcxproj_path "\
59304        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59305        "/p:Configuration=\"Release Multithreaded\" "\
59306        "/p:Platform=$freetype_platform "\
59307        "/p:ConfigurationType=DynamicLibrary "\
59308        "/p:TargetName=freetype "\
59309        "/p:OutDir=\"$freetype_lib_path\" "\
59310        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59311    cmd /c freetype.bat
59312
59313    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59314      # If that succeeds we also build freetype.lib
59315      $ECHO -e "@echo off\n"\
59316          "$MSBUILD $vcxproj_path "\
59317          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59318          "/p:Configuration=\"Release Multithreaded\" "\
59319          "/p:Platform=$freetype_platform "\
59320          "/p:ConfigurationType=StaticLibrary "\
59321          "/p:TargetName=freetype "\
59322          "/p:OutDir=\"$freetype_lib_path\" "\
59323          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59324      cmd /c freetype.bat
59325
59326      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59327        # Once we build both, lib and dll, set freetype lib and include path appropriately
59328        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59329        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59330        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59331$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59332      else
59333        BUILD_FREETYPE=no
59334      fi
59335    else
59336      BUILD_FREETYPE=no
59337    fi
59338  fi
59339
59340              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59341
59342  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59343  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59344  METHOD="well-known location"
59345
59346  # Let's start with an optimistic view of the world :-)
59347  FOUND_FREETYPE=yes
59348
59349  # First look for the canonical freetype main include file ft2build.h.
59350  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59351    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59352    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59353    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59354      # Fail.
59355      FOUND_FREETYPE=no
59356    fi
59357  fi
59358
59359  if test "x$FOUND_FREETYPE" = xyes; then
59360    # Include file found, let's continue the sanity check.
59361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59362$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59363
59364    # Reset to default value
59365    FREETYPE_BASE_NAME=freetype
59366    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59367    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59368      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59369          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59370        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59371        # for the .6 version explicitly.
59372        FREETYPE_BASE_NAME=freetype.6
59373        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59374        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59375$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59376      else
59377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59378$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59379        FOUND_FREETYPE=no
59380      fi
59381    else
59382      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59383        # On Windows, we will need both .lib and .dll file.
59384        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59385          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59386$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59387          FOUND_FREETYPE=no
59388        fi
59389      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59390          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59391        # Found lib in isa dir, use that instead.
59392        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59393        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59394$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59395      fi
59396    fi
59397  fi
59398
59399  if test "x$FOUND_FREETYPE" = xyes; then
59400
59401  # Only process if variable expands to non-empty
59402
59403  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59405
59406  # Input might be given as Windows format, start by converting to
59407  # unix format.
59408  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59409  new_path=`$CYGPATH -u "$path"`
59410
59411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59414  # "foo.exe" is OK but "foo" is an error.
59415  #
59416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59417  # It is also a way to make sure we got the proper file name for the real test later on.
59418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59419  if test "x$test_shortpath" = x; then
59420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59422    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59423  fi
59424
59425  # Call helper function which possibly converts this using DOS-style short mode.
59426  # If so, the updated path is stored in $new_path.
59427
59428  input_path="$new_path"
59429  # Check if we need to convert this using DOS-style short mode. If the path
59430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59431  # take no chances and rewrite it.
59432  # Note: m4 eats our [], so we need to use [ and ] instead.
59433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59434  if test "x$has_forbidden_chars" != x; then
59435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59439      # Going to short mode and back again did indeed matter. Since short mode is
59440      # case insensitive, let's make it lowercase to improve readability.
59441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59442      # Now convert it back to Unix-style (cygpath)
59443      input_path=`$CYGPATH -u "$shortmode_path"`
59444      new_path="$input_path"
59445    fi
59446  fi
59447
59448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59449  if test "x$test_cygdrive_prefix" = x; then
59450    # As a simple fix, exclude /usr/bin since it's not a real path.
59451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59453      # a path prefixed by /cygdrive for fixpath to work.
59454      new_path="$CYGWIN_ROOT_PATH$input_path"
59455    fi
59456  fi
59457
59458
59459  if test "x$path" != "x$new_path"; then
59460    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59463  fi
59464
59465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59466
59467  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59468  has_colon=`$ECHO $path | $GREP ^.:`
59469  new_path="$path"
59470  if test "x$has_colon" = x; then
59471    # Not in mixed or Windows style, start by that.
59472    new_path=`cmd //c echo $path`
59473  fi
59474
59475
59476  input_path="$new_path"
59477  # Check if we need to convert this using DOS-style short mode. If the path
59478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59479  # take no chances and rewrite it.
59480  # Note: m4 eats our [], so we need to use [ and ] instead.
59481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59482  if test "x$has_forbidden_chars" != x; then
59483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59485  fi
59486
59487
59488  windows_path="$new_path"
59489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59490    unix_path=`$CYGPATH -u "$windows_path"`
59491    new_path="$unix_path"
59492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59494    new_path="$unix_path"
59495  fi
59496
59497  if test "x$path" != "x$new_path"; then
59498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59501  fi
59502
59503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59505
59506    else
59507      # We're on a unix platform. Hooray! :)
59508      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59509      has_space=`$ECHO "$path" | $GREP " "`
59510      if test "x$has_space" != x; then
59511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59514      fi
59515
59516      # Use eval to expand a potential ~
59517      eval path="$path"
59518      if test ! -f "$path" && test ! -d "$path"; then
59519        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59520      fi
59521
59522      if test -d "$path"; then
59523        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59524      else
59525        dir="`$DIRNAME "$path"`"
59526        base="`$BASENAME "$path"`"
59527        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59528      fi
59529    fi
59530  fi
59531
59532
59533  # Only process if variable expands to non-empty
59534
59535  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59537
59538  # Input might be given as Windows format, start by converting to
59539  # unix format.
59540  path="$POTENTIAL_FREETYPE_LIB_PATH"
59541  new_path=`$CYGPATH -u "$path"`
59542
59543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59546  # "foo.exe" is OK but "foo" is an error.
59547  #
59548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59549  # It is also a way to make sure we got the proper file name for the real test later on.
59550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59551  if test "x$test_shortpath" = x; then
59552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59554    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59555  fi
59556
59557  # Call helper function which possibly converts this using DOS-style short mode.
59558  # If so, the updated path is stored in $new_path.
59559
59560  input_path="$new_path"
59561  # Check if we need to convert this using DOS-style short mode. If the path
59562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59563  # take no chances and rewrite it.
59564  # Note: m4 eats our [], so we need to use [ and ] instead.
59565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59566  if test "x$has_forbidden_chars" != x; then
59567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59571      # Going to short mode and back again did indeed matter. Since short mode is
59572      # case insensitive, let's make it lowercase to improve readability.
59573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59574      # Now convert it back to Unix-style (cygpath)
59575      input_path=`$CYGPATH -u "$shortmode_path"`
59576      new_path="$input_path"
59577    fi
59578  fi
59579
59580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59581  if test "x$test_cygdrive_prefix" = x; then
59582    # As a simple fix, exclude /usr/bin since it's not a real path.
59583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59585      # a path prefixed by /cygdrive for fixpath to work.
59586      new_path="$CYGWIN_ROOT_PATH$input_path"
59587    fi
59588  fi
59589
59590
59591  if test "x$path" != "x$new_path"; then
59592    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59595  fi
59596
59597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59598
59599  path="$POTENTIAL_FREETYPE_LIB_PATH"
59600  has_colon=`$ECHO $path | $GREP ^.:`
59601  new_path="$path"
59602  if test "x$has_colon" = x; then
59603    # Not in mixed or Windows style, start by that.
59604    new_path=`cmd //c echo $path`
59605  fi
59606
59607
59608  input_path="$new_path"
59609  # Check if we need to convert this using DOS-style short mode. If the path
59610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59611  # take no chances and rewrite it.
59612  # Note: m4 eats our [], so we need to use [ and ] instead.
59613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59614  if test "x$has_forbidden_chars" != x; then
59615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59617  fi
59618
59619
59620  windows_path="$new_path"
59621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59622    unix_path=`$CYGPATH -u "$windows_path"`
59623    new_path="$unix_path"
59624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59626    new_path="$unix_path"
59627  fi
59628
59629  if test "x$path" != "x$new_path"; then
59630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59633  fi
59634
59635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59637
59638    else
59639      # We're on a unix platform. Hooray! :)
59640      path="$POTENTIAL_FREETYPE_LIB_PATH"
59641      has_space=`$ECHO "$path" | $GREP " "`
59642      if test "x$has_space" != x; then
59643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59646      fi
59647
59648      # Use eval to expand a potential ~
59649      eval path="$path"
59650      if test ! -f "$path" && test ! -d "$path"; then
59651        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59652      fi
59653
59654      if test -d "$path"; then
59655        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59656      else
59657        dir="`$DIRNAME "$path"`"
59658        base="`$BASENAME "$path"`"
59659        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59660      fi
59661    fi
59662  fi
59663
59664
59665    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59667$as_echo_n "checking for freetype includes... " >&6; }
59668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59669$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59670    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59672$as_echo_n "checking for freetype libraries... " >&6; }
59673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59674$as_echo "$FREETYPE_LIB_PATH" >&6; }
59675  fi
59676
59677              else
59678
59679  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59680  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59681  METHOD="well-known location"
59682
59683  # Let's start with an optimistic view of the world :-)
59684  FOUND_FREETYPE=yes
59685
59686  # First look for the canonical freetype main include file ft2build.h.
59687  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59688    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59689    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59690    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59691      # Fail.
59692      FOUND_FREETYPE=no
59693    fi
59694  fi
59695
59696  if test "x$FOUND_FREETYPE" = xyes; then
59697    # Include file found, let's continue the sanity check.
59698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59699$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59700
59701    # Reset to default value
59702    FREETYPE_BASE_NAME=freetype
59703    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59704    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59705      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59706          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59707        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59708        # for the .6 version explicitly.
59709        FREETYPE_BASE_NAME=freetype.6
59710        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59711        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59712$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59713      else
59714        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59716        FOUND_FREETYPE=no
59717      fi
59718    else
59719      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59720        # On Windows, we will need both .lib and .dll file.
59721        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59722          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59723$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59724          FOUND_FREETYPE=no
59725        fi
59726      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59727          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59728        # Found lib in isa dir, use that instead.
59729        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59730        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59731$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59732      fi
59733    fi
59734  fi
59735
59736  if test "x$FOUND_FREETYPE" = xyes; then
59737
59738  # Only process if variable expands to non-empty
59739
59740  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59742
59743  # Input might be given as Windows format, start by converting to
59744  # unix format.
59745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59746  new_path=`$CYGPATH -u "$path"`
59747
59748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59751  # "foo.exe" is OK but "foo" is an error.
59752  #
59753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59754  # It is also a way to make sure we got the proper file name for the real test later on.
59755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59756  if test "x$test_shortpath" = x; then
59757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59759    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59760  fi
59761
59762  # Call helper function which possibly converts this using DOS-style short mode.
59763  # If so, the updated path is stored in $new_path.
59764
59765  input_path="$new_path"
59766  # Check if we need to convert this using DOS-style short mode. If the path
59767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59768  # take no chances and rewrite it.
59769  # Note: m4 eats our [], so we need to use [ and ] instead.
59770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59771  if test "x$has_forbidden_chars" != x; then
59772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59776      # Going to short mode and back again did indeed matter. Since short mode is
59777      # case insensitive, let's make it lowercase to improve readability.
59778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59779      # Now convert it back to Unix-style (cygpath)
59780      input_path=`$CYGPATH -u "$shortmode_path"`
59781      new_path="$input_path"
59782    fi
59783  fi
59784
59785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59786  if test "x$test_cygdrive_prefix" = x; then
59787    # As a simple fix, exclude /usr/bin since it's not a real path.
59788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59790      # a path prefixed by /cygdrive for fixpath to work.
59791      new_path="$CYGWIN_ROOT_PATH$input_path"
59792    fi
59793  fi
59794
59795
59796  if test "x$path" != "x$new_path"; then
59797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59800  fi
59801
59802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59803
59804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59805  has_colon=`$ECHO $path | $GREP ^.:`
59806  new_path="$path"
59807  if test "x$has_colon" = x; then
59808    # Not in mixed or Windows style, start by that.
59809    new_path=`cmd //c echo $path`
59810  fi
59811
59812
59813  input_path="$new_path"
59814  # Check if we need to convert this using DOS-style short mode. If the path
59815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59816  # take no chances and rewrite it.
59817  # Note: m4 eats our [], so we need to use [ and ] instead.
59818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59819  if test "x$has_forbidden_chars" != x; then
59820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59822  fi
59823
59824
59825  windows_path="$new_path"
59826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59827    unix_path=`$CYGPATH -u "$windows_path"`
59828    new_path="$unix_path"
59829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59831    new_path="$unix_path"
59832  fi
59833
59834  if test "x$path" != "x$new_path"; then
59835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59838  fi
59839
59840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59842
59843    else
59844      # We're on a unix platform. Hooray! :)
59845      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59846      has_space=`$ECHO "$path" | $GREP " "`
59847      if test "x$has_space" != x; then
59848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59851      fi
59852
59853      # Use eval to expand a potential ~
59854      eval path="$path"
59855      if test ! -f "$path" && test ! -d "$path"; then
59856        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59857      fi
59858
59859      if test -d "$path"; then
59860        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59861      else
59862        dir="`$DIRNAME "$path"`"
59863        base="`$BASENAME "$path"`"
59864        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59865      fi
59866    fi
59867  fi
59868
59869
59870  # Only process if variable expands to non-empty
59871
59872  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59874
59875  # Input might be given as Windows format, start by converting to
59876  # unix format.
59877  path="$POTENTIAL_FREETYPE_LIB_PATH"
59878  new_path=`$CYGPATH -u "$path"`
59879
59880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59883  # "foo.exe" is OK but "foo" is an error.
59884  #
59885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59886  # It is also a way to make sure we got the proper file name for the real test later on.
59887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59888  if test "x$test_shortpath" = x; then
59889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59890$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59891    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59892  fi
59893
59894  # Call helper function which possibly converts this using DOS-style short mode.
59895  # If so, the updated path is stored in $new_path.
59896
59897  input_path="$new_path"
59898  # Check if we need to convert this using DOS-style short mode. If the path
59899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59900  # take no chances and rewrite it.
59901  # Note: m4 eats our [], so we need to use [ and ] instead.
59902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59903  if test "x$has_forbidden_chars" != x; then
59904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59908      # Going to short mode and back again did indeed matter. Since short mode is
59909      # case insensitive, let's make it lowercase to improve readability.
59910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59911      # Now convert it back to Unix-style (cygpath)
59912      input_path=`$CYGPATH -u "$shortmode_path"`
59913      new_path="$input_path"
59914    fi
59915  fi
59916
59917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59918  if test "x$test_cygdrive_prefix" = x; then
59919    # As a simple fix, exclude /usr/bin since it's not a real path.
59920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59922      # a path prefixed by /cygdrive for fixpath to work.
59923      new_path="$CYGWIN_ROOT_PATH$input_path"
59924    fi
59925  fi
59926
59927
59928  if test "x$path" != "x$new_path"; then
59929    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59932  fi
59933
59934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59935
59936  path="$POTENTIAL_FREETYPE_LIB_PATH"
59937  has_colon=`$ECHO $path | $GREP ^.:`
59938  new_path="$path"
59939  if test "x$has_colon" = x; then
59940    # Not in mixed or Windows style, start by that.
59941    new_path=`cmd //c echo $path`
59942  fi
59943
59944
59945  input_path="$new_path"
59946  # Check if we need to convert this using DOS-style short mode. If the path
59947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59948  # take no chances and rewrite it.
59949  # Note: m4 eats our [], so we need to use [ and ] instead.
59950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59951  if test "x$has_forbidden_chars" != x; then
59952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59954  fi
59955
59956
59957  windows_path="$new_path"
59958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59959    unix_path=`$CYGPATH -u "$windows_path"`
59960    new_path="$unix_path"
59961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59963    new_path="$unix_path"
59964  fi
59965
59966  if test "x$path" != "x$new_path"; then
59967    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59970  fi
59971
59972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59974
59975    else
59976      # We're on a unix platform. Hooray! :)
59977      path="$POTENTIAL_FREETYPE_LIB_PATH"
59978      has_space=`$ECHO "$path" | $GREP " "`
59979      if test "x$has_space" != x; then
59980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59983      fi
59984
59985      # Use eval to expand a potential ~
59986      eval path="$path"
59987      if test ! -f "$path" && test ! -d "$path"; then
59988        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59989      fi
59990
59991      if test -d "$path"; then
59992        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59993      else
59994        dir="`$DIRNAME "$path"`"
59995        base="`$BASENAME "$path"`"
59996        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59997      fi
59998    fi
59999  fi
60000
60001
60002    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60004$as_echo_n "checking for freetype includes... " >&6; }
60005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60006$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60007    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60009$as_echo_n "checking for freetype libraries... " >&6; }
60010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60011$as_echo "$FREETYPE_LIB_PATH" >&6; }
60012  fi
60013
60014              fi
60015            fi
60016          fi
60017        else
60018          FREETYPE_BASE_DIR="$SYSROOT/usr"
60019
60020  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60021  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60022  METHOD="well-known location"
60023
60024  # Let's start with an optimistic view of the world :-)
60025  FOUND_FREETYPE=yes
60026
60027  # First look for the canonical freetype main include file ft2build.h.
60028  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60029    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60030    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60031    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60032      # Fail.
60033      FOUND_FREETYPE=no
60034    fi
60035  fi
60036
60037  if test "x$FOUND_FREETYPE" = xyes; then
60038    # Include file found, let's continue the sanity check.
60039    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60040$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60041
60042    # Reset to default value
60043    FREETYPE_BASE_NAME=freetype
60044    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60045    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60046      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60047          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60048        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60049        # for the .6 version explicitly.
60050        FREETYPE_BASE_NAME=freetype.6
60051        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60052        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60053$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60054      else
60055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60056$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60057        FOUND_FREETYPE=no
60058      fi
60059    else
60060      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60061        # On Windows, we will need both .lib and .dll file.
60062        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60063          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60064$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60065          FOUND_FREETYPE=no
60066        fi
60067      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60068          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60069        # Found lib in isa dir, use that instead.
60070        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60071        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60072$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60073      fi
60074    fi
60075  fi
60076
60077  if test "x$FOUND_FREETYPE" = xyes; then
60078
60079  # Only process if variable expands to non-empty
60080
60081  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60083
60084  # Input might be given as Windows format, start by converting to
60085  # unix format.
60086  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60087  new_path=`$CYGPATH -u "$path"`
60088
60089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60092  # "foo.exe" is OK but "foo" is an error.
60093  #
60094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60095  # It is also a way to make sure we got the proper file name for the real test later on.
60096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60097  if test "x$test_shortpath" = x; then
60098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60100    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60101  fi
60102
60103  # Call helper function which possibly converts this using DOS-style short mode.
60104  # If so, the updated path is stored in $new_path.
60105
60106  input_path="$new_path"
60107  # Check if we need to convert this using DOS-style short mode. If the path
60108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60109  # take no chances and rewrite it.
60110  # Note: m4 eats our [], so we need to use [ and ] instead.
60111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60112  if test "x$has_forbidden_chars" != x; then
60113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60117      # Going to short mode and back again did indeed matter. Since short mode is
60118      # case insensitive, let's make it lowercase to improve readability.
60119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60120      # Now convert it back to Unix-style (cygpath)
60121      input_path=`$CYGPATH -u "$shortmode_path"`
60122      new_path="$input_path"
60123    fi
60124  fi
60125
60126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60127  if test "x$test_cygdrive_prefix" = x; then
60128    # As a simple fix, exclude /usr/bin since it's not a real path.
60129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60131      # a path prefixed by /cygdrive for fixpath to work.
60132      new_path="$CYGWIN_ROOT_PATH$input_path"
60133    fi
60134  fi
60135
60136
60137  if test "x$path" != "x$new_path"; then
60138    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60141  fi
60142
60143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60144
60145  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60146  has_colon=`$ECHO $path | $GREP ^.:`
60147  new_path="$path"
60148  if test "x$has_colon" = x; then
60149    # Not in mixed or Windows style, start by that.
60150    new_path=`cmd //c echo $path`
60151  fi
60152
60153
60154  input_path="$new_path"
60155  # Check if we need to convert this using DOS-style short mode. If the path
60156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60157  # take no chances and rewrite it.
60158  # Note: m4 eats our [], so we need to use [ and ] instead.
60159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60160  if test "x$has_forbidden_chars" != x; then
60161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60163  fi
60164
60165
60166  windows_path="$new_path"
60167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60168    unix_path=`$CYGPATH -u "$windows_path"`
60169    new_path="$unix_path"
60170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60172    new_path="$unix_path"
60173  fi
60174
60175  if test "x$path" != "x$new_path"; then
60176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60179  fi
60180
60181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60183
60184    else
60185      # We're on a unix platform. Hooray! :)
60186      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60187      has_space=`$ECHO "$path" | $GREP " "`
60188      if test "x$has_space" != x; then
60189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60192      fi
60193
60194      # Use eval to expand a potential ~
60195      eval path="$path"
60196      if test ! -f "$path" && test ! -d "$path"; then
60197        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60198      fi
60199
60200      if test -d "$path"; then
60201        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60202      else
60203        dir="`$DIRNAME "$path"`"
60204        base="`$BASENAME "$path"`"
60205        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60206      fi
60207    fi
60208  fi
60209
60210
60211  # Only process if variable expands to non-empty
60212
60213  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60215
60216  # Input might be given as Windows format, start by converting to
60217  # unix format.
60218  path="$POTENTIAL_FREETYPE_LIB_PATH"
60219  new_path=`$CYGPATH -u "$path"`
60220
60221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60224  # "foo.exe" is OK but "foo" is an error.
60225  #
60226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60227  # It is also a way to make sure we got the proper file name for the real test later on.
60228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60229  if test "x$test_shortpath" = x; then
60230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60232    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60233  fi
60234
60235  # Call helper function which possibly converts this using DOS-style short mode.
60236  # If so, the updated path is stored in $new_path.
60237
60238  input_path="$new_path"
60239  # Check if we need to convert this using DOS-style short mode. If the path
60240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60241  # take no chances and rewrite it.
60242  # Note: m4 eats our [], so we need to use [ and ] instead.
60243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60244  if test "x$has_forbidden_chars" != x; then
60245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60249      # Going to short mode and back again did indeed matter. Since short mode is
60250      # case insensitive, let's make it lowercase to improve readability.
60251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60252      # Now convert it back to Unix-style (cygpath)
60253      input_path=`$CYGPATH -u "$shortmode_path"`
60254      new_path="$input_path"
60255    fi
60256  fi
60257
60258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60259  if test "x$test_cygdrive_prefix" = x; then
60260    # As a simple fix, exclude /usr/bin since it's not a real path.
60261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60263      # a path prefixed by /cygdrive for fixpath to work.
60264      new_path="$CYGWIN_ROOT_PATH$input_path"
60265    fi
60266  fi
60267
60268
60269  if test "x$path" != "x$new_path"; then
60270    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60273  fi
60274
60275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60276
60277  path="$POTENTIAL_FREETYPE_LIB_PATH"
60278  has_colon=`$ECHO $path | $GREP ^.:`
60279  new_path="$path"
60280  if test "x$has_colon" = x; then
60281    # Not in mixed or Windows style, start by that.
60282    new_path=`cmd //c echo $path`
60283  fi
60284
60285
60286  input_path="$new_path"
60287  # Check if we need to convert this using DOS-style short mode. If the path
60288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60289  # take no chances and rewrite it.
60290  # Note: m4 eats our [], so we need to use [ and ] instead.
60291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60292  if test "x$has_forbidden_chars" != x; then
60293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60295  fi
60296
60297
60298  windows_path="$new_path"
60299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60300    unix_path=`$CYGPATH -u "$windows_path"`
60301    new_path="$unix_path"
60302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60304    new_path="$unix_path"
60305  fi
60306
60307  if test "x$path" != "x$new_path"; then
60308    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60311  fi
60312
60313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60315
60316    else
60317      # We're on a unix platform. Hooray! :)
60318      path="$POTENTIAL_FREETYPE_LIB_PATH"
60319      has_space=`$ECHO "$path" | $GREP " "`
60320      if test "x$has_space" != x; then
60321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60324      fi
60325
60326      # Use eval to expand a potential ~
60327      eval path="$path"
60328      if test ! -f "$path" && test ! -d "$path"; then
60329        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60330      fi
60331
60332      if test -d "$path"; then
60333        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60334      else
60335        dir="`$DIRNAME "$path"`"
60336        base="`$BASENAME "$path"`"
60337        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60338      fi
60339    fi
60340  fi
60341
60342
60343    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60345$as_echo_n "checking for freetype includes... " >&6; }
60346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60347$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60348    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60350$as_echo_n "checking for freetype libraries... " >&6; }
60351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60352$as_echo "$FREETYPE_LIB_PATH" >&6; }
60353  fi
60354
60355
60356          if test "x$FOUND_FREETYPE" != xyes; then
60357            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60358
60359  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60360  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60361  METHOD="well-known location"
60362
60363  # Let's start with an optimistic view of the world :-)
60364  FOUND_FREETYPE=yes
60365
60366  # First look for the canonical freetype main include file ft2build.h.
60367  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60368    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60369    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60370    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60371      # Fail.
60372      FOUND_FREETYPE=no
60373    fi
60374  fi
60375
60376  if test "x$FOUND_FREETYPE" = xyes; then
60377    # Include file found, let's continue the sanity check.
60378    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60379$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60380
60381    # Reset to default value
60382    FREETYPE_BASE_NAME=freetype
60383    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60384    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60385      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60386          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60387        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60388        # for the .6 version explicitly.
60389        FREETYPE_BASE_NAME=freetype.6
60390        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60391        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60392$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60393      else
60394        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60395$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60396        FOUND_FREETYPE=no
60397      fi
60398    else
60399      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60400        # On Windows, we will need both .lib and .dll file.
60401        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60402          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60403$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60404          FOUND_FREETYPE=no
60405        fi
60406      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60408        # Found lib in isa dir, use that instead.
60409        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60410        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60411$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60412      fi
60413    fi
60414  fi
60415
60416  if test "x$FOUND_FREETYPE" = xyes; then
60417
60418  # Only process if variable expands to non-empty
60419
60420  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60422
60423  # Input might be given as Windows format, start by converting to
60424  # unix format.
60425  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60426  new_path=`$CYGPATH -u "$path"`
60427
60428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60431  # "foo.exe" is OK but "foo" is an error.
60432  #
60433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60434  # It is also a way to make sure we got the proper file name for the real test later on.
60435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60436  if test "x$test_shortpath" = x; then
60437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60438$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60439    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60440  fi
60441
60442  # Call helper function which possibly converts this using DOS-style short mode.
60443  # If so, the updated path is stored in $new_path.
60444
60445  input_path="$new_path"
60446  # Check if we need to convert this using DOS-style short mode. If the path
60447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60448  # take no chances and rewrite it.
60449  # Note: m4 eats our [], so we need to use [ and ] instead.
60450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60451  if test "x$has_forbidden_chars" != x; then
60452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60456      # Going to short mode and back again did indeed matter. Since short mode is
60457      # case insensitive, let's make it lowercase to improve readability.
60458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60459      # Now convert it back to Unix-style (cygpath)
60460      input_path=`$CYGPATH -u "$shortmode_path"`
60461      new_path="$input_path"
60462    fi
60463  fi
60464
60465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60466  if test "x$test_cygdrive_prefix" = x; then
60467    # As a simple fix, exclude /usr/bin since it's not a real path.
60468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60470      # a path prefixed by /cygdrive for fixpath to work.
60471      new_path="$CYGWIN_ROOT_PATH$input_path"
60472    fi
60473  fi
60474
60475
60476  if test "x$path" != "x$new_path"; then
60477    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60479$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60480  fi
60481
60482    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60483
60484  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60485  has_colon=`$ECHO $path | $GREP ^.:`
60486  new_path="$path"
60487  if test "x$has_colon" = x; then
60488    # Not in mixed or Windows style, start by that.
60489    new_path=`cmd //c echo $path`
60490  fi
60491
60492
60493  input_path="$new_path"
60494  # Check if we need to convert this using DOS-style short mode. If the path
60495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60496  # take no chances and rewrite it.
60497  # Note: m4 eats our [], so we need to use [ and ] instead.
60498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60499  if test "x$has_forbidden_chars" != x; then
60500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60502  fi
60503
60504
60505  windows_path="$new_path"
60506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60507    unix_path=`$CYGPATH -u "$windows_path"`
60508    new_path="$unix_path"
60509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60511    new_path="$unix_path"
60512  fi
60513
60514  if test "x$path" != "x$new_path"; then
60515    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60518  fi
60519
60520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60522
60523    else
60524      # We're on a unix platform. Hooray! :)
60525      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60526      has_space=`$ECHO "$path" | $GREP " "`
60527      if test "x$has_space" != x; then
60528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60529$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60530        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60531      fi
60532
60533      # Use eval to expand a potential ~
60534      eval path="$path"
60535      if test ! -f "$path" && test ! -d "$path"; then
60536        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60537      fi
60538
60539      if test -d "$path"; then
60540        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60541      else
60542        dir="`$DIRNAME "$path"`"
60543        base="`$BASENAME "$path"`"
60544        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60545      fi
60546    fi
60547  fi
60548
60549
60550  # Only process if variable expands to non-empty
60551
60552  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60554
60555  # Input might be given as Windows format, start by converting to
60556  # unix format.
60557  path="$POTENTIAL_FREETYPE_LIB_PATH"
60558  new_path=`$CYGPATH -u "$path"`
60559
60560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60563  # "foo.exe" is OK but "foo" is an error.
60564  #
60565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60566  # It is also a way to make sure we got the proper file name for the real test later on.
60567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60568  if test "x$test_shortpath" = x; then
60569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60571    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60572  fi
60573
60574  # Call helper function which possibly converts this using DOS-style short mode.
60575  # If so, the updated path is stored in $new_path.
60576
60577  input_path="$new_path"
60578  # Check if we need to convert this using DOS-style short mode. If the path
60579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60580  # take no chances and rewrite it.
60581  # Note: m4 eats our [], so we need to use [ and ] instead.
60582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60583  if test "x$has_forbidden_chars" != x; then
60584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60588      # Going to short mode and back again did indeed matter. Since short mode is
60589      # case insensitive, let's make it lowercase to improve readability.
60590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60591      # Now convert it back to Unix-style (cygpath)
60592      input_path=`$CYGPATH -u "$shortmode_path"`
60593      new_path="$input_path"
60594    fi
60595  fi
60596
60597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60598  if test "x$test_cygdrive_prefix" = x; then
60599    # As a simple fix, exclude /usr/bin since it's not a real path.
60600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60602      # a path prefixed by /cygdrive for fixpath to work.
60603      new_path="$CYGWIN_ROOT_PATH$input_path"
60604    fi
60605  fi
60606
60607
60608  if test "x$path" != "x$new_path"; then
60609    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60612  fi
60613
60614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60615
60616  path="$POTENTIAL_FREETYPE_LIB_PATH"
60617  has_colon=`$ECHO $path | $GREP ^.:`
60618  new_path="$path"
60619  if test "x$has_colon" = x; then
60620    # Not in mixed or Windows style, start by that.
60621    new_path=`cmd //c echo $path`
60622  fi
60623
60624
60625  input_path="$new_path"
60626  # Check if we need to convert this using DOS-style short mode. If the path
60627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60628  # take no chances and rewrite it.
60629  # Note: m4 eats our [], so we need to use [ and ] instead.
60630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60631  if test "x$has_forbidden_chars" != x; then
60632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60634  fi
60635
60636
60637  windows_path="$new_path"
60638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60639    unix_path=`$CYGPATH -u "$windows_path"`
60640    new_path="$unix_path"
60641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60643    new_path="$unix_path"
60644  fi
60645
60646  if test "x$path" != "x$new_path"; then
60647    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60650  fi
60651
60652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60654
60655    else
60656      # We're on a unix platform. Hooray! :)
60657      path="$POTENTIAL_FREETYPE_LIB_PATH"
60658      has_space=`$ECHO "$path" | $GREP " "`
60659      if test "x$has_space" != x; then
60660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60663      fi
60664
60665      # Use eval to expand a potential ~
60666      eval path="$path"
60667      if test ! -f "$path" && test ! -d "$path"; then
60668        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60669      fi
60670
60671      if test -d "$path"; then
60672        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60673      else
60674        dir="`$DIRNAME "$path"`"
60675        base="`$BASENAME "$path"`"
60676        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60677      fi
60678    fi
60679  fi
60680
60681
60682    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60684$as_echo_n "checking for freetype includes... " >&6; }
60685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60686$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60687    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60689$as_echo_n "checking for freetype libraries... " >&6; }
60690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60691$as_echo "$FREETYPE_LIB_PATH" >&6; }
60692  fi
60693
60694          fi
60695          if test "x$FOUND_FREETYPE" != xyes; then
60696            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60697
60698  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60699  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60700  METHOD="well-known location"
60701
60702  # Let's start with an optimistic view of the world :-)
60703  FOUND_FREETYPE=yes
60704
60705  # First look for the canonical freetype main include file ft2build.h.
60706  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60707    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60708    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60709    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60710      # Fail.
60711      FOUND_FREETYPE=no
60712    fi
60713  fi
60714
60715  if test "x$FOUND_FREETYPE" = xyes; then
60716    # Include file found, let's continue the sanity check.
60717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60718$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60719
60720    # Reset to default value
60721    FREETYPE_BASE_NAME=freetype
60722    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60723    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60724      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60725          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60726        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60727        # for the .6 version explicitly.
60728        FREETYPE_BASE_NAME=freetype.6
60729        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60730        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60731$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60732      else
60733        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60734$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60735        FOUND_FREETYPE=no
60736      fi
60737    else
60738      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60739        # On Windows, we will need both .lib and .dll file.
60740        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60741          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60742$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60743          FOUND_FREETYPE=no
60744        fi
60745      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60747        # Found lib in isa dir, use that instead.
60748        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60749        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60750$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60751      fi
60752    fi
60753  fi
60754
60755  if test "x$FOUND_FREETYPE" = xyes; then
60756
60757  # Only process if variable expands to non-empty
60758
60759  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60761
60762  # Input might be given as Windows format, start by converting to
60763  # unix format.
60764  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60765  new_path=`$CYGPATH -u "$path"`
60766
60767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60770  # "foo.exe" is OK but "foo" is an error.
60771  #
60772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60773  # It is also a way to make sure we got the proper file name for the real test later on.
60774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60775  if test "x$test_shortpath" = x; then
60776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60778    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60779  fi
60780
60781  # Call helper function which possibly converts this using DOS-style short mode.
60782  # If so, the updated path is stored in $new_path.
60783
60784  input_path="$new_path"
60785  # Check if we need to convert this using DOS-style short mode. If the path
60786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60787  # take no chances and rewrite it.
60788  # Note: m4 eats our [], so we need to use [ and ] instead.
60789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60790  if test "x$has_forbidden_chars" != x; then
60791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60795      # Going to short mode and back again did indeed matter. Since short mode is
60796      # case insensitive, let's make it lowercase to improve readability.
60797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60798      # Now convert it back to Unix-style (cygpath)
60799      input_path=`$CYGPATH -u "$shortmode_path"`
60800      new_path="$input_path"
60801    fi
60802  fi
60803
60804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60805  if test "x$test_cygdrive_prefix" = x; then
60806    # As a simple fix, exclude /usr/bin since it's not a real path.
60807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60809      # a path prefixed by /cygdrive for fixpath to work.
60810      new_path="$CYGWIN_ROOT_PATH$input_path"
60811    fi
60812  fi
60813
60814
60815  if test "x$path" != "x$new_path"; then
60816    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60818$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60819  fi
60820
60821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60822
60823  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60824  has_colon=`$ECHO $path | $GREP ^.:`
60825  new_path="$path"
60826  if test "x$has_colon" = x; then
60827    # Not in mixed or Windows style, start by that.
60828    new_path=`cmd //c echo $path`
60829  fi
60830
60831
60832  input_path="$new_path"
60833  # Check if we need to convert this using DOS-style short mode. If the path
60834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60835  # take no chances and rewrite it.
60836  # Note: m4 eats our [], so we need to use [ and ] instead.
60837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60838  if test "x$has_forbidden_chars" != x; then
60839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60841  fi
60842
60843
60844  windows_path="$new_path"
60845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60846    unix_path=`$CYGPATH -u "$windows_path"`
60847    new_path="$unix_path"
60848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60850    new_path="$unix_path"
60851  fi
60852
60853  if test "x$path" != "x$new_path"; then
60854    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60856$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60857  fi
60858
60859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60861
60862    else
60863      # We're on a unix platform. Hooray! :)
60864      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60865      has_space=`$ECHO "$path" | $GREP " "`
60866      if test "x$has_space" != x; then
60867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60870      fi
60871
60872      # Use eval to expand a potential ~
60873      eval path="$path"
60874      if test ! -f "$path" && test ! -d "$path"; then
60875        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60876      fi
60877
60878      if test -d "$path"; then
60879        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60880      else
60881        dir="`$DIRNAME "$path"`"
60882        base="`$BASENAME "$path"`"
60883        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60884      fi
60885    fi
60886  fi
60887
60888
60889  # Only process if variable expands to non-empty
60890
60891  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60893
60894  # Input might be given as Windows format, start by converting to
60895  # unix format.
60896  path="$POTENTIAL_FREETYPE_LIB_PATH"
60897  new_path=`$CYGPATH -u "$path"`
60898
60899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60902  # "foo.exe" is OK but "foo" is an error.
60903  #
60904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60905  # It is also a way to make sure we got the proper file name for the real test later on.
60906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60907  if test "x$test_shortpath" = x; then
60908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60911  fi
60912
60913  # Call helper function which possibly converts this using DOS-style short mode.
60914  # If so, the updated path is stored in $new_path.
60915
60916  input_path="$new_path"
60917  # Check if we need to convert this using DOS-style short mode. If the path
60918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60919  # take no chances and rewrite it.
60920  # Note: m4 eats our [], so we need to use [ and ] instead.
60921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60922  if test "x$has_forbidden_chars" != x; then
60923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60927      # Going to short mode and back again did indeed matter. Since short mode is
60928      # case insensitive, let's make it lowercase to improve readability.
60929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60930      # Now convert it back to Unix-style (cygpath)
60931      input_path=`$CYGPATH -u "$shortmode_path"`
60932      new_path="$input_path"
60933    fi
60934  fi
60935
60936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60937  if test "x$test_cygdrive_prefix" = x; then
60938    # As a simple fix, exclude /usr/bin since it's not a real path.
60939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60941      # a path prefixed by /cygdrive for fixpath to work.
60942      new_path="$CYGWIN_ROOT_PATH$input_path"
60943    fi
60944  fi
60945
60946
60947  if test "x$path" != "x$new_path"; then
60948    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60951  fi
60952
60953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60954
60955  path="$POTENTIAL_FREETYPE_LIB_PATH"
60956  has_colon=`$ECHO $path | $GREP ^.:`
60957  new_path="$path"
60958  if test "x$has_colon" = x; then
60959    # Not in mixed or Windows style, start by that.
60960    new_path=`cmd //c echo $path`
60961  fi
60962
60963
60964  input_path="$new_path"
60965  # Check if we need to convert this using DOS-style short mode. If the path
60966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60967  # take no chances and rewrite it.
60968  # Note: m4 eats our [], so we need to use [ and ] instead.
60969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60970  if test "x$has_forbidden_chars" != x; then
60971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60973  fi
60974
60975
60976  windows_path="$new_path"
60977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60978    unix_path=`$CYGPATH -u "$windows_path"`
60979    new_path="$unix_path"
60980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60982    new_path="$unix_path"
60983  fi
60984
60985  if test "x$path" != "x$new_path"; then
60986    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60989  fi
60990
60991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60993
60994    else
60995      # We're on a unix platform. Hooray! :)
60996      path="$POTENTIAL_FREETYPE_LIB_PATH"
60997      has_space=`$ECHO "$path" | $GREP " "`
60998      if test "x$has_space" != x; then
60999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61002      fi
61003
61004      # Use eval to expand a potential ~
61005      eval path="$path"
61006      if test ! -f "$path" && test ! -d "$path"; then
61007        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61008      fi
61009
61010      if test -d "$path"; then
61011        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61012      else
61013        dir="`$DIRNAME "$path"`"
61014        base="`$BASENAME "$path"`"
61015        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61016      fi
61017    fi
61018  fi
61019
61020
61021    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61023$as_echo_n "checking for freetype includes... " >&6; }
61024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61025$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61026    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61028$as_echo_n "checking for freetype libraries... " >&6; }
61029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61030$as_echo "$FREETYPE_LIB_PATH" >&6; }
61031  fi
61032
61033          fi
61034
61035          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61036            if test "x$FOUND_FREETYPE" != xyes; then
61037              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61038              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61039
61040  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61041  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61042  METHOD="well-known location"
61043
61044  # Let's start with an optimistic view of the world :-)
61045  FOUND_FREETYPE=yes
61046
61047  # First look for the canonical freetype main include file ft2build.h.
61048  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61049    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61050    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61051    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61052      # Fail.
61053      FOUND_FREETYPE=no
61054    fi
61055  fi
61056
61057  if test "x$FOUND_FREETYPE" = xyes; then
61058    # Include file found, let's continue the sanity check.
61059    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61060$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61061
61062    # Reset to default value
61063    FREETYPE_BASE_NAME=freetype
61064    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61065    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61066      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61067          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61068        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61069        # for the .6 version explicitly.
61070        FREETYPE_BASE_NAME=freetype.6
61071        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61072        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61073$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61074      else
61075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61077        FOUND_FREETYPE=no
61078      fi
61079    else
61080      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61081        # On Windows, we will need both .lib and .dll file.
61082        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61083          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61085          FOUND_FREETYPE=no
61086        fi
61087      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61088          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61089        # Found lib in isa dir, use that instead.
61090        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61091        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61092$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61093      fi
61094    fi
61095  fi
61096
61097  if test "x$FOUND_FREETYPE" = xyes; then
61098
61099  # Only process if variable expands to non-empty
61100
61101  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61103
61104  # Input might be given as Windows format, start by converting to
61105  # unix format.
61106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61107  new_path=`$CYGPATH -u "$path"`
61108
61109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61112  # "foo.exe" is OK but "foo" is an error.
61113  #
61114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61115  # It is also a way to make sure we got the proper file name for the real test later on.
61116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61117  if test "x$test_shortpath" = x; then
61118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61120    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61121  fi
61122
61123  # Call helper function which possibly converts this using DOS-style short mode.
61124  # If so, the updated path is stored in $new_path.
61125
61126  input_path="$new_path"
61127  # Check if we need to convert this using DOS-style short mode. If the path
61128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61129  # take no chances and rewrite it.
61130  # Note: m4 eats our [], so we need to use [ and ] instead.
61131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61132  if test "x$has_forbidden_chars" != x; then
61133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61137      # Going to short mode and back again did indeed matter. Since short mode is
61138      # case insensitive, let's make it lowercase to improve readability.
61139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61140      # Now convert it back to Unix-style (cygpath)
61141      input_path=`$CYGPATH -u "$shortmode_path"`
61142      new_path="$input_path"
61143    fi
61144  fi
61145
61146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61147  if test "x$test_cygdrive_prefix" = x; then
61148    # As a simple fix, exclude /usr/bin since it's not a real path.
61149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61151      # a path prefixed by /cygdrive for fixpath to work.
61152      new_path="$CYGWIN_ROOT_PATH$input_path"
61153    fi
61154  fi
61155
61156
61157  if test "x$path" != "x$new_path"; then
61158    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61161  fi
61162
61163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61164
61165  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61166  has_colon=`$ECHO $path | $GREP ^.:`
61167  new_path="$path"
61168  if test "x$has_colon" = x; then
61169    # Not in mixed or Windows style, start by that.
61170    new_path=`cmd //c echo $path`
61171  fi
61172
61173
61174  input_path="$new_path"
61175  # Check if we need to convert this using DOS-style short mode. If the path
61176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61177  # take no chances and rewrite it.
61178  # Note: m4 eats our [], so we need to use [ and ] instead.
61179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61180  if test "x$has_forbidden_chars" != x; then
61181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61183  fi
61184
61185
61186  windows_path="$new_path"
61187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61188    unix_path=`$CYGPATH -u "$windows_path"`
61189    new_path="$unix_path"
61190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61192    new_path="$unix_path"
61193  fi
61194
61195  if test "x$path" != "x$new_path"; then
61196    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61199  fi
61200
61201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61203
61204    else
61205      # We're on a unix platform. Hooray! :)
61206      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61207      has_space=`$ECHO "$path" | $GREP " "`
61208      if test "x$has_space" != x; then
61209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61210$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61212      fi
61213
61214      # Use eval to expand a potential ~
61215      eval path="$path"
61216      if test ! -f "$path" && test ! -d "$path"; then
61217        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61218      fi
61219
61220      if test -d "$path"; then
61221        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61222      else
61223        dir="`$DIRNAME "$path"`"
61224        base="`$BASENAME "$path"`"
61225        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61226      fi
61227    fi
61228  fi
61229
61230
61231  # Only process if variable expands to non-empty
61232
61233  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61235
61236  # Input might be given as Windows format, start by converting to
61237  # unix format.
61238  path="$POTENTIAL_FREETYPE_LIB_PATH"
61239  new_path=`$CYGPATH -u "$path"`
61240
61241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61244  # "foo.exe" is OK but "foo" is an error.
61245  #
61246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61247  # It is also a way to make sure we got the proper file name for the real test later on.
61248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61249  if test "x$test_shortpath" = x; then
61250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61252    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61253  fi
61254
61255  # Call helper function which possibly converts this using DOS-style short mode.
61256  # If so, the updated path is stored in $new_path.
61257
61258  input_path="$new_path"
61259  # Check if we need to convert this using DOS-style short mode. If the path
61260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61261  # take no chances and rewrite it.
61262  # Note: m4 eats our [], so we need to use [ and ] instead.
61263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61264  if test "x$has_forbidden_chars" != x; then
61265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61269      # Going to short mode and back again did indeed matter. Since short mode is
61270      # case insensitive, let's make it lowercase to improve readability.
61271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61272      # Now convert it back to Unix-style (cygpath)
61273      input_path=`$CYGPATH -u "$shortmode_path"`
61274      new_path="$input_path"
61275    fi
61276  fi
61277
61278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61279  if test "x$test_cygdrive_prefix" = x; then
61280    # As a simple fix, exclude /usr/bin since it's not a real path.
61281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61283      # a path prefixed by /cygdrive for fixpath to work.
61284      new_path="$CYGWIN_ROOT_PATH$input_path"
61285    fi
61286  fi
61287
61288
61289  if test "x$path" != "x$new_path"; then
61290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61293  fi
61294
61295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61296
61297  path="$POTENTIAL_FREETYPE_LIB_PATH"
61298  has_colon=`$ECHO $path | $GREP ^.:`
61299  new_path="$path"
61300  if test "x$has_colon" = x; then
61301    # Not in mixed or Windows style, start by that.
61302    new_path=`cmd //c echo $path`
61303  fi
61304
61305
61306  input_path="$new_path"
61307  # Check if we need to convert this using DOS-style short mode. If the path
61308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61309  # take no chances and rewrite it.
61310  # Note: m4 eats our [], so we need to use [ and ] instead.
61311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61312  if test "x$has_forbidden_chars" != x; then
61313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61315  fi
61316
61317
61318  windows_path="$new_path"
61319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61320    unix_path=`$CYGPATH -u "$windows_path"`
61321    new_path="$unix_path"
61322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61324    new_path="$unix_path"
61325  fi
61326
61327  if test "x$path" != "x$new_path"; then
61328    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61331  fi
61332
61333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61335
61336    else
61337      # We're on a unix platform. Hooray! :)
61338      path="$POTENTIAL_FREETYPE_LIB_PATH"
61339      has_space=`$ECHO "$path" | $GREP " "`
61340      if test "x$has_space" != x; then
61341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61344      fi
61345
61346      # Use eval to expand a potential ~
61347      eval path="$path"
61348      if test ! -f "$path" && test ! -d "$path"; then
61349        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61350      fi
61351
61352      if test -d "$path"; then
61353        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61354      else
61355        dir="`$DIRNAME "$path"`"
61356        base="`$BASENAME "$path"`"
61357        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61358      fi
61359    fi
61360  fi
61361
61362
61363    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61365$as_echo_n "checking for freetype includes... " >&6; }
61366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61367$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61368    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61370$as_echo_n "checking for freetype libraries... " >&6; }
61371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61372$as_echo "$FREETYPE_LIB_PATH" >&6; }
61373  fi
61374
61375            fi
61376          fi
61377
61378          if test "x$FOUND_FREETYPE" != xyes; then
61379            FREETYPE_BASE_DIR="$SYSROOT/usr"
61380            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61381
61382  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61383  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61384  METHOD="well-known location"
61385
61386  # Let's start with an optimistic view of the world :-)
61387  FOUND_FREETYPE=yes
61388
61389  # First look for the canonical freetype main include file ft2build.h.
61390  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61391    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61392    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61393    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61394      # Fail.
61395      FOUND_FREETYPE=no
61396    fi
61397  fi
61398
61399  if test "x$FOUND_FREETYPE" = xyes; then
61400    # Include file found, let's continue the sanity check.
61401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61402$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61403
61404    # Reset to default value
61405    FREETYPE_BASE_NAME=freetype
61406    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61407    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61408      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61409          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61410        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61411        # for the .6 version explicitly.
61412        FREETYPE_BASE_NAME=freetype.6
61413        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61414        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61415$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61416      else
61417        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61418$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61419        FOUND_FREETYPE=no
61420      fi
61421    else
61422      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61423        # On Windows, we will need both .lib and .dll file.
61424        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61425          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61426$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61427          FOUND_FREETYPE=no
61428        fi
61429      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61430          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61431        # Found lib in isa dir, use that instead.
61432        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61433        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61434$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61435      fi
61436    fi
61437  fi
61438
61439  if test "x$FOUND_FREETYPE" = xyes; then
61440
61441  # Only process if variable expands to non-empty
61442
61443  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61445
61446  # Input might be given as Windows format, start by converting to
61447  # unix format.
61448  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61449  new_path=`$CYGPATH -u "$path"`
61450
61451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61454  # "foo.exe" is OK but "foo" is an error.
61455  #
61456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61457  # It is also a way to make sure we got the proper file name for the real test later on.
61458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61459  if test "x$test_shortpath" = x; then
61460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61462    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61463  fi
61464
61465  # Call helper function which possibly converts this using DOS-style short mode.
61466  # If so, the updated path is stored in $new_path.
61467
61468  input_path="$new_path"
61469  # Check if we need to convert this using DOS-style short mode. If the path
61470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61471  # take no chances and rewrite it.
61472  # Note: m4 eats our [], so we need to use [ and ] instead.
61473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61474  if test "x$has_forbidden_chars" != x; then
61475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61479      # Going to short mode and back again did indeed matter. Since short mode is
61480      # case insensitive, let's make it lowercase to improve readability.
61481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61482      # Now convert it back to Unix-style (cygpath)
61483      input_path=`$CYGPATH -u "$shortmode_path"`
61484      new_path="$input_path"
61485    fi
61486  fi
61487
61488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61489  if test "x$test_cygdrive_prefix" = x; then
61490    # As a simple fix, exclude /usr/bin since it's not a real path.
61491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61493      # a path prefixed by /cygdrive for fixpath to work.
61494      new_path="$CYGWIN_ROOT_PATH$input_path"
61495    fi
61496  fi
61497
61498
61499  if test "x$path" != "x$new_path"; then
61500    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61503  fi
61504
61505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61506
61507  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61508  has_colon=`$ECHO $path | $GREP ^.:`
61509  new_path="$path"
61510  if test "x$has_colon" = x; then
61511    # Not in mixed or Windows style, start by that.
61512    new_path=`cmd //c echo $path`
61513  fi
61514
61515
61516  input_path="$new_path"
61517  # Check if we need to convert this using DOS-style short mode. If the path
61518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61519  # take no chances and rewrite it.
61520  # Note: m4 eats our [], so we need to use [ and ] instead.
61521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61522  if test "x$has_forbidden_chars" != x; then
61523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61525  fi
61526
61527
61528  windows_path="$new_path"
61529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61530    unix_path=`$CYGPATH -u "$windows_path"`
61531    new_path="$unix_path"
61532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61534    new_path="$unix_path"
61535  fi
61536
61537  if test "x$path" != "x$new_path"; then
61538    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61541  fi
61542
61543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61545
61546    else
61547      # We're on a unix platform. Hooray! :)
61548      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61549      has_space=`$ECHO "$path" | $GREP " "`
61550      if test "x$has_space" != x; then
61551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61554      fi
61555
61556      # Use eval to expand a potential ~
61557      eval path="$path"
61558      if test ! -f "$path" && test ! -d "$path"; then
61559        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61560      fi
61561
61562      if test -d "$path"; then
61563        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61564      else
61565        dir="`$DIRNAME "$path"`"
61566        base="`$BASENAME "$path"`"
61567        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61568      fi
61569    fi
61570  fi
61571
61572
61573  # Only process if variable expands to non-empty
61574
61575  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61577
61578  # Input might be given as Windows format, start by converting to
61579  # unix format.
61580  path="$POTENTIAL_FREETYPE_LIB_PATH"
61581  new_path=`$CYGPATH -u "$path"`
61582
61583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61586  # "foo.exe" is OK but "foo" is an error.
61587  #
61588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61589  # It is also a way to make sure we got the proper file name for the real test later on.
61590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61591  if test "x$test_shortpath" = x; then
61592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61594    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61595  fi
61596
61597  # Call helper function which possibly converts this using DOS-style short mode.
61598  # If so, the updated path is stored in $new_path.
61599
61600  input_path="$new_path"
61601  # Check if we need to convert this using DOS-style short mode. If the path
61602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61603  # take no chances and rewrite it.
61604  # Note: m4 eats our [], so we need to use [ and ] instead.
61605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61606  if test "x$has_forbidden_chars" != x; then
61607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61611      # Going to short mode and back again did indeed matter. Since short mode is
61612      # case insensitive, let's make it lowercase to improve readability.
61613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61614      # Now convert it back to Unix-style (cygpath)
61615      input_path=`$CYGPATH -u "$shortmode_path"`
61616      new_path="$input_path"
61617    fi
61618  fi
61619
61620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61621  if test "x$test_cygdrive_prefix" = x; then
61622    # As a simple fix, exclude /usr/bin since it's not a real path.
61623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61625      # a path prefixed by /cygdrive for fixpath to work.
61626      new_path="$CYGWIN_ROOT_PATH$input_path"
61627    fi
61628  fi
61629
61630
61631  if test "x$path" != "x$new_path"; then
61632    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61635  fi
61636
61637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61638
61639  path="$POTENTIAL_FREETYPE_LIB_PATH"
61640  has_colon=`$ECHO $path | $GREP ^.:`
61641  new_path="$path"
61642  if test "x$has_colon" = x; then
61643    # Not in mixed or Windows style, start by that.
61644    new_path=`cmd //c echo $path`
61645  fi
61646
61647
61648  input_path="$new_path"
61649  # Check if we need to convert this using DOS-style short mode. If the path
61650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61651  # take no chances and rewrite it.
61652  # Note: m4 eats our [], so we need to use [ and ] instead.
61653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61654  if test "x$has_forbidden_chars" != x; then
61655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61657  fi
61658
61659
61660  windows_path="$new_path"
61661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61662    unix_path=`$CYGPATH -u "$windows_path"`
61663    new_path="$unix_path"
61664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61666    new_path="$unix_path"
61667  fi
61668
61669  if test "x$path" != "x$new_path"; then
61670    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61673  fi
61674
61675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61677
61678    else
61679      # We're on a unix platform. Hooray! :)
61680      path="$POTENTIAL_FREETYPE_LIB_PATH"
61681      has_space=`$ECHO "$path" | $GREP " "`
61682      if test "x$has_space" != x; then
61683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61686      fi
61687
61688      # Use eval to expand a potential ~
61689      eval path="$path"
61690      if test ! -f "$path" && test ! -d "$path"; then
61691        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61692      fi
61693
61694      if test -d "$path"; then
61695        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61696      else
61697        dir="`$DIRNAME "$path"`"
61698        base="`$BASENAME "$path"`"
61699        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61700      fi
61701    fi
61702  fi
61703
61704
61705    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61707$as_echo_n "checking for freetype includes... " >&6; }
61708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61709$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61710    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61712$as_echo_n "checking for freetype libraries... " >&6; }
61713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61714$as_echo "$FREETYPE_LIB_PATH" >&6; }
61715  fi
61716
61717            else
61718
61719  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61720  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61721  METHOD="well-known location"
61722
61723  # Let's start with an optimistic view of the world :-)
61724  FOUND_FREETYPE=yes
61725
61726  # First look for the canonical freetype main include file ft2build.h.
61727  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61728    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61729    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61730    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61731      # Fail.
61732      FOUND_FREETYPE=no
61733    fi
61734  fi
61735
61736  if test "x$FOUND_FREETYPE" = xyes; then
61737    # Include file found, let's continue the sanity check.
61738    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61739$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61740
61741    # Reset to default value
61742    FREETYPE_BASE_NAME=freetype
61743    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61744    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61745      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61747        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61748        # for the .6 version explicitly.
61749        FREETYPE_BASE_NAME=freetype.6
61750        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61751        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61752$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61753      else
61754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61755$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61756        FOUND_FREETYPE=no
61757      fi
61758    else
61759      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61760        # On Windows, we will need both .lib and .dll file.
61761        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61762          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61763$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61764          FOUND_FREETYPE=no
61765        fi
61766      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61767          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61768        # Found lib in isa dir, use that instead.
61769        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61770        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61771$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61772      fi
61773    fi
61774  fi
61775
61776  if test "x$FOUND_FREETYPE" = xyes; then
61777
61778  # Only process if variable expands to non-empty
61779
61780  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61782
61783  # Input might be given as Windows format, start by converting to
61784  # unix format.
61785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61786  new_path=`$CYGPATH -u "$path"`
61787
61788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61791  # "foo.exe" is OK but "foo" is an error.
61792  #
61793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61794  # It is also a way to make sure we got the proper file name for the real test later on.
61795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61796  if test "x$test_shortpath" = x; then
61797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61800  fi
61801
61802  # Call helper function which possibly converts this using DOS-style short mode.
61803  # If so, the updated path is stored in $new_path.
61804
61805  input_path="$new_path"
61806  # Check if we need to convert this using DOS-style short mode. If the path
61807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61808  # take no chances and rewrite it.
61809  # Note: m4 eats our [], so we need to use [ and ] instead.
61810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61811  if test "x$has_forbidden_chars" != x; then
61812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61816      # Going to short mode and back again did indeed matter. Since short mode is
61817      # case insensitive, let's make it lowercase to improve readability.
61818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61819      # Now convert it back to Unix-style (cygpath)
61820      input_path=`$CYGPATH -u "$shortmode_path"`
61821      new_path="$input_path"
61822    fi
61823  fi
61824
61825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61826  if test "x$test_cygdrive_prefix" = x; then
61827    # As a simple fix, exclude /usr/bin since it's not a real path.
61828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61830      # a path prefixed by /cygdrive for fixpath to work.
61831      new_path="$CYGWIN_ROOT_PATH$input_path"
61832    fi
61833  fi
61834
61835
61836  if test "x$path" != "x$new_path"; then
61837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61840  fi
61841
61842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61843
61844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61845  has_colon=`$ECHO $path | $GREP ^.:`
61846  new_path="$path"
61847  if test "x$has_colon" = x; then
61848    # Not in mixed or Windows style, start by that.
61849    new_path=`cmd //c echo $path`
61850  fi
61851
61852
61853  input_path="$new_path"
61854  # Check if we need to convert this using DOS-style short mode. If the path
61855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61856  # take no chances and rewrite it.
61857  # Note: m4 eats our [], so we need to use [ and ] instead.
61858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61859  if test "x$has_forbidden_chars" != x; then
61860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61862  fi
61863
61864
61865  windows_path="$new_path"
61866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61867    unix_path=`$CYGPATH -u "$windows_path"`
61868    new_path="$unix_path"
61869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61871    new_path="$unix_path"
61872  fi
61873
61874  if test "x$path" != "x$new_path"; then
61875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61878  fi
61879
61880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61882
61883    else
61884      # We're on a unix platform. Hooray! :)
61885      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61886      has_space=`$ECHO "$path" | $GREP " "`
61887      if test "x$has_space" != x; then
61888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61891      fi
61892
61893      # Use eval to expand a potential ~
61894      eval path="$path"
61895      if test ! -f "$path" && test ! -d "$path"; then
61896        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61897      fi
61898
61899      if test -d "$path"; then
61900        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61901      else
61902        dir="`$DIRNAME "$path"`"
61903        base="`$BASENAME "$path"`"
61904        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61905      fi
61906    fi
61907  fi
61908
61909
61910  # Only process if variable expands to non-empty
61911
61912  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61914
61915  # Input might be given as Windows format, start by converting to
61916  # unix format.
61917  path="$POTENTIAL_FREETYPE_LIB_PATH"
61918  new_path=`$CYGPATH -u "$path"`
61919
61920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61923  # "foo.exe" is OK but "foo" is an error.
61924  #
61925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61926  # It is also a way to make sure we got the proper file name for the real test later on.
61927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61928  if test "x$test_shortpath" = x; then
61929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61931    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61932  fi
61933
61934  # Call helper function which possibly converts this using DOS-style short mode.
61935  # If so, the updated path is stored in $new_path.
61936
61937  input_path="$new_path"
61938  # Check if we need to convert this using DOS-style short mode. If the path
61939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61940  # take no chances and rewrite it.
61941  # Note: m4 eats our [], so we need to use [ and ] instead.
61942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61943  if test "x$has_forbidden_chars" != x; then
61944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61948      # Going to short mode and back again did indeed matter. Since short mode is
61949      # case insensitive, let's make it lowercase to improve readability.
61950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61951      # Now convert it back to Unix-style (cygpath)
61952      input_path=`$CYGPATH -u "$shortmode_path"`
61953      new_path="$input_path"
61954    fi
61955  fi
61956
61957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61958  if test "x$test_cygdrive_prefix" = x; then
61959    # As a simple fix, exclude /usr/bin since it's not a real path.
61960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61962      # a path prefixed by /cygdrive for fixpath to work.
61963      new_path="$CYGWIN_ROOT_PATH$input_path"
61964    fi
61965  fi
61966
61967
61968  if test "x$path" != "x$new_path"; then
61969    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61972  fi
61973
61974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61975
61976  path="$POTENTIAL_FREETYPE_LIB_PATH"
61977  has_colon=`$ECHO $path | $GREP ^.:`
61978  new_path="$path"
61979  if test "x$has_colon" = x; then
61980    # Not in mixed or Windows style, start by that.
61981    new_path=`cmd //c echo $path`
61982  fi
61983
61984
61985  input_path="$new_path"
61986  # Check if we need to convert this using DOS-style short mode. If the path
61987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61988  # take no chances and rewrite it.
61989  # Note: m4 eats our [], so we need to use [ and ] instead.
61990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61991  if test "x$has_forbidden_chars" != x; then
61992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61994  fi
61995
61996
61997  windows_path="$new_path"
61998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61999    unix_path=`$CYGPATH -u "$windows_path"`
62000    new_path="$unix_path"
62001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62003    new_path="$unix_path"
62004  fi
62005
62006  if test "x$path" != "x$new_path"; then
62007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62010  fi
62011
62012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62014
62015    else
62016      # We're on a unix platform. Hooray! :)
62017      path="$POTENTIAL_FREETYPE_LIB_PATH"
62018      has_space=`$ECHO "$path" | $GREP " "`
62019      if test "x$has_space" != x; then
62020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62023      fi
62024
62025      # Use eval to expand a potential ~
62026      eval path="$path"
62027      if test ! -f "$path" && test ! -d "$path"; then
62028        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62029      fi
62030
62031      if test -d "$path"; then
62032        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62033      else
62034        dir="`$DIRNAME "$path"`"
62035        base="`$BASENAME "$path"`"
62036        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62037      fi
62038    fi
62039  fi
62040
62041
62042    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62044$as_echo_n "checking for freetype includes... " >&6; }
62045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62046$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62047    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62049$as_echo_n "checking for freetype libraries... " >&6; }
62050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62051$as_echo "$FREETYPE_LIB_PATH" >&6; }
62052  fi
62053
62054              if test "x$FOUND_FREETYPE" != xyes; then
62055
62056  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62057  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62058  METHOD="well-known location"
62059
62060  # Let's start with an optimistic view of the world :-)
62061  FOUND_FREETYPE=yes
62062
62063  # First look for the canonical freetype main include file ft2build.h.
62064  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62065    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62066    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62067    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62068      # Fail.
62069      FOUND_FREETYPE=no
62070    fi
62071  fi
62072
62073  if test "x$FOUND_FREETYPE" = xyes; then
62074    # Include file found, let's continue the sanity check.
62075    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62076$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62077
62078    # Reset to default value
62079    FREETYPE_BASE_NAME=freetype
62080    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62081    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62082      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62084        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62085        # for the .6 version explicitly.
62086        FREETYPE_BASE_NAME=freetype.6
62087        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62088        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62089$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62090      else
62091        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62092$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62093        FOUND_FREETYPE=no
62094      fi
62095    else
62096      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62097        # On Windows, we will need both .lib and .dll file.
62098        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62099          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62100$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62101          FOUND_FREETYPE=no
62102        fi
62103      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62104          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62105        # Found lib in isa dir, use that instead.
62106        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62107        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62108$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62109      fi
62110    fi
62111  fi
62112
62113  if test "x$FOUND_FREETYPE" = xyes; then
62114
62115  # Only process if variable expands to non-empty
62116
62117  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62119
62120  # Input might be given as Windows format, start by converting to
62121  # unix format.
62122  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62123  new_path=`$CYGPATH -u "$path"`
62124
62125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62128  # "foo.exe" is OK but "foo" is an error.
62129  #
62130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62131  # It is also a way to make sure we got the proper file name for the real test later on.
62132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62133  if test "x$test_shortpath" = x; then
62134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62136    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62137  fi
62138
62139  # Call helper function which possibly converts this using DOS-style short mode.
62140  # If so, the updated path is stored in $new_path.
62141
62142  input_path="$new_path"
62143  # Check if we need to convert this using DOS-style short mode. If the path
62144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62145  # take no chances and rewrite it.
62146  # Note: m4 eats our [], so we need to use [ and ] instead.
62147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62148  if test "x$has_forbidden_chars" != x; then
62149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62153      # Going to short mode and back again did indeed matter. Since short mode is
62154      # case insensitive, let's make it lowercase to improve readability.
62155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62156      # Now convert it back to Unix-style (cygpath)
62157      input_path=`$CYGPATH -u "$shortmode_path"`
62158      new_path="$input_path"
62159    fi
62160  fi
62161
62162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62163  if test "x$test_cygdrive_prefix" = x; then
62164    # As a simple fix, exclude /usr/bin since it's not a real path.
62165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62167      # a path prefixed by /cygdrive for fixpath to work.
62168      new_path="$CYGWIN_ROOT_PATH$input_path"
62169    fi
62170  fi
62171
62172
62173  if test "x$path" != "x$new_path"; then
62174    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62176$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62177  fi
62178
62179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62180
62181  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62182  has_colon=`$ECHO $path | $GREP ^.:`
62183  new_path="$path"
62184  if test "x$has_colon" = x; then
62185    # Not in mixed or Windows style, start by that.
62186    new_path=`cmd //c echo $path`
62187  fi
62188
62189
62190  input_path="$new_path"
62191  # Check if we need to convert this using DOS-style short mode. If the path
62192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62193  # take no chances and rewrite it.
62194  # Note: m4 eats our [], so we need to use [ and ] instead.
62195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62196  if test "x$has_forbidden_chars" != x; then
62197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62199  fi
62200
62201
62202  windows_path="$new_path"
62203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62204    unix_path=`$CYGPATH -u "$windows_path"`
62205    new_path="$unix_path"
62206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62208    new_path="$unix_path"
62209  fi
62210
62211  if test "x$path" != "x$new_path"; then
62212    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62215  fi
62216
62217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62219
62220    else
62221      # We're on a unix platform. Hooray! :)
62222      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62223      has_space=`$ECHO "$path" | $GREP " "`
62224      if test "x$has_space" != x; then
62225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62228      fi
62229
62230      # Use eval to expand a potential ~
62231      eval path="$path"
62232      if test ! -f "$path" && test ! -d "$path"; then
62233        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62234      fi
62235
62236      if test -d "$path"; then
62237        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62238      else
62239        dir="`$DIRNAME "$path"`"
62240        base="`$BASENAME "$path"`"
62241        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62242      fi
62243    fi
62244  fi
62245
62246
62247  # Only process if variable expands to non-empty
62248
62249  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62251
62252  # Input might be given as Windows format, start by converting to
62253  # unix format.
62254  path="$POTENTIAL_FREETYPE_LIB_PATH"
62255  new_path=`$CYGPATH -u "$path"`
62256
62257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62260  # "foo.exe" is OK but "foo" is an error.
62261  #
62262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62263  # It is also a way to make sure we got the proper file name for the real test later on.
62264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62265  if test "x$test_shortpath" = x; then
62266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62267$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62268    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62269  fi
62270
62271  # Call helper function which possibly converts this using DOS-style short mode.
62272  # If so, the updated path is stored in $new_path.
62273
62274  input_path="$new_path"
62275  # Check if we need to convert this using DOS-style short mode. If the path
62276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62277  # take no chances and rewrite it.
62278  # Note: m4 eats our [], so we need to use [ and ] instead.
62279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62280  if test "x$has_forbidden_chars" != x; then
62281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62285      # Going to short mode and back again did indeed matter. Since short mode is
62286      # case insensitive, let's make it lowercase to improve readability.
62287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62288      # Now convert it back to Unix-style (cygpath)
62289      input_path=`$CYGPATH -u "$shortmode_path"`
62290      new_path="$input_path"
62291    fi
62292  fi
62293
62294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62295  if test "x$test_cygdrive_prefix" = x; then
62296    # As a simple fix, exclude /usr/bin since it's not a real path.
62297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62299      # a path prefixed by /cygdrive for fixpath to work.
62300      new_path="$CYGWIN_ROOT_PATH$input_path"
62301    fi
62302  fi
62303
62304
62305  if test "x$path" != "x$new_path"; then
62306    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62309  fi
62310
62311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62312
62313  path="$POTENTIAL_FREETYPE_LIB_PATH"
62314  has_colon=`$ECHO $path | $GREP ^.:`
62315  new_path="$path"
62316  if test "x$has_colon" = x; then
62317    # Not in mixed or Windows style, start by that.
62318    new_path=`cmd //c echo $path`
62319  fi
62320
62321
62322  input_path="$new_path"
62323  # Check if we need to convert this using DOS-style short mode. If the path
62324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62325  # take no chances and rewrite it.
62326  # Note: m4 eats our [], so we need to use [ and ] instead.
62327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62328  if test "x$has_forbidden_chars" != x; then
62329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62331  fi
62332
62333
62334  windows_path="$new_path"
62335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62336    unix_path=`$CYGPATH -u "$windows_path"`
62337    new_path="$unix_path"
62338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62340    new_path="$unix_path"
62341  fi
62342
62343  if test "x$path" != "x$new_path"; then
62344    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62347  fi
62348
62349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62351
62352    else
62353      # We're on a unix platform. Hooray! :)
62354      path="$POTENTIAL_FREETYPE_LIB_PATH"
62355      has_space=`$ECHO "$path" | $GREP " "`
62356      if test "x$has_space" != x; then
62357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62360      fi
62361
62362      # Use eval to expand a potential ~
62363      eval path="$path"
62364      if test ! -f "$path" && test ! -d "$path"; then
62365        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62366      fi
62367
62368      if test -d "$path"; then
62369        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62370      else
62371        dir="`$DIRNAME "$path"`"
62372        base="`$BASENAME "$path"`"
62373        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62374      fi
62375    fi
62376  fi
62377
62378
62379    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62381$as_echo_n "checking for freetype includes... " >&6; }
62382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62383$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62384    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62386$as_echo_n "checking for freetype libraries... " >&6; }
62387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62388$as_echo "$FREETYPE_LIB_PATH" >&6; }
62389  fi
62390
62391              fi
62392            fi
62393          fi
62394        fi
62395      fi # end check in well-known locations
62396
62397      if test "x$FOUND_FREETYPE" != xyes; then
62398
62399  # Print a helpful message on how to acquire the necessary build dependency.
62400  # freetype is the help tag: freetype, cups, alsa etc
62401  MISSING_DEPENDENCY=freetype
62402
62403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62404    cygwin_help $MISSING_DEPENDENCY
62405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62406    msys_help $MISSING_DEPENDENCY
62407  else
62408    PKGHANDLER_COMMAND=
62409
62410    case $PKGHANDLER in
62411      apt-get)
62412        apt_help     $MISSING_DEPENDENCY ;;
62413      yum)
62414        yum_help     $MISSING_DEPENDENCY ;;
62415      brew)
62416        brew_help    $MISSING_DEPENDENCY ;;
62417      port)
62418        port_help    $MISSING_DEPENDENCY ;;
62419      pkgutil)
62420        pkgutil_help $MISSING_DEPENDENCY ;;
62421      pkgadd)
62422        pkgadd_help  $MISSING_DEPENDENCY ;;
62423    esac
62424
62425    if test "x$PKGHANDLER_COMMAND" != x; then
62426      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62427    fi
62428  fi
62429
62430        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62431      fi
62432    fi # end user specified settings
62433
62434    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62435    if test "x$FREETYPE_CFLAGS" = x; then
62436
62437  # Only process if variable expands to non-empty
62438
62439  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62441
62442  # Input might be given as Windows format, start by converting to
62443  # unix format.
62444  path="$FREETYPE_INCLUDE_PATH"
62445  new_path=`$CYGPATH -u "$path"`
62446
62447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62450  # "foo.exe" is OK but "foo" is an error.
62451  #
62452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62453  # It is also a way to make sure we got the proper file name for the real test later on.
62454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62455  if test "x$test_shortpath" = x; then
62456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62457$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62458    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62459  fi
62460
62461  # Call helper function which possibly converts this using DOS-style short mode.
62462  # If so, the updated path is stored in $new_path.
62463
62464  input_path="$new_path"
62465  # Check if we need to convert this using DOS-style short mode. If the path
62466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62467  # take no chances and rewrite it.
62468  # Note: m4 eats our [], so we need to use [ and ] instead.
62469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62470  if test "x$has_forbidden_chars" != x; then
62471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62475      # Going to short mode and back again did indeed matter. Since short mode is
62476      # case insensitive, let's make it lowercase to improve readability.
62477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62478      # Now convert it back to Unix-style (cygpath)
62479      input_path=`$CYGPATH -u "$shortmode_path"`
62480      new_path="$input_path"
62481    fi
62482  fi
62483
62484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62485  if test "x$test_cygdrive_prefix" = x; then
62486    # As a simple fix, exclude /usr/bin since it's not a real path.
62487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62489      # a path prefixed by /cygdrive for fixpath to work.
62490      new_path="$CYGWIN_ROOT_PATH$input_path"
62491    fi
62492  fi
62493
62494
62495  if test "x$path" != "x$new_path"; then
62496    FREETYPE_INCLUDE_PATH="$new_path"
62497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62498$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62499  fi
62500
62501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62502
62503  path="$FREETYPE_INCLUDE_PATH"
62504  has_colon=`$ECHO $path | $GREP ^.:`
62505  new_path="$path"
62506  if test "x$has_colon" = x; then
62507    # Not in mixed or Windows style, start by that.
62508    new_path=`cmd //c echo $path`
62509  fi
62510
62511
62512  input_path="$new_path"
62513  # Check if we need to convert this using DOS-style short mode. If the path
62514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62515  # take no chances and rewrite it.
62516  # Note: m4 eats our [], so we need to use [ and ] instead.
62517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62518  if test "x$has_forbidden_chars" != x; then
62519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62521  fi
62522
62523
62524  windows_path="$new_path"
62525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62526    unix_path=`$CYGPATH -u "$windows_path"`
62527    new_path="$unix_path"
62528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62530    new_path="$unix_path"
62531  fi
62532
62533  if test "x$path" != "x$new_path"; then
62534    FREETYPE_INCLUDE_PATH="$new_path"
62535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62536$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62537  fi
62538
62539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62541
62542    else
62543      # We're on a unix platform. Hooray! :)
62544      path="$FREETYPE_INCLUDE_PATH"
62545      has_space=`$ECHO "$path" | $GREP " "`
62546      if test "x$has_space" != x; then
62547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62548$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62550      fi
62551
62552      # Use eval to expand a potential ~
62553      eval path="$path"
62554      if test ! -f "$path" && test ! -d "$path"; then
62555        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62556      fi
62557
62558      if test -d "$path"; then
62559        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62560      else
62561        dir="`$DIRNAME "$path"`"
62562        base="`$BASENAME "$path"`"
62563        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62564      fi
62565    fi
62566  fi
62567
62568      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62569        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62570      else
62571        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62572      fi
62573    fi
62574
62575    if test "x$FREETYPE_LIBS" = x; then
62576
62577  # Only process if variable expands to non-empty
62578
62579  if test "x$FREETYPE_LIB_PATH" != x; then
62580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62581
62582  # Input might be given as Windows format, start by converting to
62583  # unix format.
62584  path="$FREETYPE_LIB_PATH"
62585  new_path=`$CYGPATH -u "$path"`
62586
62587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62590  # "foo.exe" is OK but "foo" is an error.
62591  #
62592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62593  # It is also a way to make sure we got the proper file name for the real test later on.
62594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62595  if test "x$test_shortpath" = x; then
62596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62597$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62598    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62599  fi
62600
62601  # Call helper function which possibly converts this using DOS-style short mode.
62602  # If so, the updated path is stored in $new_path.
62603
62604  input_path="$new_path"
62605  # Check if we need to convert this using DOS-style short mode. If the path
62606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62607  # take no chances and rewrite it.
62608  # Note: m4 eats our [], so we need to use [ and ] instead.
62609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62610  if test "x$has_forbidden_chars" != x; then
62611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62615      # Going to short mode and back again did indeed matter. Since short mode is
62616      # case insensitive, let's make it lowercase to improve readability.
62617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62618      # Now convert it back to Unix-style (cygpath)
62619      input_path=`$CYGPATH -u "$shortmode_path"`
62620      new_path="$input_path"
62621    fi
62622  fi
62623
62624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62625  if test "x$test_cygdrive_prefix" = x; then
62626    # As a simple fix, exclude /usr/bin since it's not a real path.
62627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62629      # a path prefixed by /cygdrive for fixpath to work.
62630      new_path="$CYGWIN_ROOT_PATH$input_path"
62631    fi
62632  fi
62633
62634
62635  if test "x$path" != "x$new_path"; then
62636    FREETYPE_LIB_PATH="$new_path"
62637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62638$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62639  fi
62640
62641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62642
62643  path="$FREETYPE_LIB_PATH"
62644  has_colon=`$ECHO $path | $GREP ^.:`
62645  new_path="$path"
62646  if test "x$has_colon" = x; then
62647    # Not in mixed or Windows style, start by that.
62648    new_path=`cmd //c echo $path`
62649  fi
62650
62651
62652  input_path="$new_path"
62653  # Check if we need to convert this using DOS-style short mode. If the path
62654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62655  # take no chances and rewrite it.
62656  # Note: m4 eats our [], so we need to use [ and ] instead.
62657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62658  if test "x$has_forbidden_chars" != x; then
62659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62661  fi
62662
62663
62664  windows_path="$new_path"
62665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62666    unix_path=`$CYGPATH -u "$windows_path"`
62667    new_path="$unix_path"
62668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62670    new_path="$unix_path"
62671  fi
62672
62673  if test "x$path" != "x$new_path"; then
62674    FREETYPE_LIB_PATH="$new_path"
62675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62676$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62677  fi
62678
62679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62681
62682    else
62683      # We're on a unix platform. Hooray! :)
62684      path="$FREETYPE_LIB_PATH"
62685      has_space=`$ECHO "$path" | $GREP " "`
62686      if test "x$has_space" != x; then
62687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62688$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62690      fi
62691
62692      # Use eval to expand a potential ~
62693      eval path="$path"
62694      if test ! -f "$path" && test ! -d "$path"; then
62695        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62696      fi
62697
62698      if test -d "$path"; then
62699        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62700      else
62701        dir="`$DIRNAME "$path"`"
62702        base="`$BASENAME "$path"`"
62703        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62704      fi
62705    fi
62706  fi
62707
62708      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62709        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62710      else
62711        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62712      fi
62713    fi
62714
62715    # Try to compile it
62716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62717$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62718    ac_ext=cpp
62719ac_cpp='$CXXCPP $CPPFLAGS'
62720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62723
62724    PREV_CXXCFLAGS="$CXXFLAGS"
62725    PREV_LIBS="$LIBS"
62726    PREV_CXX="$CXX"
62727    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62728    LIBS="$LIBS $FREETYPE_LIBS"
62729    CXX="$FIXPATH $CXX"
62730    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62731/* end confdefs.h.  */
62732
62733          #include<ft2build.h>
62734          #include FT_FREETYPE_H
62735          int main () {
62736            FT_Init_FreeType(NULL);
62737            return 0;
62738          }
62739
62740_ACEOF
62741if ac_fn_cxx_try_link "$LINENO"; then :
62742
62743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62744$as_echo "yes" >&6; }
62745
62746else
62747
62748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62749$as_echo "no" >&6; }
62750          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62751$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62752          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62753$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62754
62755
62756  # Print a helpful message on how to acquire the necessary build dependency.
62757  # freetype is the help tag: freetype, cups, alsa etc
62758  MISSING_DEPENDENCY=freetype
62759
62760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62761    cygwin_help $MISSING_DEPENDENCY
62762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62763    msys_help $MISSING_DEPENDENCY
62764  else
62765    PKGHANDLER_COMMAND=
62766
62767    case $PKGHANDLER in
62768      apt-get)
62769        apt_help     $MISSING_DEPENDENCY ;;
62770      yum)
62771        yum_help     $MISSING_DEPENDENCY ;;
62772      brew)
62773        brew_help    $MISSING_DEPENDENCY ;;
62774      port)
62775        port_help    $MISSING_DEPENDENCY ;;
62776      pkgutil)
62777        pkgutil_help $MISSING_DEPENDENCY ;;
62778      pkgadd)
62779        pkgadd_help  $MISSING_DEPENDENCY ;;
62780    esac
62781
62782    if test "x$PKGHANDLER_COMMAND" != x; then
62783      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62784    fi
62785  fi
62786
62787
62788          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62789
62790
62791fi
62792rm -f core conftest.err conftest.$ac_objext \
62793    conftest$ac_exeext conftest.$ac_ext
62794    CXXCFLAGS="$PREV_CXXFLAGS"
62795    LIBS="$PREV_LIBS"
62796    CXX="$PREV_CXX"
62797    ac_ext=cpp
62798ac_cpp='$CXXCPP $CPPFLAGS'
62799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62802
62803
62804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62805$as_echo_n "checking if we should bundle freetype... " >&6; }
62806    if test "x$BUNDLE_FREETYPE" = xyes; then
62807      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62808    fi
62809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62810$as_echo "$BUNDLE_FREETYPE" >&6; }
62811
62812  fi # end freetype needed
62813
62814
62815
62816
62817
62818
62819
62820# Check whether --with-alsa was given.
62821if test "${with_alsa+set}" = set; then :
62822  withval=$with_alsa;
62823fi
62824
62825
62826# Check whether --with-alsa-include was given.
62827if test "${with_alsa_include+set}" = set; then :
62828  withval=$with_alsa_include;
62829fi
62830
62831
62832# Check whether --with-alsa-lib was given.
62833if test "${with_alsa_lib+set}" = set; then :
62834  withval=$with_alsa_lib;
62835fi
62836
62837
62838  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62839    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62840        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62841        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62842      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62843$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62844    fi
62845    ALSA_CFLAGS=
62846    ALSA_LIBS=
62847  else
62848    ALSA_FOUND=no
62849
62850    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62851      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62852    fi
62853
62854    if test "x${with_alsa}" != x; then
62855      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62856      ALSA_CFLAGS="-I${with_alsa}/include"
62857      ALSA_FOUND=yes
62858    fi
62859    if test "x${with_alsa_include}" != x; then
62860      ALSA_CFLAGS="-I${with_alsa_include}"
62861      ALSA_FOUND=yes
62862    fi
62863    if test "x${with_alsa_lib}" != x; then
62864      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62865      ALSA_FOUND=yes
62866    fi
62867    # Do not try pkg-config if we have a sysroot set.
62868    if test "x$SYSROOT" = x; then
62869      if test "x$ALSA_FOUND" = xno; then
62870
62871pkg_failed=no
62872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62873$as_echo_n "checking for ALSA... " >&6; }
62874
62875if test -n "$ALSA_CFLAGS"; then
62876    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62877 elif test -n "$PKG_CONFIG"; then
62878    if test -n "$PKG_CONFIG" && \
62879    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62880  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62881  ac_status=$?
62882  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62883  test $ac_status = 0; }; then
62884  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62885else
62886  pkg_failed=yes
62887fi
62888 else
62889    pkg_failed=untried
62890fi
62891if test -n "$ALSA_LIBS"; then
62892    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62893 elif test -n "$PKG_CONFIG"; then
62894    if test -n "$PKG_CONFIG" && \
62895    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62896  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62897  ac_status=$?
62898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62899  test $ac_status = 0; }; then
62900  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62901else
62902  pkg_failed=yes
62903fi
62904 else
62905    pkg_failed=untried
62906fi
62907
62908
62909
62910if test $pkg_failed = yes; then
62911
62912if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62913        _pkg_short_errors_supported=yes
62914else
62915        _pkg_short_errors_supported=no
62916fi
62917        if test $_pkg_short_errors_supported = yes; then
62918	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62919        else
62920	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62921        fi
62922	# Put the nasty error message in config.log where it belongs
62923	echo "$ALSA_PKG_ERRORS" >&5
62924
62925	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62926$as_echo "no" >&6; }
62927                ALSA_FOUND=no
62928elif test $pkg_failed = untried; then
62929	ALSA_FOUND=no
62930else
62931	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62932	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62934$as_echo "yes" >&6; }
62935	ALSA_FOUND=yes
62936fi
62937      fi
62938    fi
62939    if test "x$ALSA_FOUND" = xno; then
62940      for ac_header in alsa/asoundlib.h
62941do :
62942  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62943if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62944  cat >>confdefs.h <<_ACEOF
62945#define HAVE_ALSA_ASOUNDLIB_H 1
62946_ACEOF
62947
62948            ALSA_FOUND=yes
62949            ALSA_CFLAGS=-Iignoreme
62950            ALSA_LIBS=-lasound
62951            DEFAULT_ALSA=yes
62952
62953else
62954  ALSA_FOUND=no
62955
62956fi
62957
62958done
62959
62960    fi
62961    if test "x$ALSA_FOUND" = xno; then
62962
62963  # Print a helpful message on how to acquire the necessary build dependency.
62964  # alsa is the help tag: freetype, cups, alsa etc
62965  MISSING_DEPENDENCY=alsa
62966
62967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62968    cygwin_help $MISSING_DEPENDENCY
62969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62970    msys_help $MISSING_DEPENDENCY
62971  else
62972    PKGHANDLER_COMMAND=
62973
62974    case $PKGHANDLER in
62975      apt-get)
62976        apt_help     $MISSING_DEPENDENCY ;;
62977      yum)
62978        yum_help     $MISSING_DEPENDENCY ;;
62979      brew)
62980        brew_help    $MISSING_DEPENDENCY ;;
62981      port)
62982        port_help    $MISSING_DEPENDENCY ;;
62983      pkgutil)
62984        pkgutil_help $MISSING_DEPENDENCY ;;
62985      pkgadd)
62986        pkgadd_help  $MISSING_DEPENDENCY ;;
62987    esac
62988
62989    if test "x$PKGHANDLER_COMMAND" != x; then
62990      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62991    fi
62992  fi
62993
62994      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62995    fi
62996  fi
62997
62998
62999
63000
63001
63002
63003# Check whether --with-libffi was given.
63004if test "${with_libffi+set}" = set; then :
63005  withval=$with_libffi;
63006fi
63007
63008
63009# Check whether --with-libffi-include was given.
63010if test "${with_libffi_include+set}" = set; then :
63011  withval=$with_libffi_include;
63012fi
63013
63014
63015# Check whether --with-libffi-lib was given.
63016if test "${with_libffi_lib+set}" = set; then :
63017  withval=$with_libffi_lib;
63018fi
63019
63020  # Check whether --enable-libffi-bundling was given.
63021if test "${enable_libffi_bundling+set}" = set; then :
63022  enableval=$enable_libffi_bundling;
63023fi
63024
63025
63026  if test "x$NEEDS_LIB_FFI" = xfalse; then
63027    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63028        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63029        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63030      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63031$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63032    fi
63033    LIBFFI_CFLAGS=
63034    LIBFFI_LIBS=
63035  else
63036    LIBFFI_FOUND=no
63037
63038    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63039      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63040    fi
63041
63042    if test "x${with_libffi}" != x; then
63043      LIBFFI_LIB_PATH="${with_libffi}/lib"
63044      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63045      LIBFFI_CFLAGS="-I${with_libffi}/include"
63046      LIBFFI_FOUND=yes
63047    fi
63048    if test "x${with_libffi_include}" != x; then
63049      LIBFFI_CFLAGS="-I${with_libffi_include}"
63050      LIBFFI_FOUND=yes
63051    fi
63052    if test "x${with_libffi_lib}" != x; then
63053      LIBFFI_LIB_PATH="${with_libffi_lib}"
63054      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63055      LIBFFI_FOUND=yes
63056    fi
63057    # Do not try pkg-config if we have a sysroot set.
63058    if test "x$SYSROOT" = x; then
63059      if test "x$LIBFFI_FOUND" = xno; then
63060        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63061
63062pkg_failed=no
63063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63064$as_echo_n "checking for LIBFFI... " >&6; }
63065
63066if test -n "$LIBFFI_CFLAGS"; then
63067    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63068 elif test -n "$PKG_CONFIG"; then
63069    if test -n "$PKG_CONFIG" && \
63070    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63071  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63072  ac_status=$?
63073  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63074  test $ac_status = 0; }; then
63075  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63076else
63077  pkg_failed=yes
63078fi
63079 else
63080    pkg_failed=untried
63081fi
63082if test -n "$LIBFFI_LIBS"; then
63083    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63084 elif test -n "$PKG_CONFIG"; then
63085    if test -n "$PKG_CONFIG" && \
63086    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63087  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63088  ac_status=$?
63089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63090  test $ac_status = 0; }; then
63091  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63092else
63093  pkg_failed=yes
63094fi
63095 else
63096    pkg_failed=untried
63097fi
63098
63099
63100
63101if test $pkg_failed = yes; then
63102
63103if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63104        _pkg_short_errors_supported=yes
63105else
63106        _pkg_short_errors_supported=no
63107fi
63108        if test $_pkg_short_errors_supported = yes; then
63109	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63110        else
63111	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63112        fi
63113	# Put the nasty error message in config.log where it belongs
63114	echo "$LIBFFI_PKG_ERRORS" >&5
63115
63116	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63117$as_echo "no" >&6; }
63118                LIBFFI_FOUND=no
63119elif test $pkg_failed = untried; then
63120	LIBFFI_FOUND=no
63121else
63122	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63123	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63125$as_echo "yes" >&6; }
63126	LIBFFI_FOUND=yes
63127fi
63128      fi
63129    fi
63130    if test "x$LIBFFI_FOUND" = xno; then
63131      for ac_header in ffi.h
63132do :
63133  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63134if test "x$ac_cv_header_ffi_h" = xyes; then :
63135  cat >>confdefs.h <<_ACEOF
63136#define HAVE_FFI_H 1
63137_ACEOF
63138
63139            LIBFFI_FOUND=yes
63140            LIBFFI_CFLAGS=
63141            LIBFFI_LIBS=-lffi
63142
63143else
63144  LIBFFI_FOUND=no
63145
63146fi
63147
63148done
63149
63150    fi
63151    if test "x$LIBFFI_FOUND" = xno; then
63152
63153  # Print a helpful message on how to acquire the necessary build dependency.
63154  # ffi is the help tag: freetype, cups, alsa etc
63155  MISSING_DEPENDENCY=ffi
63156
63157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63158    cygwin_help $MISSING_DEPENDENCY
63159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63160    msys_help $MISSING_DEPENDENCY
63161  else
63162    PKGHANDLER_COMMAND=
63163
63164    case $PKGHANDLER in
63165      apt-get)
63166        apt_help     $MISSING_DEPENDENCY ;;
63167      yum)
63168        yum_help     $MISSING_DEPENDENCY ;;
63169      brew)
63170        brew_help    $MISSING_DEPENDENCY ;;
63171      port)
63172        port_help    $MISSING_DEPENDENCY ;;
63173      pkgutil)
63174        pkgutil_help $MISSING_DEPENDENCY ;;
63175      pkgadd)
63176        pkgadd_help  $MISSING_DEPENDENCY ;;
63177    esac
63178
63179    if test "x$PKGHANDLER_COMMAND" != x; then
63180      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63181    fi
63182  fi
63183
63184      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63185    fi
63186
63187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63188$as_echo_n "checking if libffi works... " >&6; }
63189    ac_ext=c
63190ac_cpp='$CPP $CPPFLAGS'
63191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63193ac_compiler_gnu=$ac_cv_c_compiler_gnu
63194
63195    OLD_CFLAGS="$CFLAGS"
63196    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63197    OLD_LIBS="$LIBS"
63198    LIBS="$LIBS $LIBFFI_LIBS"
63199    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63200/* end confdefs.h.  */
63201#include <ffi.h>
63202int
63203main ()
63204{
63205
63206          ffi_call(NULL, NULL, NULL, NULL);
63207          return 0;
63208
63209  ;
63210  return 0;
63211}
63212_ACEOF
63213if ac_fn_c_try_link "$LINENO"; then :
63214  LIBFFI_WORKS=yes
63215else
63216  LIBFFI_WORKS=no
63217
63218fi
63219rm -f core conftest.err conftest.$ac_objext \
63220    conftest$ac_exeext conftest.$ac_ext
63221    CFLAGS="$OLD_CFLAGS"
63222    LIBS="$OLD_LIBS"
63223    ac_ext=cpp
63224ac_cpp='$CXXCPP $CPPFLAGS'
63225ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63226ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63227ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63228
63229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63230$as_echo "$LIBFFI_WORKS" >&6; }
63231
63232    if test "x$LIBFFI_WORKS" = xno; then
63233
63234  # Print a helpful message on how to acquire the necessary build dependency.
63235  # ffi is the help tag: freetype, cups, alsa etc
63236  MISSING_DEPENDENCY=ffi
63237
63238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63239    cygwin_help $MISSING_DEPENDENCY
63240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63241    msys_help $MISSING_DEPENDENCY
63242  else
63243    PKGHANDLER_COMMAND=
63244
63245    case $PKGHANDLER in
63246      apt-get)
63247        apt_help     $MISSING_DEPENDENCY ;;
63248      yum)
63249        yum_help     $MISSING_DEPENDENCY ;;
63250      brew)
63251        brew_help    $MISSING_DEPENDENCY ;;
63252      port)
63253        port_help    $MISSING_DEPENDENCY ;;
63254      pkgutil)
63255        pkgutil_help $MISSING_DEPENDENCY ;;
63256      pkgadd)
63257        pkgadd_help  $MISSING_DEPENDENCY ;;
63258    esac
63259
63260    if test "x$PKGHANDLER_COMMAND" != x; then
63261      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63262    fi
63263  fi
63264
63265      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63266    fi
63267
63268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63269$as_echo_n "checking if libffi should be bundled... " >&6; }
63270    if test "x$enable_libffi_bundling" = "x"; then
63271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63272$as_echo "no" >&6; }
63273      ENABLE_LIBFFI_BUNDLING=false
63274    elif  test "x$enable_libffi_bundling" = "xno"; then
63275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63276$as_echo "no, forced" >&6; }
63277      ENABLE_LIBFFI_BUNDLING=false
63278    elif  test "x$enable_libffi_bundling" = "xyes"; then
63279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63280$as_echo "yes, forced" >&6; }
63281      ENABLE_LIBFFI_BUNDLING=true
63282    else
63283      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63284    fi
63285
63286    # Find the libffi.so.X to bundle
63287    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63288      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63289$as_echo_n "checking for libffi lib file location... " >&6; }
63290      if test "x${LIBFFI_LIB_PATH}" != x; then
63291        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63292          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63293        else
63294          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63295        fi
63296      else
63297        # If we don't have an explicit path, look in a few obvious places
63298        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63299          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63300            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63301          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63302            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63303          else
63304            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63305          fi
63306        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63307          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63308            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63309          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63310            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63311          else
63312            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63313          fi
63314        else
63315          # Fallback on the default /usr/lib dir
63316          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63317            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63318          else
63319            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63320          fi
63321        fi
63322      fi
63323      # Make sure the wildcard is evaluated
63324      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63326$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63327    fi
63328  fi
63329
63330
63331
63332
63333
63334
63335
63336  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63337    # Extract the first word of "llvm-config", so it can be a program name with args.
63338set dummy llvm-config; ac_word=$2
63339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63340$as_echo_n "checking for $ac_word... " >&6; }
63341if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63342  $as_echo_n "(cached) " >&6
63343else
63344  if test -n "$LLVM_CONFIG"; then
63345  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63346else
63347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63348for as_dir in $PATH
63349do
63350  IFS=$as_save_IFS
63351  test -z "$as_dir" && as_dir=.
63352    for ac_exec_ext in '' $ac_executable_extensions; do
63353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63354    ac_cv_prog_LLVM_CONFIG="llvm-config"
63355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63356    break 2
63357  fi
63358done
63359  done
63360IFS=$as_save_IFS
63361
63362fi
63363fi
63364LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63365if test -n "$LLVM_CONFIG"; then
63366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63367$as_echo "$LLVM_CONFIG" >&6; }
63368else
63369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63370$as_echo "no" >&6; }
63371fi
63372
63373
63374
63375    if test "x$LLVM_CONFIG" != xllvm-config; then
63376      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63377    fi
63378
63379    llvm_components="jit mcjit engine nativecodegen native"
63380    unset LLVM_CFLAGS
63381    for flag in $("$LLVM_CONFIG" --cxxflags); do
63382      if echo "${flag}" | grep -q '^-[ID]'; then
63383        if test "${flag}" != "-D_DEBUG" ; then
63384          if test "${LLVM_CFLAGS}" != "" ; then
63385            LLVM_CFLAGS="${LLVM_CFLAGS} "
63386          fi
63387          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63388        fi
63389      fi
63390    done
63391    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63392    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63393
63394    unset LLVM_LDFLAGS
63395    for flag in $("${LLVM_CONFIG}" --ldflags); do
63396      if echo "${flag}" | grep -q '^-L'; then
63397        if test "${LLVM_LDFLAGS}" != ""; then
63398          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63399        fi
63400        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63401      fi
63402    done
63403
63404    unset LLVM_LIBS
63405    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63406      if echo "${flag}" | grep -q '^-l'; then
63407        if test "${LLVM_LIBS}" != ""; then
63408          LLVM_LIBS="${LLVM_LIBS} "
63409        fi
63410        LLVM_LIBS="${LLVM_LIBS}${flag}"
63411      fi
63412    done
63413
63414    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63415    # always properly detect -ltinfo
63416    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63417
63418
63419
63420
63421  fi
63422
63423
63424
63425# Check whether --with-libjpeg was given.
63426if test "${with_libjpeg+set}" = set; then :
63427  withval=$with_libjpeg;
63428fi
63429
63430
63431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63432$as_echo_n "checking for which libjpeg to use... " >&6; }
63433  # default is bundled
63434  DEFAULT_LIBJPEG=bundled
63435  # if user didn't specify, use DEFAULT_LIBJPEG
63436  if test "x${with_libjpeg}" = "x"; then
63437    with_libjpeg=${DEFAULT_LIBJPEG}
63438  fi
63439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63440$as_echo "${with_libjpeg}" >&6; }
63441
63442  if test "x${with_libjpeg}" = "xbundled"; then
63443    USE_EXTERNAL_LIBJPEG=false
63444  elif test "x${with_libjpeg}" = "xsystem"; then
63445    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63446if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63447
63448else
63449   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63450fi
63451
63452
63453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63454$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63455if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63456  $as_echo_n "(cached) " >&6
63457else
63458  ac_check_lib_save_LIBS=$LIBS
63459LIBS="-ljpeg  $LIBS"
63460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63461/* end confdefs.h.  */
63462
63463/* Override any GCC internal prototype to avoid an error.
63464   Use char because int might match the return type of a GCC
63465   builtin and then its argument prototype would still apply.  */
63466#ifdef __cplusplus
63467extern "C"
63468#endif
63469char jpeg_CreateDecompress ();
63470int
63471main ()
63472{
63473return jpeg_CreateDecompress ();
63474  ;
63475  return 0;
63476}
63477_ACEOF
63478if ac_fn_cxx_try_link "$LINENO"; then :
63479  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63480else
63481  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63482fi
63483rm -f core conftest.err conftest.$ac_objext \
63484    conftest$ac_exeext conftest.$ac_ext
63485LIBS=$ac_check_lib_save_LIBS
63486fi
63487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63488$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63489if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63490  cat >>confdefs.h <<_ACEOF
63491#define HAVE_LIBJPEG 1
63492_ACEOF
63493
63494  LIBS="-ljpeg $LIBS"
63495
63496else
63497   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63498fi
63499
63500
63501    USE_EXTERNAL_LIBJPEG=true
63502  else
63503    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63504  fi
63505
63506
63507
63508
63509
63510# Check whether --with-giflib was given.
63511if test "${with_giflib+set}" = set; then :
63512  withval=$with_giflib;
63513fi
63514
63515
63516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63517$as_echo_n "checking for which giflib to use... " >&6; }
63518  # default is bundled
63519  DEFAULT_GIFLIB=bundled
63520  # if user didn't specify, use DEFAULT_GIFLIB
63521  if test "x${with_giflib}" = "x"; then
63522    with_giflib=${DEFAULT_GIFLIB}
63523  fi
63524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63525$as_echo "${with_giflib}" >&6; }
63526
63527  if test "x${with_giflib}" = "xbundled"; then
63528    USE_EXTERNAL_LIBGIF=false
63529  elif test "x${with_giflib}" = "xsystem"; then
63530    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63531if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63532
63533else
63534   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63535fi
63536
63537
63538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63539$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63540if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63541  $as_echo_n "(cached) " >&6
63542else
63543  ac_check_lib_save_LIBS=$LIBS
63544LIBS="-lgif  $LIBS"
63545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63546/* end confdefs.h.  */
63547
63548/* Override any GCC internal prototype to avoid an error.
63549   Use char because int might match the return type of a GCC
63550   builtin and then its argument prototype would still apply.  */
63551#ifdef __cplusplus
63552extern "C"
63553#endif
63554char DGifGetCode ();
63555int
63556main ()
63557{
63558return DGifGetCode ();
63559  ;
63560  return 0;
63561}
63562_ACEOF
63563if ac_fn_cxx_try_link "$LINENO"; then :
63564  ac_cv_lib_gif_DGifGetCode=yes
63565else
63566  ac_cv_lib_gif_DGifGetCode=no
63567fi
63568rm -f core conftest.err conftest.$ac_objext \
63569    conftest$ac_exeext conftest.$ac_ext
63570LIBS=$ac_check_lib_save_LIBS
63571fi
63572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63573$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63574if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63575  cat >>confdefs.h <<_ACEOF
63576#define HAVE_LIBGIF 1
63577_ACEOF
63578
63579  LIBS="-lgif $LIBS"
63580
63581else
63582   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63583fi
63584
63585
63586    USE_EXTERNAL_LIBGIF=true
63587  else
63588    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63589  fi
63590
63591
63592
63593
63594
63595# Check whether --with-libpng was given.
63596if test "${with_libpng+set}" = set; then :
63597  withval=$with_libpng;
63598fi
63599
63600
63601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63602$as_echo_n "checking for which libpng to use... " >&6; }
63603
63604  # default is bundled
63605  DEFAULT_LIBPNG=bundled
63606  # if user didn't specify, use DEFAULT_LIBPNG
63607  if test "x${with_libpng}" = "x"; then
63608    with_libpng=${DEFAULT_LIBPNG}
63609  fi
63610
63611  if test "x${with_libpng}" = "xbundled"; then
63612    USE_EXTERNAL_LIBPNG=false
63613    PNG_CFLAGS=""
63614    PNG_LIBS=""
63615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63616$as_echo "bundled" >&6; }
63617  elif test "x${with_libpng}" = "xsystem"; then
63618
63619pkg_failed=no
63620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63621$as_echo_n "checking for PNG... " >&6; }
63622
63623if test -n "$PNG_CFLAGS"; then
63624    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63625 elif test -n "$PKG_CONFIG"; then
63626    if test -n "$PKG_CONFIG" && \
63627    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63628  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63629  ac_status=$?
63630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63631  test $ac_status = 0; }; then
63632  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63633else
63634  pkg_failed=yes
63635fi
63636 else
63637    pkg_failed=untried
63638fi
63639if test -n "$PNG_LIBS"; then
63640    pkg_cv_PNG_LIBS="$PNG_LIBS"
63641 elif test -n "$PKG_CONFIG"; then
63642    if test -n "$PKG_CONFIG" && \
63643    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63644  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63645  ac_status=$?
63646  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63647  test $ac_status = 0; }; then
63648  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63649else
63650  pkg_failed=yes
63651fi
63652 else
63653    pkg_failed=untried
63654fi
63655
63656
63657
63658if test $pkg_failed = yes; then
63659
63660if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63661        _pkg_short_errors_supported=yes
63662else
63663        _pkg_short_errors_supported=no
63664fi
63665        if test $_pkg_short_errors_supported = yes; then
63666	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63667        else
63668	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63669        fi
63670	# Put the nasty error message in config.log where it belongs
63671	echo "$PNG_PKG_ERRORS" >&5
63672
63673	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63674$as_echo "no" >&6; }
63675                LIBPNG_FOUND=no
63676elif test $pkg_failed = untried; then
63677	LIBPNG_FOUND=no
63678else
63679	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63680	PNG_LIBS=$pkg_cv_PNG_LIBS
63681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63682$as_echo "yes" >&6; }
63683	LIBPNG_FOUND=yes
63684fi
63685    if test "x${LIBPNG_FOUND}" = "xyes"; then
63686      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
63687      USE_EXTERNAL_LIBPNG=true
63688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63689$as_echo "system" >&6; }
63690    else
63691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63692$as_echo "system not found" >&6; }
63693      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63694    fi
63695  else
63696    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63697  fi
63698
63699
63700
63701
63702
63703
63704
63705# Check whether --with-zlib was given.
63706if test "${with_zlib+set}" = set; then :
63707  withval=$with_zlib;
63708fi
63709
63710
63711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63712$as_echo_n "checking for compress in -lz... " >&6; }
63713if ${ac_cv_lib_z_compress+:} false; then :
63714  $as_echo_n "(cached) " >&6
63715else
63716  ac_check_lib_save_LIBS=$LIBS
63717LIBS="-lz  $LIBS"
63718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63719/* end confdefs.h.  */
63720
63721/* Override any GCC internal prototype to avoid an error.
63722   Use char because int might match the return type of a GCC
63723   builtin and then its argument prototype would still apply.  */
63724#ifdef __cplusplus
63725extern "C"
63726#endif
63727char compress ();
63728int
63729main ()
63730{
63731return compress ();
63732  ;
63733  return 0;
63734}
63735_ACEOF
63736if ac_fn_cxx_try_link "$LINENO"; then :
63737  ac_cv_lib_z_compress=yes
63738else
63739  ac_cv_lib_z_compress=no
63740fi
63741rm -f core conftest.err conftest.$ac_objext \
63742    conftest$ac_exeext conftest.$ac_ext
63743LIBS=$ac_check_lib_save_LIBS
63744fi
63745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63746$as_echo "$ac_cv_lib_z_compress" >&6; }
63747if test "x$ac_cv_lib_z_compress" = xyes; then :
63748   ZLIB_FOUND=yes
63749else
63750   ZLIB_FOUND=no
63751fi
63752
63753
63754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63755$as_echo_n "checking for which zlib to use... " >&6; }
63756
63757  DEFAULT_ZLIB=system
63758  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63759    # On windows default is bundled...on others default is system
63760    DEFAULT_ZLIB=bundled
63761  fi
63762
63763  if test "x${ZLIB_FOUND}" != "xyes"; then
63764    # If we don't find any system...set default to bundled
63765    DEFAULT_ZLIB=bundled
63766  fi
63767
63768  # If user didn't specify, use DEFAULT_ZLIB
63769  if test "x${with_zlib}" = "x"; then
63770    with_zlib=${DEFAULT_ZLIB}
63771  fi
63772
63773  if test "x${with_zlib}" = "xbundled"; then
63774    USE_EXTERNAL_LIBZ=false
63775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63776$as_echo "bundled" >&6; }
63777  elif test "x${with_zlib}" = "xsystem"; then
63778    if test "x${ZLIB_FOUND}" = "xyes"; then
63779      USE_EXTERNAL_LIBZ=true
63780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63781$as_echo "system" >&6; }
63782    else
63783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63784$as_echo "system not found" >&6; }
63785      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63786    fi
63787  else
63788    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63789  fi
63790
63791
63792
63793
63794
63795# Check whether --with-lcms was given.
63796if test "${with_lcms+set}" = set; then :
63797  withval=$with_lcms;
63798fi
63799
63800
63801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63802$as_echo_n "checking for which lcms to use... " >&6; }
63803
63804  DEFAULT_LCMS=bundled
63805  # If user didn't specify, use DEFAULT_LCMS
63806  if test "x${with_lcms}" = "x"; then
63807    with_lcms=${DEFAULT_LCMS}
63808  fi
63809
63810  if test "x${with_lcms}" = "xbundled"; then
63811    USE_EXTERNAL_LCMS=false
63812    LCMS_CFLAGS=""
63813    LCMS_LIBS=""
63814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63815$as_echo "bundled" >&6; }
63816  elif test "x${with_lcms}" = "xsystem"; then
63817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63818$as_echo "system" >&6; }
63819
63820pkg_failed=no
63821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63822$as_echo_n "checking for LCMS... " >&6; }
63823
63824if test -n "$LCMS_CFLAGS"; then
63825    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63826 elif test -n "$PKG_CONFIG"; then
63827    if test -n "$PKG_CONFIG" && \
63828    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63829  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63830  ac_status=$?
63831  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63832  test $ac_status = 0; }; then
63833  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63834else
63835  pkg_failed=yes
63836fi
63837 else
63838    pkg_failed=untried
63839fi
63840if test -n "$LCMS_LIBS"; then
63841    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63842 elif test -n "$PKG_CONFIG"; then
63843    if test -n "$PKG_CONFIG" && \
63844    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63845  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63846  ac_status=$?
63847  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63848  test $ac_status = 0; }; then
63849  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63850else
63851  pkg_failed=yes
63852fi
63853 else
63854    pkg_failed=untried
63855fi
63856
63857
63858
63859if test $pkg_failed = yes; then
63860
63861if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63862        _pkg_short_errors_supported=yes
63863else
63864        _pkg_short_errors_supported=no
63865fi
63866        if test $_pkg_short_errors_supported = yes; then
63867	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63868        else
63869	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63870        fi
63871	# Put the nasty error message in config.log where it belongs
63872	echo "$LCMS_PKG_ERRORS" >&5
63873
63874	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63875$as_echo "no" >&6; }
63876                LCMS_FOUND=no
63877elif test $pkg_failed = untried; then
63878	LCMS_FOUND=no
63879else
63880	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63881	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63883$as_echo "yes" >&6; }
63884	LCMS_FOUND=yes
63885fi
63886    if test "x${LCMS_FOUND}" = "xyes"; then
63887      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
63888      USE_EXTERNAL_LCMS=true
63889    else
63890      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63891    fi
63892  else
63893    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63894  fi
63895
63896
63897
63898
63899
63900
63901
63902
63903
63904
63905
63906
63907
63908  # Setup libm (the maths library)
63909  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63911$as_echo_n "checking for cos in -lm... " >&6; }
63912if ${ac_cv_lib_m_cos+:} false; then :
63913  $as_echo_n "(cached) " >&6
63914else
63915  ac_check_lib_save_LIBS=$LIBS
63916LIBS="-lm  $LIBS"
63917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63918/* end confdefs.h.  */
63919
63920/* Override any GCC internal prototype to avoid an error.
63921   Use char because int might match the return type of a GCC
63922   builtin and then its argument prototype would still apply.  */
63923#ifdef __cplusplus
63924extern "C"
63925#endif
63926char cos ();
63927int
63928main ()
63929{
63930return cos ();
63931  ;
63932  return 0;
63933}
63934_ACEOF
63935if ac_fn_cxx_try_link "$LINENO"; then :
63936  ac_cv_lib_m_cos=yes
63937else
63938  ac_cv_lib_m_cos=no
63939fi
63940rm -f core conftest.err conftest.$ac_objext \
63941    conftest$ac_exeext conftest.$ac_ext
63942LIBS=$ac_check_lib_save_LIBS
63943fi
63944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63945$as_echo "$ac_cv_lib_m_cos" >&6; }
63946if test "x$ac_cv_lib_m_cos" = xyes; then :
63947  cat >>confdefs.h <<_ACEOF
63948#define HAVE_LIBM 1
63949_ACEOF
63950
63951  LIBS="-lm $LIBS"
63952
63953else
63954
63955        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63956$as_echo "$as_me: Maths library was not found" >&6;}
63957
63958fi
63959
63960    LIBM="-lm"
63961  else
63962    LIBM=""
63963  fi
63964
63965
63966  # Setup libdl (for dynamic library loading)
63967  save_LIBS="$LIBS"
63968  LIBS=""
63969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63970$as_echo_n "checking for dlopen in -ldl... " >&6; }
63971if ${ac_cv_lib_dl_dlopen+:} false; then :
63972  $as_echo_n "(cached) " >&6
63973else
63974  ac_check_lib_save_LIBS=$LIBS
63975LIBS="-ldl  $LIBS"
63976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63977/* end confdefs.h.  */
63978
63979/* Override any GCC internal prototype to avoid an error.
63980   Use char because int might match the return type of a GCC
63981   builtin and then its argument prototype would still apply.  */
63982#ifdef __cplusplus
63983extern "C"
63984#endif
63985char dlopen ();
63986int
63987main ()
63988{
63989return dlopen ();
63990  ;
63991  return 0;
63992}
63993_ACEOF
63994if ac_fn_cxx_try_link "$LINENO"; then :
63995  ac_cv_lib_dl_dlopen=yes
63996else
63997  ac_cv_lib_dl_dlopen=no
63998fi
63999rm -f core conftest.err conftest.$ac_objext \
64000    conftest$ac_exeext conftest.$ac_ext
64001LIBS=$ac_check_lib_save_LIBS
64002fi
64003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64004$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64005if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64006  cat >>confdefs.h <<_ACEOF
64007#define HAVE_LIBDL 1
64008_ACEOF
64009
64010  LIBS="-ldl $LIBS"
64011
64012fi
64013
64014  LIBDL="$LIBS"
64015
64016  LIBS="$save_LIBS"
64017
64018  # Deprecated libraries, keep the flags for backwards compatibility
64019  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64020
64021
64022# Check whether --with-dxsdk was given.
64023if test "${with_dxsdk+set}" = set; then :
64024  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64025$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64026fi
64027
64028
64029
64030
64031# Check whether --with-dxsdk-lib was given.
64032if test "${with_dxsdk_lib+set}" = set; then :
64033  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64034$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64035fi
64036
64037
64038
64039
64040# Check whether --with-dxsdk-include was given.
64041if test "${with_dxsdk_include+set}" = set; then :
64042  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64043$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64044fi
64045
64046
64047  fi
64048
64049  # Control if libzip can use mmap. Available for purposes of overriding.
64050  LIBZIP_CAN_USE_MMAP=true
64051
64052
64053
64054  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64055    # Find the root of the Solaris Studio installation from the compiler path
64056    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64057    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64059$as_echo_n "checking for libstlport.so.1... " >&6; }
64060    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64061      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64062      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64063    fi
64064    if test -f "$STLPORT_LIB"; then
64065      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64066$as_echo "yes, $STLPORT_LIB" >&6; }
64067
64068  # Only process if variable expands to non-empty
64069
64070  if test "x$STLPORT_LIB" != x; then
64071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64072
64073  # Input might be given as Windows format, start by converting to
64074  # unix format.
64075  path="$STLPORT_LIB"
64076  new_path=`$CYGPATH -u "$path"`
64077
64078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64081  # "foo.exe" is OK but "foo" is an error.
64082  #
64083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64084  # It is also a way to make sure we got the proper file name for the real test later on.
64085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64086  if test "x$test_shortpath" = x; then
64087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64088$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64089    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64090  fi
64091
64092  # Call helper function which possibly converts this using DOS-style short mode.
64093  # If so, the updated path is stored in $new_path.
64094
64095  input_path="$new_path"
64096  # Check if we need to convert this using DOS-style short mode. If the path
64097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64098  # take no chances and rewrite it.
64099  # Note: m4 eats our [], so we need to use [ and ] instead.
64100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64101  if test "x$has_forbidden_chars" != x; then
64102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64106      # Going to short mode and back again did indeed matter. Since short mode is
64107      # case insensitive, let's make it lowercase to improve readability.
64108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64109      # Now convert it back to Unix-style (cygpath)
64110      input_path=`$CYGPATH -u "$shortmode_path"`
64111      new_path="$input_path"
64112    fi
64113  fi
64114
64115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64116  if test "x$test_cygdrive_prefix" = x; then
64117    # As a simple fix, exclude /usr/bin since it's not a real path.
64118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64120      # a path prefixed by /cygdrive for fixpath to work.
64121      new_path="$CYGWIN_ROOT_PATH$input_path"
64122    fi
64123  fi
64124
64125
64126  if test "x$path" != "x$new_path"; then
64127    STLPORT_LIB="$new_path"
64128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64129$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64130  fi
64131
64132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64133
64134  path="$STLPORT_LIB"
64135  has_colon=`$ECHO $path | $GREP ^.:`
64136  new_path="$path"
64137  if test "x$has_colon" = x; then
64138    # Not in mixed or Windows style, start by that.
64139    new_path=`cmd //c echo $path`
64140  fi
64141
64142
64143  input_path="$new_path"
64144  # Check if we need to convert this using DOS-style short mode. If the path
64145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64146  # take no chances and rewrite it.
64147  # Note: m4 eats our [], so we need to use [ and ] instead.
64148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64149  if test "x$has_forbidden_chars" != x; then
64150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64152  fi
64153
64154
64155  windows_path="$new_path"
64156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64157    unix_path=`$CYGPATH -u "$windows_path"`
64158    new_path="$unix_path"
64159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64161    new_path="$unix_path"
64162  fi
64163
64164  if test "x$path" != "x$new_path"; then
64165    STLPORT_LIB="$new_path"
64166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64167$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64168  fi
64169
64170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64172
64173    else
64174      # We're on a unix platform. Hooray! :)
64175      path="$STLPORT_LIB"
64176      has_space=`$ECHO "$path" | $GREP " "`
64177      if test "x$has_space" != x; then
64178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64179$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64181      fi
64182
64183      # Use eval to expand a potential ~
64184      eval path="$path"
64185      if test ! -f "$path" && test ! -d "$path"; then
64186        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64187      fi
64188
64189      if test -d "$path"; then
64190        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64191      else
64192        dir="`$DIRNAME "$path"`"
64193        base="`$BASENAME "$path"`"
64194        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64195      fi
64196    fi
64197  fi
64198
64199    else
64200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64201$as_echo "no, not found at $STLPORT_LIB" >&6; }
64202      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64203    fi
64204
64205  fi
64206
64207
64208
64209
64210
64211
64212
64213
64214
64215
64216
64217
64218
64219
64220# Hotspot setup depends on lib checks (AOT needs libelf).
64221
64222
64223  # The user can in some cases supply additional jvm features. For the custom
64224  # variant, this defines the entire variant.
64225
64226# Check whether --with-jvm-features was given.
64227if test "${with_jvm_features+set}" = set; then :
64228  withval=$with_jvm_features;
64229fi
64230
64231  if test "x$with_jvm_features" != x; then
64232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64233$as_echo_n "checking additional JVM features... " >&6; }
64234    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64236$as_echo "$JVM_FEATURES" >&6; }
64237  fi
64238
64239  # Override hotspot cpu definitions for ARM platforms
64240  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64241    HOTSPOT_TARGET_CPU=arm_32
64242    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64243    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64244    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64245  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64246    HOTSPOT_TARGET_CPU=arm_64
64247    HOTSPOT_TARGET_CPU_ARCH=arm
64248    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64249    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64250  fi
64251
64252  # Verify that dependencies are met for explicitly set features.
64253  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64254    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64255  fi
64256
64257  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64258    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64259  fi
64260
64261  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64262    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64263  fi
64264
64265  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64266    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64267  fi
64268
64269  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64270    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64271  fi
64272
64273  # Turn on additional features based on other parts of configure
64274  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64275    JVM_FEATURES="$JVM_FEATURES dtrace"
64276  else
64277    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64278      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64279    fi
64280  fi
64281
64282  if test "x$STATIC_BUILD" = "xtrue"; then
64283    JVM_FEATURES="$JVM_FEATURES static-build"
64284  else
64285    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64286      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64287    fi
64288  fi
64289
64290  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64291    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64292      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64293    fi
64294  fi
64295
64296  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64297    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64298      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64299    fi
64300  fi
64301
64302  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64303  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64304     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64305     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64306    JVM_FEATURES_jvmci="jvmci"
64307  else
64308    JVM_FEATURES_jvmci=""
64309  fi
64310
64311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
64312$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
64313  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64315$as_echo "yes, forced" >&6; }
64316    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64317      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64318    fi
64319    INCLUDE_GRAAL="true"
64320  else
64321    # By default enable graal build where AOT is available
64322    if test "x$ENABLE_AOT" = "xtrue"; then
64323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64324$as_echo "yes" >&6; }
64325      JVM_FEATURES_graal="graal"
64326      INCLUDE_GRAAL="true"
64327    else
64328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64329$as_echo "no" >&6; }
64330      JVM_FEATURES_graal=""
64331      INCLUDE_GRAAL="false"
64332    fi
64333  fi
64334
64335
64336
64337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64338$as_echo_n "checking if aot should be enabled... " >&6; }
64339  if test "x$ENABLE_AOT" = "xtrue"; then
64340    if test "x$enable_aot" = "xyes"; then
64341      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64342$as_echo "yes, forced" >&6; }
64343    else
64344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64345$as_echo "yes" >&6; }
64346    fi
64347    JVM_FEATURES_aot="aot"
64348  else
64349    if test "x$enable_aot" = "xno"; then
64350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64351$as_echo "no, forced" >&6; }
64352    else
64353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64354$as_echo "no" >&6; }
64355    fi
64356    JVM_FEATURES_aot=""
64357  fi
64358
64359  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64360    # Default to use link time optimizations on minimal on arm
64361    JVM_FEATURES_link_time_opt="link-time-opt"
64362  else
64363    JVM_FEATURES_link_time_opt=""
64364  fi
64365
64366  # All variants but minimal (and custom) get these features
64367  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64368
64369  # Enable features depending on variant.
64370  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64371  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64372  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64373  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64374  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64375  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64376  JVM_FEATURES_custom="$JVM_FEATURES"
64377
64378
64379
64380
64381
64382
64383
64384
64385
64386  # Used for verification of Makefiles by check-jvm-feature
64387
64388
64389  # We don't support --with-jvm-interpreter anymore, use zero instead.
64390
64391
64392# Check whether --with-jvm-interpreter was given.
64393if test "${with_jvm_interpreter+set}" = set; then :
64394  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64395$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64396fi
64397
64398
64399
64400
64401###############################################################################
64402#
64403# We need to do some final tweaking, when everything else is done.
64404#
64405###############################################################################
64406
64407
64408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64409$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64410
64411  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64412    ENABLE_INTREE_EC=true
64413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64414$as_echo "yes" >&6; }
64415  else
64416    ENABLE_INTREE_EC=false
64417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64418$as_echo "no" >&6; }
64419  fi
64420
64421
64422
64423
64424  # Check whether --enable-jtreg-failure-handler was given.
64425if test "${enable_jtreg_failure_handler+set}" = set; then :
64426  enableval=$enable_jtreg_failure_handler;
64427fi
64428
64429
64430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64431$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64432
64433  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64434    if test "x$JT_HOME" = "x"; then
64435      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64436    else
64437      BUILD_FAILURE_HANDLER=true
64438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64439$as_echo "yes, forced" >&6; }
64440    fi
64441  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64442    BUILD_FAILURE_HANDLER=false
64443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64444$as_echo "no, forced" >&6; }
64445  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64446      || test "x$enable_jtreg_failure_handler" = "x"; then
64447    if test "x$JT_HOME" = "x"; then
64448      BUILD_FAILURE_HANDLER=false
64449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64450$as_echo "no, missing jtreg" >&6; }
64451    else
64452      BUILD_FAILURE_HANDLER=true
64453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64454$as_echo "yes, jtreg present" >&6; }
64455    fi
64456  else
64457    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64458  fi
64459
64460
64461
64462
64463  # Check whether --enable-generate-classlist was given.
64464if test "${enable_generate_classlist+set}" = set; then :
64465  enableval=$enable_generate_classlist;
64466fi
64467
64468
64469  # Check if it's likely that it's possible to generate the classlist. Depending
64470  # on exact jvm configuration it could be possible anyway.
64471  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64472    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64473  else
64474    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64475  fi
64476
64477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64478$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64479  if test "x$enable_generate_classlist" = "xyes"; then
64480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64481$as_echo "yes, forced" >&6; }
64482    ENABLE_GENERATE_CLASSLIST="true"
64483    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64484      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64485$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64486    fi
64487  elif test "x$enable_generate_classlist" = "xno"; then
64488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64489$as_echo "no, forced" >&6; }
64490    ENABLE_GENERATE_CLASSLIST="false"
64491  elif test "x$enable_generate_classlist" = "x"; then
64492    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64494$as_echo "yes" >&6; }
64495      ENABLE_GENERATE_CLASSLIST="true"
64496    else
64497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64498$as_echo "no" >&6; }
64499      ENABLE_GENERATE_CLASSLIST="false"
64500    fi
64501  else
64502    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64503  fi
64504
64505
64506
64507
64508###############################################################################
64509#
64510# Configure parts of the build that only affect the build performance,
64511# not the result.
64512#
64513###############################################################################
64514
64515
64516  # How many cores do we have on this build system?
64517
64518# Check whether --with-num-cores was given.
64519if test "${with_num_cores+set}" = set; then :
64520  withval=$with_num_cores;
64521fi
64522
64523  if test "x$with_num_cores" = x; then
64524    # The number of cores were not specified, try to probe them.
64525
64526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64527$as_echo_n "checking for number of cores... " >&6; }
64528  NUM_CORES=1
64529  FOUND_CORES=no
64530
64531  if test -f /proc/cpuinfo; then
64532    # Looks like a Linux (or cygwin) system
64533    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64534    FOUND_CORES=yes
64535  elif test -x /usr/sbin/psrinfo; then
64536    # Looks like a Solaris system
64537    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64538    FOUND_CORES=yes
64539  elif test -x /usr/sbin/sysctl; then
64540    # Looks like a MacOSX system
64541    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64542    FOUND_CORES=yes
64543  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64544    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64545    FOUND_CORES=yes
64546  elif test -n "$NUMBER_OF_PROCESSORS"; then
64547    # On windows, look in the env
64548    NUM_CORES=$NUMBER_OF_PROCESSORS
64549    FOUND_CORES=yes
64550  fi
64551
64552  if test "x$FOUND_CORES" = xyes; then
64553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64554$as_echo "$NUM_CORES" >&6; }
64555  else
64556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64557$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64558    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64559$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64560  fi
64561
64562  else
64563    NUM_CORES=$with_num_cores
64564  fi
64565
64566
64567
64568  # How much memory do we have on this build system?
64569
64570# Check whether --with-memory-size was given.
64571if test "${with_memory_size+set}" = set; then :
64572  withval=$with_memory_size;
64573fi
64574
64575  if test "x$with_memory_size" = x; then
64576    # The memory size was not specified, try to probe it.
64577
64578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64579$as_echo_n "checking for memory size... " >&6; }
64580  # Default to 1024 MB
64581  MEMORY_SIZE=1024
64582  FOUND_MEM=no
64583
64584  if test -f /proc/meminfo; then
64585    # Looks like a Linux (or cygwin) system
64586    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64587    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64588    FOUND_MEM=yes
64589  elif test -x /usr/sbin/prtconf; then
64590    # Looks like a Solaris or AIX system
64591    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64592    FOUND_MEM=yes
64593  elif test -x /usr/sbin/sysctl; then
64594    # Looks like a MacOSX system
64595    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64596    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64597    FOUND_MEM=yes
64598  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64599    # Windows, but without cygwin
64600    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64601    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64602    FOUND_MEM=yes
64603  fi
64604
64605  if test "x$FOUND_MEM" = xyes; then
64606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64607$as_echo "$MEMORY_SIZE MB" >&6; }
64608  else
64609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64610$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64611    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64612$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64613  fi
64614
64615  else
64616    MEMORY_SIZE=$with_memory_size
64617  fi
64618
64619
64620
64621  # Provide a decent default number of parallel jobs for make depending on
64622  # number of cores, amount of memory and machine architecture.
64623
64624# Check whether --with-jobs was given.
64625if test "${with_jobs+set}" = set; then :
64626  withval=$with_jobs;
64627fi
64628
64629  if test "x$with_jobs" = x; then
64630    # Number of jobs was not specified, calculate.
64631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64632$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64633    # Approximate memory in GB.
64634    memory_gb=`expr $MEMORY_SIZE / 1024`
64635    # Pick the lowest of memory in gb and number of cores.
64636    if test "$memory_gb" -lt "$NUM_CORES"; then
64637      JOBS="$memory_gb"
64638    else
64639      JOBS="$NUM_CORES"
64640    fi
64641    if test "$JOBS" -eq "0"; then
64642      JOBS=1
64643    fi
64644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64645$as_echo "$JOBS" >&6; }
64646  else
64647    JOBS=$with_jobs
64648  fi
64649
64650
64651
64652  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64653
64654# Check whether --with-test-jobs was given.
64655if test "${with_test_jobs+set}" = set; then :
64656  withval=$with_test_jobs;
64657fi
64658
64659  if test "x$with_test_jobs" = x; then
64660      TEST_JOBS=0
64661  else
64662      TEST_JOBS=$with_test_jobs
64663  fi
64664
64665
64666
64667# Setup arguments for the boot jdk (after cores and memory have been setup)
64668
64669  ##############################################################################
64670  #
64671  # Specify jvm options for anything that is run with the Boot JDK.
64672  # Not all JVM:s accept the same arguments on the command line.
64673  #
64674
64675# Check whether --with-boot-jdk-jvmargs was given.
64676if test "${with_boot_jdk_jvmargs+set}" = set; then :
64677  withval=$with_boot_jdk_jvmargs;
64678fi
64679
64680
64681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64682$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64683
64684  # Disable special log output when a debug build is used as Boot JDK...
64685
64686  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64687  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64688  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64689  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64690  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64691  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64692    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64693    JVM_ARG_OK=true
64694  else
64695    $ECHO "Arg failed:" >&5
64696    $ECHO "$OUTPUT" >&5
64697    JVM_ARG_OK=false
64698  fi
64699
64700
64701  # Force en-US environment
64702
64703  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64704  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64705  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64706  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64707  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64708  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64709    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64710    JVM_ARG_OK=true
64711  else
64712    $ECHO "Arg failed:" >&5
64713    $ECHO "$OUTPUT" >&5
64714    JVM_ARG_OK=false
64715  fi
64716
64717
64718  # Apply user provided options.
64719
64720  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64721  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64722  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64723  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64724  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64725  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64726    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64727    JVM_ARG_OK=true
64728  else
64729    $ECHO "Arg failed:" >&5
64730    $ECHO "$OUTPUT" >&5
64731    JVM_ARG_OK=false
64732  fi
64733
64734
64735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64736$as_echo "$boot_jdk_jvmargs" >&6; }
64737
64738  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64739  JAVA_FLAGS=$boot_jdk_jvmargs
64740
64741
64742
64743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64744$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64745
64746  # Starting amount of heap memory.
64747
64748  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64749  $ECHO "Command: $JAVA -Xms64M -version" >&5
64750  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64751  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64752  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64753  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64754    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64755    JVM_ARG_OK=true
64756  else
64757    $ECHO "Arg failed:" >&5
64758    $ECHO "$OUTPUT" >&5
64759    JVM_ARG_OK=false
64760  fi
64761
64762  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64763
64764  # Maximum amount of heap memory and stack size.
64765  JVM_HEAP_LIMIT_32="1024"
64766  # Running a 64 bit JVM allows for and requires a bigger heap
64767  JVM_HEAP_LIMIT_64="1600"
64768  STACK_SIZE_32=768
64769  STACK_SIZE_64=1536
64770  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64771  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64772    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64773  fi
64774  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64775    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64776  fi
64777  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64778    JVM_HEAP_LIMIT_32=512
64779    JVM_HEAP_LIMIT_64=512
64780  fi
64781
64782  if test "x$BOOT_JDK_BITS" = "x32"; then
64783    STACK_SIZE=$STACK_SIZE_32
64784    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64785  else
64786    STACK_SIZE=$STACK_SIZE_64
64787    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64788  fi
64789
64790  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64791  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64792  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64793  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64794  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64795  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64796    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64797    JVM_ARG_OK=true
64798  else
64799    $ECHO "Arg failed:" >&5
64800    $ECHO "$OUTPUT" >&5
64801    JVM_ARG_OK=false
64802  fi
64803
64804
64805  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64806  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64807  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64808  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64809  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64810  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64811    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64812    JVM_ARG_OK=true
64813  else
64814    $ECHO "Arg failed:" >&5
64815    $ECHO "$OUTPUT" >&5
64816    JVM_ARG_OK=false
64817  fi
64818
64819
64820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64821$as_echo "$boot_jdk_jvmargs_big" >&6; }
64822
64823  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64824
64825
64826  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64827    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64828    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64829  else
64830    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64831    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64832  fi
64833  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64834  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64836$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64838$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64839
64840
64841  # By default, the main javac compilations use big
64842  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64843
64844
64845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64846$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64847
64848  # Use serial gc for small short lived tools if possible
64849
64850  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64851  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64852  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64853  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64854  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64855  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64856    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64857    JVM_ARG_OK=true
64858  else
64859    $ECHO "Arg failed:" >&5
64860    $ECHO "$OUTPUT" >&5
64861    JVM_ARG_OK=false
64862  fi
64863
64864
64865  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64866  $ECHO "Command: $JAVA -Xms32M -version" >&5
64867  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64868  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64869  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64870  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64871    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64872    JVM_ARG_OK=true
64873  else
64874    $ECHO "Arg failed:" >&5
64875    $ECHO "$OUTPUT" >&5
64876    JVM_ARG_OK=false
64877  fi
64878
64879
64880  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64881  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64882  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64883  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64884  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64885  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64886    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64887    JVM_ARG_OK=true
64888  else
64889    $ECHO "Arg failed:" >&5
64890    $ECHO "$OUTPUT" >&5
64891    JVM_ARG_OK=false
64892  fi
64893
64894
64895  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64896  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64897  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64898  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64899  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64900  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64901    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64902    JVM_ARG_OK=true
64903  else
64904    $ECHO "Arg failed:" >&5
64905    $ECHO "$OUTPUT" >&5
64906    JVM_ARG_OK=false
64907  fi
64908
64909
64910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64911$as_echo "$boot_jdk_jvmargs_small" >&6; }
64912
64913  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64914
64915
64916  JAVA_TOOL_FLAGS_SMALL=""
64917  for f in $JAVA_FLAGS_SMALL; do
64918    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64919  done
64920
64921
64922
64923# Setup smart javac (after cores and memory have been setup)
64924
64925
64926# Check whether --with-sjavac-server-java was given.
64927if test "${with_sjavac_server_java+set}" = set; then :
64928  withval=$with_sjavac_server_java;
64929fi
64930
64931
64932  if test "x$with_sjavac_server_java" != x; then
64933    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64934    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64935    if test "x$FOUND_VERSION" = x; then
64936      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64937    fi
64938  else
64939    SJAVAC_SERVER_JAVA="$JAVA"
64940  fi
64941
64942
64943  if test "$MEMORY_SIZE" -gt "3000"; then
64944
64945  $ECHO "Check if jvm arg is ok: -d64" >&5
64946  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64947  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64948  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64949  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64950  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64951    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64952    JVM_ARG_OK=true
64953  else
64954    $ECHO "Arg failed:" >&5
64955    $ECHO "$OUTPUT" >&5
64956    JVM_ARG_OK=false
64957  fi
64958
64959    if test "$JVM_ARG_OK" = true; then
64960      JVM_64BIT=true
64961      JVM_ARG_OK=false
64962    fi
64963  fi
64964
64965  MX_VALUE=`expr $MEMORY_SIZE / 2`
64966  if test "$JVM_64BIT" = true; then
64967    # Set ms lower than mx since more than one instance of the server might
64968    # get launched at the same time before they figure out which instance won.
64969    MS_VALUE=512
64970    if test "$MX_VALUE" -gt "2048"; then
64971      MX_VALUE=2048
64972    fi
64973  else
64974    MS_VALUE=256
64975    if test "$MX_VALUE" -gt "1500"; then
64976      MX_VALUE=1500
64977    fi
64978  fi
64979  if test "$MX_VALUE" -lt "512"; then
64980    MX_VALUE=512
64981  fi
64982
64983  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64984  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64985  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64986  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64987  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64988  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64989    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64990    JVM_ARG_OK=true
64991  else
64992    $ECHO "Arg failed:" >&5
64993    $ECHO "$OUTPUT" >&5
64994    JVM_ARG_OK=false
64995  fi
64996
64997
64998
64999  # Check whether --enable-sjavac was given.
65000if test "${enable_sjavac+set}" = set; then :
65001  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65002else
65003  ENABLE_SJAVAC="no"
65004fi
65005
65006  if test "x$JVM_ARG_OK" = "xfalse"; then
65007    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65008$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65009    ENABLE_SJAVAC="no"
65010  fi
65011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65012$as_echo_n "checking whether to use sjavac... " >&6; }
65013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65014$as_echo "$ENABLE_SJAVAC" >&6; }
65015
65016
65017  # Check whether --enable-javac-server was given.
65018if test "${enable_javac_server+set}" = set; then :
65019  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65020else
65021  ENABLE_JAVAC_SERVER="yes"
65022fi
65023
65024  if test "x$JVM_ARG_OK" = "xfalse"; then
65025    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65026$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65027    ENABLE_JAVAC_SERVER="no"
65028  fi
65029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65030$as_echo_n "checking whether to use javac server... " >&6; }
65031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65032$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65033
65034
65035  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65036    # When using a server javac, the small client instances do not need much
65037    # resources.
65038    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65039  fi
65040
65041
65042# Setup use of icecc if requested
65043
65044  # Check whether --enable-icecc was given.
65045if test "${enable_icecc+set}" = set; then :
65046  enableval=$enable_icecc;
65047fi
65048
65049
65050  if test "x${enable_icecc}" = "xyes"; then
65051
65052
65053
65054  # Publish this variable in the help.
65055
65056
65057  if [ -z "${ICECC_CMD+x}" ]; then
65058    # The variable is not set by user, try to locate tool using the code snippet
65059    for ac_prog in icecc
65060do
65061  # Extract the first word of "$ac_prog", so it can be a program name with args.
65062set dummy $ac_prog; ac_word=$2
65063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65064$as_echo_n "checking for $ac_word... " >&6; }
65065if ${ac_cv_path_ICECC_CMD+:} false; then :
65066  $as_echo_n "(cached) " >&6
65067else
65068  case $ICECC_CMD in
65069  [\\/]* | ?:[\\/]*)
65070  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65071  ;;
65072  *)
65073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65074for as_dir in $PATH
65075do
65076  IFS=$as_save_IFS
65077  test -z "$as_dir" && as_dir=.
65078    for ac_exec_ext in '' $ac_executable_extensions; do
65079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65080    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65082    break 2
65083  fi
65084done
65085  done
65086IFS=$as_save_IFS
65087
65088  ;;
65089esac
65090fi
65091ICECC_CMD=$ac_cv_path_ICECC_CMD
65092if test -n "$ICECC_CMD"; then
65093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65094$as_echo "$ICECC_CMD" >&6; }
65095else
65096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65097$as_echo "no" >&6; }
65098fi
65099
65100
65101  test -n "$ICECC_CMD" && break
65102done
65103
65104  else
65105    # The variable is set, but is it from the command line or the environment?
65106
65107    # Try to remove the string !ICECC_CMD! from our list.
65108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65110      # If it failed, the variable was not from the command line. Ignore it,
65111      # but warn the user (except for BASH, which is always set by the calling BASH).
65112      if test "xICECC_CMD" != xBASH; then
65113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65114$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65115      fi
65116      # Try to locate tool using the code snippet
65117      for ac_prog in icecc
65118do
65119  # Extract the first word of "$ac_prog", so it can be a program name with args.
65120set dummy $ac_prog; ac_word=$2
65121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65122$as_echo_n "checking for $ac_word... " >&6; }
65123if ${ac_cv_path_ICECC_CMD+:} false; then :
65124  $as_echo_n "(cached) " >&6
65125else
65126  case $ICECC_CMD in
65127  [\\/]* | ?:[\\/]*)
65128  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65129  ;;
65130  *)
65131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65132for as_dir in $PATH
65133do
65134  IFS=$as_save_IFS
65135  test -z "$as_dir" && as_dir=.
65136    for ac_exec_ext in '' $ac_executable_extensions; do
65137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65138    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65140    break 2
65141  fi
65142done
65143  done
65144IFS=$as_save_IFS
65145
65146  ;;
65147esac
65148fi
65149ICECC_CMD=$ac_cv_path_ICECC_CMD
65150if test -n "$ICECC_CMD"; then
65151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65152$as_echo "$ICECC_CMD" >&6; }
65153else
65154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65155$as_echo "no" >&6; }
65156fi
65157
65158
65159  test -n "$ICECC_CMD" && break
65160done
65161
65162    else
65163      # If it succeeded, then it was overridden by the user. We will use it
65164      # for the tool.
65165
65166      # First remove it from the list of overridden variables, so we can test
65167      # for unknown variables in the end.
65168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65169
65170      # Check if we try to supply an empty value
65171      if test "x$ICECC_CMD" = x; then
65172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65173$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65175$as_echo_n "checking for ICECC_CMD... " >&6; }
65176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65177$as_echo "disabled" >&6; }
65178      else
65179        # Check if the provided tool contains a complete path.
65180        tool_specified="$ICECC_CMD"
65181        tool_basename="${tool_specified##*/}"
65182        if test "x$tool_basename" = "x$tool_specified"; then
65183          # A command without a complete path is provided, search $PATH.
65184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65185$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65186          # Extract the first word of "$tool_basename", so it can be a program name with args.
65187set dummy $tool_basename; ac_word=$2
65188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65189$as_echo_n "checking for $ac_word... " >&6; }
65190if ${ac_cv_path_ICECC_CMD+:} false; then :
65191  $as_echo_n "(cached) " >&6
65192else
65193  case $ICECC_CMD in
65194  [\\/]* | ?:[\\/]*)
65195  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65196  ;;
65197  *)
65198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65199for as_dir in $PATH
65200do
65201  IFS=$as_save_IFS
65202  test -z "$as_dir" && as_dir=.
65203    for ac_exec_ext in '' $ac_executable_extensions; do
65204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65205    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65207    break 2
65208  fi
65209done
65210  done
65211IFS=$as_save_IFS
65212
65213  ;;
65214esac
65215fi
65216ICECC_CMD=$ac_cv_path_ICECC_CMD
65217if test -n "$ICECC_CMD"; then
65218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65219$as_echo "$ICECC_CMD" >&6; }
65220else
65221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65222$as_echo "no" >&6; }
65223fi
65224
65225
65226          if test "x$ICECC_CMD" = x; then
65227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65228          fi
65229        else
65230          # Otherwise we believe it is a complete path. Use it as it is.
65231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65232$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65234$as_echo_n "checking for ICECC_CMD... " >&6; }
65235          if test ! -x "$tool_specified"; then
65236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65237$as_echo "not found" >&6; }
65238            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65239          fi
65240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65241$as_echo "$tool_specified" >&6; }
65242        fi
65243      fi
65244    fi
65245
65246  fi
65247
65248
65249
65250  if test "x$ICECC_CMD" = x; then
65251    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65252  fi
65253
65254
65255    old_path="$PATH"
65256
65257    # Look for icecc-create-env in some known places
65258    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65259
65260
65261
65262  # Publish this variable in the help.
65263
65264
65265  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65266    # The variable is not set by user, try to locate tool using the code snippet
65267    for ac_prog in icecc-create-env
65268do
65269  # Extract the first word of "$ac_prog", so it can be a program name with args.
65270set dummy $ac_prog; ac_word=$2
65271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65272$as_echo_n "checking for $ac_word... " >&6; }
65273if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65274  $as_echo_n "(cached) " >&6
65275else
65276  case $ICECC_CREATE_ENV in
65277  [\\/]* | ?:[\\/]*)
65278  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65279  ;;
65280  *)
65281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65282for as_dir in $PATH
65283do
65284  IFS=$as_save_IFS
65285  test -z "$as_dir" && as_dir=.
65286    for ac_exec_ext in '' $ac_executable_extensions; do
65287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65288    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65290    break 2
65291  fi
65292done
65293  done
65294IFS=$as_save_IFS
65295
65296  ;;
65297esac
65298fi
65299ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65300if test -n "$ICECC_CREATE_ENV"; then
65301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65302$as_echo "$ICECC_CREATE_ENV" >&6; }
65303else
65304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65305$as_echo "no" >&6; }
65306fi
65307
65308
65309  test -n "$ICECC_CREATE_ENV" && break
65310done
65311
65312  else
65313    # The variable is set, but is it from the command line or the environment?
65314
65315    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65318      # If it failed, the variable was not from the command line. Ignore it,
65319      # but warn the user (except for BASH, which is always set by the calling BASH).
65320      if test "xICECC_CREATE_ENV" != xBASH; then
65321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65322$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65323      fi
65324      # Try to locate tool using the code snippet
65325      for ac_prog in icecc-create-env
65326do
65327  # Extract the first word of "$ac_prog", so it can be a program name with args.
65328set dummy $ac_prog; ac_word=$2
65329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65330$as_echo_n "checking for $ac_word... " >&6; }
65331if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65332  $as_echo_n "(cached) " >&6
65333else
65334  case $ICECC_CREATE_ENV in
65335  [\\/]* | ?:[\\/]*)
65336  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65337  ;;
65338  *)
65339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65340for as_dir in $PATH
65341do
65342  IFS=$as_save_IFS
65343  test -z "$as_dir" && as_dir=.
65344    for ac_exec_ext in '' $ac_executable_extensions; do
65345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65346    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65348    break 2
65349  fi
65350done
65351  done
65352IFS=$as_save_IFS
65353
65354  ;;
65355esac
65356fi
65357ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65358if test -n "$ICECC_CREATE_ENV"; then
65359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65360$as_echo "$ICECC_CREATE_ENV" >&6; }
65361else
65362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65363$as_echo "no" >&6; }
65364fi
65365
65366
65367  test -n "$ICECC_CREATE_ENV" && break
65368done
65369
65370    else
65371      # If it succeeded, then it was overridden by the user. We will use it
65372      # for the tool.
65373
65374      # First remove it from the list of overridden variables, so we can test
65375      # for unknown variables in the end.
65376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65377
65378      # Check if we try to supply an empty value
65379      if test "x$ICECC_CREATE_ENV" = x; then
65380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65381$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65383$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65385$as_echo "disabled" >&6; }
65386      else
65387        # Check if the provided tool contains a complete path.
65388        tool_specified="$ICECC_CREATE_ENV"
65389        tool_basename="${tool_specified##*/}"
65390        if test "x$tool_basename" = "x$tool_specified"; then
65391          # A command without a complete path is provided, search $PATH.
65392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65393$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65394          # Extract the first word of "$tool_basename", so it can be a program name with args.
65395set dummy $tool_basename; ac_word=$2
65396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65397$as_echo_n "checking for $ac_word... " >&6; }
65398if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65399  $as_echo_n "(cached) " >&6
65400else
65401  case $ICECC_CREATE_ENV in
65402  [\\/]* | ?:[\\/]*)
65403  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65404  ;;
65405  *)
65406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65407for as_dir in $PATH
65408do
65409  IFS=$as_save_IFS
65410  test -z "$as_dir" && as_dir=.
65411    for ac_exec_ext in '' $ac_executable_extensions; do
65412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65413    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65415    break 2
65416  fi
65417done
65418  done
65419IFS=$as_save_IFS
65420
65421  ;;
65422esac
65423fi
65424ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65425if test -n "$ICECC_CREATE_ENV"; then
65426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65427$as_echo "$ICECC_CREATE_ENV" >&6; }
65428else
65429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65430$as_echo "no" >&6; }
65431fi
65432
65433
65434          if test "x$ICECC_CREATE_ENV" = x; then
65435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65436          fi
65437        else
65438          # Otherwise we believe it is a complete path. Use it as it is.
65439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65440$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65442$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65443          if test ! -x "$tool_specified"; then
65444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65445$as_echo "not found" >&6; }
65446            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65447          fi
65448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65449$as_echo "$tool_specified" >&6; }
65450        fi
65451      fi
65452    fi
65453
65454  fi
65455
65456
65457
65458  if test "x$ICECC_CREATE_ENV" = x; then
65459    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65460  fi
65461
65462
65463    # Use icecc-create-env to create a minimal compilation environment that can
65464    # be sent to the other hosts in the icecream cluster.
65465    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65466    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65467    # Older versions of icecc does not have the --gcc parameter
65468    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65469      icecc_gcc_arg="--gcc"
65470    fi
65471    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65472
65473  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65474      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65475          ${icecc_create_env_log} 2>&1 )
65476  if test "$?" != "0"; then
65477    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65478$as_echo "$as_me: icecc-create-env output:" >&6;}
65479    cat \
65480          ${icecc_create_env_log}
65481    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65482  fi
65483
65484    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65485      # For clang, the icecc compilerwrapper is needed. It usually resides next
65486      # to icecc-create-env.
65487
65488
65489
65490  # Publish this variable in the help.
65491
65492
65493  if [ -z "${ICECC_WRAPPER+x}" ]; then
65494    # The variable is not set by user, try to locate tool using the code snippet
65495    for ac_prog in compilerwrapper
65496do
65497  # Extract the first word of "$ac_prog", so it can be a program name with args.
65498set dummy $ac_prog; ac_word=$2
65499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65500$as_echo_n "checking for $ac_word... " >&6; }
65501if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65502  $as_echo_n "(cached) " >&6
65503else
65504  case $ICECC_WRAPPER in
65505  [\\/]* | ?:[\\/]*)
65506  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65507  ;;
65508  *)
65509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65510for as_dir in $PATH
65511do
65512  IFS=$as_save_IFS
65513  test -z "$as_dir" && as_dir=.
65514    for ac_exec_ext in '' $ac_executable_extensions; do
65515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65516    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65518    break 2
65519  fi
65520done
65521  done
65522IFS=$as_save_IFS
65523
65524  ;;
65525esac
65526fi
65527ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65528if test -n "$ICECC_WRAPPER"; then
65529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65530$as_echo "$ICECC_WRAPPER" >&6; }
65531else
65532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65533$as_echo "no" >&6; }
65534fi
65535
65536
65537  test -n "$ICECC_WRAPPER" && break
65538done
65539
65540  else
65541    # The variable is set, but is it from the command line or the environment?
65542
65543    # Try to remove the string !ICECC_WRAPPER! from our list.
65544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65546      # If it failed, the variable was not from the command line. Ignore it,
65547      # but warn the user (except for BASH, which is always set by the calling BASH).
65548      if test "xICECC_WRAPPER" != xBASH; then
65549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65550$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65551      fi
65552      # Try to locate tool using the code snippet
65553      for ac_prog in compilerwrapper
65554do
65555  # Extract the first word of "$ac_prog", so it can be a program name with args.
65556set dummy $ac_prog; ac_word=$2
65557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65558$as_echo_n "checking for $ac_word... " >&6; }
65559if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65560  $as_echo_n "(cached) " >&6
65561else
65562  case $ICECC_WRAPPER in
65563  [\\/]* | ?:[\\/]*)
65564  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65565  ;;
65566  *)
65567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65568for as_dir in $PATH
65569do
65570  IFS=$as_save_IFS
65571  test -z "$as_dir" && as_dir=.
65572    for ac_exec_ext in '' $ac_executable_extensions; do
65573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65574    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65576    break 2
65577  fi
65578done
65579  done
65580IFS=$as_save_IFS
65581
65582  ;;
65583esac
65584fi
65585ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65586if test -n "$ICECC_WRAPPER"; then
65587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65588$as_echo "$ICECC_WRAPPER" >&6; }
65589else
65590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65591$as_echo "no" >&6; }
65592fi
65593
65594
65595  test -n "$ICECC_WRAPPER" && break
65596done
65597
65598    else
65599      # If it succeeded, then it was overridden by the user. We will use it
65600      # for the tool.
65601
65602      # First remove it from the list of overridden variables, so we can test
65603      # for unknown variables in the end.
65604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65605
65606      # Check if we try to supply an empty value
65607      if test "x$ICECC_WRAPPER" = x; then
65608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65609$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65611$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65613$as_echo "disabled" >&6; }
65614      else
65615        # Check if the provided tool contains a complete path.
65616        tool_specified="$ICECC_WRAPPER"
65617        tool_basename="${tool_specified##*/}"
65618        if test "x$tool_basename" = "x$tool_specified"; then
65619          # A command without a complete path is provided, search $PATH.
65620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65621$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65622          # Extract the first word of "$tool_basename", so it can be a program name with args.
65623set dummy $tool_basename; ac_word=$2
65624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65625$as_echo_n "checking for $ac_word... " >&6; }
65626if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65627  $as_echo_n "(cached) " >&6
65628else
65629  case $ICECC_WRAPPER in
65630  [\\/]* | ?:[\\/]*)
65631  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65632  ;;
65633  *)
65634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65635for as_dir in $PATH
65636do
65637  IFS=$as_save_IFS
65638  test -z "$as_dir" && as_dir=.
65639    for ac_exec_ext in '' $ac_executable_extensions; do
65640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65641    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65643    break 2
65644  fi
65645done
65646  done
65647IFS=$as_save_IFS
65648
65649  ;;
65650esac
65651fi
65652ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65653if test -n "$ICECC_WRAPPER"; then
65654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65655$as_echo "$ICECC_WRAPPER" >&6; }
65656else
65657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65658$as_echo "no" >&6; }
65659fi
65660
65661
65662          if test "x$ICECC_WRAPPER" = x; then
65663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65664          fi
65665        else
65666          # Otherwise we believe it is a complete path. Use it as it is.
65667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65668$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65670$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65671          if test ! -x "$tool_specified"; then
65672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65673$as_echo "not found" >&6; }
65674            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65675          fi
65676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65677$as_echo "$tool_specified" >&6; }
65678        fi
65679      fi
65680    fi
65681
65682  fi
65683
65684
65685
65686  if test "x$ICECC_WRAPPER" = x; then
65687    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65688  fi
65689
65690
65691
65692  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65693      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65694  if test "$?" != "0"; then
65695    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65696$as_echo "$as_me: icecc-create-env output:" >&6;}
65697    cat ${icecc_create_env_log}
65698    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65699  fi
65700
65701    else
65702      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65703    fi
65704    PATH="$old_path"
65705    # The bundle with the compiler gets a name based on checksums. Parse log file
65706    # to find it.
65707    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65708    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65709    if test ! -f ${ICECC_ENV_BUNDLE}; then
65710      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65711    fi
65712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65713$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65715$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65716    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65717
65718    if test "x${COMPILE_TYPE}" = "xcross"; then
65719      # If cross compiling, create a separate env package for the build compiler
65720      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65721      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65722      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65723
65724  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65725      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65726            ${icecc_create_env_log_build} 2>&1 )
65727  if test "$?" != "0"; then
65728    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65729$as_echo "$as_me: icecc-create-env output:" >&6;}
65730    cat \
65731            ${icecc_create_env_log_build}
65732    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65733  fi
65734
65735      elif test "x${BUILD_CC##*/}" = "xclang"; then
65736
65737  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65738      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65739  if test "$?" != "0"; then
65740    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65741$as_echo "$as_me: icecc-create-env output:" >&6;}
65742    cat ${icecc_create_env_log_build}
65743    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65744  fi
65745
65746      else
65747        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65748      fi
65749      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65750      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65751      if test ! -f ${ICECC_ENV_BUNDLE}; then
65752        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65753      fi
65754      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65755$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65757$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65758      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65759          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65760    else
65761      BUILD_ICECC="${ICECC}"
65762    fi
65763
65764
65765  fi
65766
65767
65768# Can the C/C++ compiler use precompiled headers?
65769
65770
65771  ###############################################################################
65772  #
65773  # Can the C/C++ compiler use precompiled headers?
65774  #
65775  # Check whether --enable-precompiled-headers was given.
65776if test "${enable_precompiled_headers+set}" = set; then :
65777  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65778else
65779  ENABLE_PRECOMPH=yes
65780fi
65781
65782
65783  USE_PRECOMPILED_HEADER=true
65784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65785$as_echo_n "checking If precompiled header is enabled... " >&6; }
65786  if test "x$ENABLE_PRECOMPH" = xno; then
65787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65788$as_echo "no, forced" >&6; }
65789    USE_PRECOMPILED_HEADER=false
65790  elif test "x$ICECC" != "x"; then
65791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65792$as_echo "no, does not work effectively with icecc" >&6; }
65793    USE_PRECOMPILED_HEADER=false
65794  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65796$as_echo "no, does not work with Solaris Studio" >&6; }
65797    USE_PRECOMPILED_HEADER=false
65798  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65800$as_echo "no, does not work with xlc" >&6; }
65801    USE_PRECOMPILED_HEADER=false
65802  else
65803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65804$as_echo "yes" >&6; }
65805  fi
65806
65807  if test "x$ENABLE_PRECOMPH" = xyes; then
65808    # Check that the compiler actually supports precomp headers.
65809    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65811$as_echo_n "checking that precompiled headers work... " >&6; }
65812      echo "int alfa();" > conftest.h
65813      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65814      if test ! -f conftest.hpp.gch; then
65815        USE_PRECOMPILED_HEADER=false
65816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65817$as_echo "no" >&6; }
65818      else
65819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65820$as_echo "yes" >&6; }
65821      fi
65822      $RM conftest.h conftest.hpp.gch
65823    fi
65824  fi
65825
65826
65827
65828
65829# Setup use of ccache, if available
65830
65831  # Check whether --enable-ccache was given.
65832if test "${enable_ccache+set}" = set; then :
65833  enableval=$enable_ccache;
65834fi
65835
65836
65837  CCACHE_STATUS=
65838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65839$as_echo_n "checking is ccache enabled... " >&6; }
65840  if test "x$enable_ccache" = xyes; then
65841    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65843$as_echo "yes" >&6; }
65844      OLD_PATH="$PATH"
65845      if test "x$TOOLCHAIN_PATH" != x; then
65846        PATH=$TOOLCHAIN_PATH:$PATH
65847      fi
65848
65849
65850
65851  # Publish this variable in the help.
65852
65853
65854  if [ -z "${CCACHE+x}" ]; then
65855    # The variable is not set by user, try to locate tool using the code snippet
65856    for ac_prog in ccache
65857do
65858  # Extract the first word of "$ac_prog", so it can be a program name with args.
65859set dummy $ac_prog; ac_word=$2
65860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65861$as_echo_n "checking for $ac_word... " >&6; }
65862if ${ac_cv_path_CCACHE+:} false; then :
65863  $as_echo_n "(cached) " >&6
65864else
65865  case $CCACHE in
65866  [\\/]* | ?:[\\/]*)
65867  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65868  ;;
65869  *)
65870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65871for as_dir in $PATH
65872do
65873  IFS=$as_save_IFS
65874  test -z "$as_dir" && as_dir=.
65875    for ac_exec_ext in '' $ac_executable_extensions; do
65876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65877    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65879    break 2
65880  fi
65881done
65882  done
65883IFS=$as_save_IFS
65884
65885  ;;
65886esac
65887fi
65888CCACHE=$ac_cv_path_CCACHE
65889if test -n "$CCACHE"; then
65890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65891$as_echo "$CCACHE" >&6; }
65892else
65893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65894$as_echo "no" >&6; }
65895fi
65896
65897
65898  test -n "$CCACHE" && break
65899done
65900
65901  else
65902    # The variable is set, but is it from the command line or the environment?
65903
65904    # Try to remove the string !CCACHE! from our list.
65905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65907      # If it failed, the variable was not from the command line. Ignore it,
65908      # but warn the user (except for BASH, which is always set by the calling BASH).
65909      if test "xCCACHE" != xBASH; then
65910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65911$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65912      fi
65913      # Try to locate tool using the code snippet
65914      for ac_prog in ccache
65915do
65916  # Extract the first word of "$ac_prog", so it can be a program name with args.
65917set dummy $ac_prog; ac_word=$2
65918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65919$as_echo_n "checking for $ac_word... " >&6; }
65920if ${ac_cv_path_CCACHE+:} false; then :
65921  $as_echo_n "(cached) " >&6
65922else
65923  case $CCACHE in
65924  [\\/]* | ?:[\\/]*)
65925  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65926  ;;
65927  *)
65928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65929for as_dir in $PATH
65930do
65931  IFS=$as_save_IFS
65932  test -z "$as_dir" && as_dir=.
65933    for ac_exec_ext in '' $ac_executable_extensions; do
65934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65935    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65937    break 2
65938  fi
65939done
65940  done
65941IFS=$as_save_IFS
65942
65943  ;;
65944esac
65945fi
65946CCACHE=$ac_cv_path_CCACHE
65947if test -n "$CCACHE"; then
65948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65949$as_echo "$CCACHE" >&6; }
65950else
65951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65952$as_echo "no" >&6; }
65953fi
65954
65955
65956  test -n "$CCACHE" && break
65957done
65958
65959    else
65960      # If it succeeded, then it was overridden by the user. We will use it
65961      # for the tool.
65962
65963      # First remove it from the list of overridden variables, so we can test
65964      # for unknown variables in the end.
65965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65966
65967      # Check if we try to supply an empty value
65968      if test "x$CCACHE" = x; then
65969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65970$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65972$as_echo_n "checking for CCACHE... " >&6; }
65973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65974$as_echo "disabled" >&6; }
65975      else
65976        # Check if the provided tool contains a complete path.
65977        tool_specified="$CCACHE"
65978        tool_basename="${tool_specified##*/}"
65979        if test "x$tool_basename" = "x$tool_specified"; then
65980          # A command without a complete path is provided, search $PATH.
65981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65982$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65983          # Extract the first word of "$tool_basename", so it can be a program name with args.
65984set dummy $tool_basename; ac_word=$2
65985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65986$as_echo_n "checking for $ac_word... " >&6; }
65987if ${ac_cv_path_CCACHE+:} false; then :
65988  $as_echo_n "(cached) " >&6
65989else
65990  case $CCACHE in
65991  [\\/]* | ?:[\\/]*)
65992  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65993  ;;
65994  *)
65995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65996for as_dir in $PATH
65997do
65998  IFS=$as_save_IFS
65999  test -z "$as_dir" && as_dir=.
66000    for ac_exec_ext in '' $ac_executable_extensions; do
66001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66002    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66004    break 2
66005  fi
66006done
66007  done
66008IFS=$as_save_IFS
66009
66010  ;;
66011esac
66012fi
66013CCACHE=$ac_cv_path_CCACHE
66014if test -n "$CCACHE"; then
66015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66016$as_echo "$CCACHE" >&6; }
66017else
66018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66019$as_echo "no" >&6; }
66020fi
66021
66022
66023          if test "x$CCACHE" = x; then
66024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66025          fi
66026        else
66027          # Otherwise we believe it is a complete path. Use it as it is.
66028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66029$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66031$as_echo_n "checking for CCACHE... " >&6; }
66032          if test ! -x "$tool_specified"; then
66033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66034$as_echo "not found" >&6; }
66035            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66036          fi
66037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66038$as_echo "$tool_specified" >&6; }
66039        fi
66040      fi
66041    fi
66042
66043  fi
66044
66045
66046
66047  if test "x$CCACHE" = x; then
66048    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66049  fi
66050
66051
66052      PATH="$OLD_PATH"
66053      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66054      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66055    else
66056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66057$as_echo "no" >&6; }
66058      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66059$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66060    fi
66061  elif test "x$enable_ccache" = xno; then
66062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66063$as_echo "no, explicitly disabled" >&6; }
66064    CCACHE_STATUS="Disabled"
66065  elif test "x$enable_ccache" = x; then
66066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66067$as_echo "no" >&6; }
66068  else
66069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66070$as_echo "unknown" >&6; }
66071    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66072  fi
66073
66074
66075
66076# Check whether --with-ccache-dir was given.
66077if test "${with_ccache_dir+set}" = set; then :
66078  withval=$with_ccache_dir;
66079fi
66080
66081
66082  if test "x$with_ccache_dir" != x; then
66083    # When using a non home ccache directory, assume the use is to share ccache files
66084    # with other users. Thus change the umask.
66085    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66086    if test "x$CCACHE" = x; then
66087      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66088$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66089    fi
66090  fi
66091
66092  if test "x$CCACHE" != x; then
66093
66094  if test "x$CCACHE" != x; then
66095    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66096      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66097          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66098      if test "x$HAS_BAD_CCACHE" != "x"; then
66099        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66100      fi
66101    fi
66102    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66103      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66104          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66105      if test "x$HAS_BAD_CCACHE" != "x"; then
66106        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66107      fi
66108      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66109$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66110      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66111      PUSHED_FLAGS="$CXXFLAGS"
66112      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66113      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66114/* end confdefs.h.  */
66115
66116int
66117main ()
66118{
66119
66120  ;
66121  return 0;
66122}
66123_ACEOF
66124if ac_fn_cxx_try_compile "$LINENO"; then :
66125  CC_KNOWS_CCACHE_TRICK=yes
66126else
66127  CC_KNOWS_CCACHE_TRICK=no
66128fi
66129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66130      CXXFLAGS="$PUSHED_FLAGS"
66131      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66133$as_echo "yes" >&6; }
66134        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66135
66136        CCACHE_SLOPPINESS=pch_defines,time_macros
66137      else
66138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66139$as_echo "no" >&6; }
66140        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66141      fi
66142    fi
66143
66144    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66145        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66146
66147    if test "x$SET_CCACHE_DIR" != x; then
66148      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66149      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66150    fi
66151  fi
66152
66153  fi
66154
66155
66156###############################################################################
66157#
66158# And now the finish...
66159#
66160###############################################################################
66161
66162# Check for some common pitfalls
66163
66164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66165    file_to_test="$SRC_ROOT/LICENSE"
66166    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66167      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
66168    fi
66169  fi
66170
66171
66172  # Did user specify any unknown variables?
66173
66174  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66175    # Replace the separating ! with spaces before presenting for end user.
66176    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66177    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66178$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66179  fi
66180
66181
66182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66183$as_echo_n "checking if build directory is on local disk... " >&6; }
66184
66185  # df -l lists only local disks; if the given directory is not found then
66186  # a non-zero exit code is given
66187  if test "x$DF" = x; then
66188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66189      # msys does not have df; use Windows "net use" instead.
66190      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66191      if test "x$IS_NETWORK_DISK" = x; then
66192        OUTPUT_DIR_IS_LOCAL="yes"
66193      else
66194        OUTPUT_DIR_IS_LOCAL="no"
66195      fi
66196    else
66197      # No df here, say it's local
66198      OUTPUT_DIR_IS_LOCAL="yes"
66199    fi
66200  else
66201    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66202      OUTPUT_DIR_IS_LOCAL="yes"
66203    else
66204      OUTPUT_DIR_IS_LOCAL="no"
66205    fi
66206  fi
66207
66208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66209$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66210
66211
66212
66213  # Check if the user has any old-style ALT_ variables set.
66214  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66215
66216  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66217  # Since we can't properly handle the dependencies for this, warn the user about the situation
66218  if test -e $OUTPUT_ROOT/spec.gmk; then
66219    IS_RECONFIGURE=yes
66220  else
66221    IS_RECONFIGURE=no
66222  fi
66223
66224
66225# At the end, call the custom hook. (Dummy macro if no custom sources available)
66226
66227
66228# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66229
66230  # Keep feature lists sorted and free of duplicates
66231  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66232  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66233  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66234  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66235  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66236  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66237  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66238
66239  # Validate features
66240  for variant in $JVM_VARIANTS; do
66241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66242$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66243    features_var_name=JVM_FEATURES_$variant
66244    JVM_FEATURES_TO_TEST=${!features_var_name}
66245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66246$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66247    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66248    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66249    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66250    if test "x$INVALID_FEATURES" != x; then
66251      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66252    fi
66253  done
66254
66255
66256# We're messing a bit with internal autoconf variables to put the config.status
66257# in the output directory instead of the current directory.
66258CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66259
66260# Create the actual output files. Now the main work of configure is done.
66261cat >confcache <<\_ACEOF
66262# This file is a shell script that caches the results of configure
66263# tests run on this system so they can be shared between configure
66264# scripts and configure runs, see configure's option --config-cache.
66265# It is not useful on other systems.  If it contains results you don't
66266# want to keep, you may remove or edit it.
66267#
66268# config.status only pays attention to the cache file if you give it
66269# the --recheck option to rerun configure.
66270#
66271# `ac_cv_env_foo' variables (set or unset) will be overridden when
66272# loading this file, other *unset* `ac_cv_foo' will be assigned the
66273# following values.
66274
66275_ACEOF
66276
66277# The following way of writing the cache mishandles newlines in values,
66278# but we know of no workaround that is simple, portable, and efficient.
66279# So, we kill variables containing newlines.
66280# Ultrix sh set writes to stderr and can't be redirected directly,
66281# and sets the high bit in the cache file unless we assign to the vars.
66282(
66283  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66284    eval ac_val=\$$ac_var
66285    case $ac_val in #(
66286    *${as_nl}*)
66287      case $ac_var in #(
66288      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66289$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66290      esac
66291      case $ac_var in #(
66292      _ | IFS | as_nl) ;; #(
66293      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66294      *) { eval $ac_var=; unset $ac_var;} ;;
66295      esac ;;
66296    esac
66297  done
66298
66299  (set) 2>&1 |
66300    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66301    *${as_nl}ac_space=\ *)
66302      # `set' does not quote correctly, so add quotes: double-quote
66303      # substitution turns \\\\ into \\, and sed turns \\ into \.
66304      sed -n \
66305	"s/'/'\\\\''/g;
66306	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66307      ;; #(
66308    *)
66309      # `set' quotes correctly as required by POSIX, so do not add quotes.
66310      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66311      ;;
66312    esac |
66313    sort
66314) |
66315  sed '
66316     /^ac_cv_env_/b end
66317     t clear
66318     :clear
66319     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66320     t end
66321     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66322     :end' >>confcache
66323if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66324  if test -w "$cache_file"; then
66325    if test "x$cache_file" != "x/dev/null"; then
66326      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66327$as_echo "$as_me: updating cache $cache_file" >&6;}
66328      if test ! -f "$cache_file" || test -h "$cache_file"; then
66329	cat confcache >"$cache_file"
66330      else
66331        case $cache_file in #(
66332        */* | ?:*)
66333	  mv -f confcache "$cache_file"$$ &&
66334	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66335        *)
66336	  mv -f confcache "$cache_file" ;;
66337	esac
66338      fi
66339    fi
66340  else
66341    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66342$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66343  fi
66344fi
66345rm -f confcache
66346
66347test "x$prefix" = xNONE && prefix=$ac_default_prefix
66348# Let make expand exec_prefix.
66349test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66350
66351# Transform confdefs.h into DEFS.
66352# Protect against shell expansion while executing Makefile rules.
66353# Protect against Makefile macro expansion.
66354#
66355# If the first sed substitution is executed (which looks for macros that
66356# take arguments), then branch to the quote section.  Otherwise,
66357# look for a macro that doesn't take arguments.
66358ac_script='
66359:mline
66360/\\$/{
66361 N
66362 s,\\\n,,
66363 b mline
66364}
66365t clear
66366:clear
66367s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66368t quote
66369s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66370t quote
66371b any
66372:quote
66373s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66374s/\[/\\&/g
66375s/\]/\\&/g
66376s/\$/$$/g
66377H
66378:any
66379${
66380	g
66381	s/^\n//
66382	s/\n/ /g
66383	p
66384}
66385'
66386DEFS=`sed -n "$ac_script" confdefs.h`
66387
66388
66389ac_libobjs=
66390ac_ltlibobjs=
66391U=
66392for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66393  # 1. Remove the extension, and $U if already installed.
66394  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66395  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66396  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66397  #    will be set to the directory where LIBOBJS objects are built.
66398  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66399  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66400done
66401LIBOBJS=$ac_libobjs
66402
66403LTLIBOBJS=$ac_ltlibobjs
66404
66405
66406
66407: "${CONFIG_STATUS=./config.status}"
66408ac_write_fail=0
66409ac_clean_files_save=$ac_clean_files
66410ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66411{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66412$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66413as_write_fail=0
66414cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66415#! $SHELL
66416# Generated by $as_me.
66417# Run this file to recreate the current configuration.
66418# Compiler output produced by configure, useful for debugging
66419# configure, is in config.log if it exists.
66420
66421debug=false
66422ac_cs_recheck=false
66423ac_cs_silent=false
66424
66425SHELL=\${CONFIG_SHELL-$SHELL}
66426export SHELL
66427_ASEOF
66428cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66429## -------------------- ##
66430## M4sh Initialization. ##
66431## -------------------- ##
66432
66433# Be more Bourne compatible
66434DUALCASE=1; export DUALCASE # for MKS sh
66435if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66436  emulate sh
66437  NULLCMD=:
66438  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66439  # is contrary to our usage.  Disable this feature.
66440  alias -g '${1+"$@"}'='"$@"'
66441  setopt NO_GLOB_SUBST
66442else
66443  case `(set -o) 2>/dev/null` in #(
66444  *posix*) :
66445    set -o posix ;; #(
66446  *) :
66447     ;;
66448esac
66449fi
66450
66451
66452as_nl='
66453'
66454export as_nl
66455# Printing a long string crashes Solaris 7 /usr/bin/printf.
66456as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66457as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66458as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66459# Prefer a ksh shell builtin over an external printf program on Solaris,
66460# but without wasting forks for bash or zsh.
66461if test -z "$BASH_VERSION$ZSH_VERSION" \
66462    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66463  as_echo='print -r --'
66464  as_echo_n='print -rn --'
66465elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66466  as_echo='printf %s\n'
66467  as_echo_n='printf %s'
66468else
66469  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66470    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66471    as_echo_n='/usr/ucb/echo -n'
66472  else
66473    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66474    as_echo_n_body='eval
66475      arg=$1;
66476      case $arg in #(
66477      *"$as_nl"*)
66478	expr "X$arg" : "X\\(.*\\)$as_nl";
66479	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66480      esac;
66481      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66482    '
66483    export as_echo_n_body
66484    as_echo_n='sh -c $as_echo_n_body as_echo'
66485  fi
66486  export as_echo_body
66487  as_echo='sh -c $as_echo_body as_echo'
66488fi
66489
66490# The user is always right.
66491if test "${PATH_SEPARATOR+set}" != set; then
66492  PATH_SEPARATOR=:
66493  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66494    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66495      PATH_SEPARATOR=';'
66496  }
66497fi
66498
66499
66500# IFS
66501# We need space, tab and new line, in precisely that order.  Quoting is
66502# there to prevent editors from complaining about space-tab.
66503# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66504# splitting by setting IFS to empty value.)
66505IFS=" ""	$as_nl"
66506
66507# Find who we are.  Look in the path if we contain no directory separator.
66508as_myself=
66509case $0 in #((
66510  *[\\/]* ) as_myself=$0 ;;
66511  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66512for as_dir in $PATH
66513do
66514  IFS=$as_save_IFS
66515  test -z "$as_dir" && as_dir=.
66516    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66517  done
66518IFS=$as_save_IFS
66519
66520     ;;
66521esac
66522# We did not find ourselves, most probably we were run as `sh COMMAND'
66523# in which case we are not to be found in the path.
66524if test "x$as_myself" = x; then
66525  as_myself=$0
66526fi
66527if test ! -f "$as_myself"; then
66528  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66529  exit 1
66530fi
66531
66532# Unset variables that we do not need and which cause bugs (e.g. in
66533# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66534# suppresses any "Segmentation fault" message there.  '((' could
66535# trigger a bug in pdksh 5.2.14.
66536for as_var in BASH_ENV ENV MAIL MAILPATH
66537do eval test x\${$as_var+set} = xset \
66538  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66539done
66540PS1='$ '
66541PS2='> '
66542PS4='+ '
66543
66544# NLS nuisances.
66545LC_ALL=C
66546export LC_ALL
66547LANGUAGE=C
66548export LANGUAGE
66549
66550# CDPATH.
66551(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66552
66553
66554# as_fn_error STATUS ERROR [LINENO LOG_FD]
66555# ----------------------------------------
66556# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66557# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66558# script with STATUS, using 1 if that was 0.
66559as_fn_error ()
66560{
66561  as_status=$1; test $as_status -eq 0 && as_status=1
66562  if test "$4"; then
66563    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66564    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66565  fi
66566  $as_echo "$as_me: error: $2" >&2
66567  as_fn_exit $as_status
66568} # as_fn_error
66569
66570
66571# as_fn_set_status STATUS
66572# -----------------------
66573# Set $? to STATUS, without forking.
66574as_fn_set_status ()
66575{
66576  return $1
66577} # as_fn_set_status
66578
66579# as_fn_exit STATUS
66580# -----------------
66581# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66582as_fn_exit ()
66583{
66584  set +e
66585  as_fn_set_status $1
66586  exit $1
66587} # as_fn_exit
66588
66589# as_fn_unset VAR
66590# ---------------
66591# Portably unset VAR.
66592as_fn_unset ()
66593{
66594  { eval $1=; unset $1;}
66595}
66596as_unset=as_fn_unset
66597# as_fn_append VAR VALUE
66598# ----------------------
66599# Append the text in VALUE to the end of the definition contained in VAR. Take
66600# advantage of any shell optimizations that allow amortized linear growth over
66601# repeated appends, instead of the typical quadratic growth present in naive
66602# implementations.
66603if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66604  eval 'as_fn_append ()
66605  {
66606    eval $1+=\$2
66607  }'
66608else
66609  as_fn_append ()
66610  {
66611    eval $1=\$$1\$2
66612  }
66613fi # as_fn_append
66614
66615# as_fn_arith ARG...
66616# ------------------
66617# Perform arithmetic evaluation on the ARGs, and store the result in the
66618# global $as_val. Take advantage of shells that can avoid forks. The arguments
66619# must be portable across $(()) and expr.
66620if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66621  eval 'as_fn_arith ()
66622  {
66623    as_val=$(( $* ))
66624  }'
66625else
66626  as_fn_arith ()
66627  {
66628    as_val=`expr "$@" || test $? -eq 1`
66629  }
66630fi # as_fn_arith
66631
66632
66633if expr a : '\(a\)' >/dev/null 2>&1 &&
66634   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66635  as_expr=expr
66636else
66637  as_expr=false
66638fi
66639
66640if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66641  as_basename=basename
66642else
66643  as_basename=false
66644fi
66645
66646if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66647  as_dirname=dirname
66648else
66649  as_dirname=false
66650fi
66651
66652as_me=`$as_basename -- "$0" ||
66653$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66654	 X"$0" : 'X\(//\)$' \| \
66655	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66656$as_echo X/"$0" |
66657    sed '/^.*\/\([^/][^/]*\)\/*$/{
66658	    s//\1/
66659	    q
66660	  }
66661	  /^X\/\(\/\/\)$/{
66662	    s//\1/
66663	    q
66664	  }
66665	  /^X\/\(\/\).*/{
66666	    s//\1/
66667	    q
66668	  }
66669	  s/.*/./; q'`
66670
66671# Avoid depending upon Character Ranges.
66672as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66673as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66674as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66675as_cr_digits='0123456789'
66676as_cr_alnum=$as_cr_Letters$as_cr_digits
66677
66678ECHO_C= ECHO_N= ECHO_T=
66679case `echo -n x` in #(((((
66680-n*)
66681  case `echo 'xy\c'` in
66682  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66683  xy)  ECHO_C='\c';;
66684  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66685       ECHO_T='	';;
66686  esac;;
66687*)
66688  ECHO_N='-n';;
66689esac
66690
66691rm -f conf$$ conf$$.exe conf$$.file
66692if test -d conf$$.dir; then
66693  rm -f conf$$.dir/conf$$.file
66694else
66695  rm -f conf$$.dir
66696  mkdir conf$$.dir 2>/dev/null
66697fi
66698if (echo >conf$$.file) 2>/dev/null; then
66699  if ln -s conf$$.file conf$$ 2>/dev/null; then
66700    as_ln_s='ln -s'
66701    # ... but there are two gotchas:
66702    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66703    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66704    # In both cases, we have to default to `cp -pR'.
66705    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66706      as_ln_s='cp -pR'
66707  elif ln conf$$.file conf$$ 2>/dev/null; then
66708    as_ln_s=ln
66709  else
66710    as_ln_s='cp -pR'
66711  fi
66712else
66713  as_ln_s='cp -pR'
66714fi
66715rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66716rmdir conf$$.dir 2>/dev/null
66717
66718
66719# as_fn_mkdir_p
66720# -------------
66721# Create "$as_dir" as a directory, including parents if necessary.
66722as_fn_mkdir_p ()
66723{
66724
66725  case $as_dir in #(
66726  -*) as_dir=./$as_dir;;
66727  esac
66728  test -d "$as_dir" || eval $as_mkdir_p || {
66729    as_dirs=
66730    while :; do
66731      case $as_dir in #(
66732      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66733      *) as_qdir=$as_dir;;
66734      esac
66735      as_dirs="'$as_qdir' $as_dirs"
66736      as_dir=`$as_dirname -- "$as_dir" ||
66737$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66738	 X"$as_dir" : 'X\(//\)[^/]' \| \
66739	 X"$as_dir" : 'X\(//\)$' \| \
66740	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66741$as_echo X"$as_dir" |
66742    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66743	    s//\1/
66744	    q
66745	  }
66746	  /^X\(\/\/\)[^/].*/{
66747	    s//\1/
66748	    q
66749	  }
66750	  /^X\(\/\/\)$/{
66751	    s//\1/
66752	    q
66753	  }
66754	  /^X\(\/\).*/{
66755	    s//\1/
66756	    q
66757	  }
66758	  s/.*/./; q'`
66759      test -d "$as_dir" && break
66760    done
66761    test -z "$as_dirs" || eval "mkdir $as_dirs"
66762  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66763
66764
66765} # as_fn_mkdir_p
66766if mkdir -p . 2>/dev/null; then
66767  as_mkdir_p='mkdir -p "$as_dir"'
66768else
66769  test -d ./-p && rmdir ./-p
66770  as_mkdir_p=false
66771fi
66772
66773
66774# as_fn_executable_p FILE
66775# -----------------------
66776# Test if FILE is an executable regular file.
66777as_fn_executable_p ()
66778{
66779  test -f "$1" && test -x "$1"
66780} # as_fn_executable_p
66781as_test_x='test -x'
66782as_executable_p=as_fn_executable_p
66783
66784# Sed expression to map a string onto a valid CPP name.
66785as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66786
66787# Sed expression to map a string onto a valid variable name.
66788as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66789
66790
66791exec 6>&1
66792## ----------------------------------- ##
66793## Main body of $CONFIG_STATUS script. ##
66794## ----------------------------------- ##
66795_ASEOF
66796test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66797
66798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66799# Save the log message, to keep $0 and so on meaningful, and to
66800# report actual input values of CONFIG_FILES etc. instead of their
66801# values after options handling.
66802ac_log="
66803This file was extended by OpenJDK $as_me jdk9, which was
66804generated by GNU Autoconf 2.69.  Invocation command line was
66805
66806  CONFIG_FILES    = $CONFIG_FILES
66807  CONFIG_HEADERS  = $CONFIG_HEADERS
66808  CONFIG_LINKS    = $CONFIG_LINKS
66809  CONFIG_COMMANDS = $CONFIG_COMMANDS
66810  $ $0 $@
66811
66812on `(hostname || uname -n) 2>/dev/null | sed 1q`
66813"
66814
66815_ACEOF
66816
66817case $ac_config_files in *"
66818"*) set x $ac_config_files; shift; ac_config_files=$*;;
66819esac
66820
66821
66822
66823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66824# Files that config.status was made for.
66825config_files="$ac_config_files"
66826
66827_ACEOF
66828
66829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66830ac_cs_usage="\
66831\`$as_me' instantiates files and other configuration actions
66832from templates according to the current configuration.  Unless the files
66833and actions are specified as TAGs, all are instantiated by default.
66834
66835Usage: $0 [OPTION]... [TAG]...
66836
66837  -h, --help       print this help, then exit
66838  -V, --version    print version number and configuration settings, then exit
66839      --config     print configuration, then exit
66840  -q, --quiet, --silent
66841                   do not print progress messages
66842  -d, --debug      don't remove temporary files
66843      --recheck    update $as_me by reconfiguring in the same conditions
66844      --file=FILE[:TEMPLATE]
66845                   instantiate the configuration file FILE
66846
66847Configuration files:
66848$config_files
66849
66850Report bugs to <build-dev@openjdk.java.net>.
66851OpenJDK home page: <http://openjdk.java.net>."
66852
66853_ACEOF
66854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66855ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66856ac_cs_version="\\
66857OpenJDK config.status jdk9
66858configured by $0, generated by GNU Autoconf 2.69,
66859  with options \\"\$ac_cs_config\\"
66860
66861Copyright (C) 2012 Free Software Foundation, Inc.
66862This config.status script is free software; the Free Software Foundation
66863gives unlimited permission to copy, distribute and modify it."
66864
66865ac_pwd='$ac_pwd'
66866srcdir='$srcdir'
66867AWK='$AWK'
66868test -n "\$AWK" || AWK=awk
66869_ACEOF
66870
66871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66872# The default lists apply if the user does not specify any file.
66873ac_need_defaults=:
66874while test $# != 0
66875do
66876  case $1 in
66877  --*=?*)
66878    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66879    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66880    ac_shift=:
66881    ;;
66882  --*=)
66883    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66884    ac_optarg=
66885    ac_shift=:
66886    ;;
66887  *)
66888    ac_option=$1
66889    ac_optarg=$2
66890    ac_shift=shift
66891    ;;
66892  esac
66893
66894  case $ac_option in
66895  # Handling of the options.
66896  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66897    ac_cs_recheck=: ;;
66898  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66899    $as_echo "$ac_cs_version"; exit ;;
66900  --config | --confi | --conf | --con | --co | --c )
66901    $as_echo "$ac_cs_config"; exit ;;
66902  --debug | --debu | --deb | --de | --d | -d )
66903    debug=: ;;
66904  --file | --fil | --fi | --f )
66905    $ac_shift
66906    case $ac_optarg in
66907    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66908    '') as_fn_error $? "missing file argument" ;;
66909    esac
66910    as_fn_append CONFIG_FILES " '$ac_optarg'"
66911    ac_need_defaults=false;;
66912  --he | --h |  --help | --hel | -h )
66913    $as_echo "$ac_cs_usage"; exit ;;
66914  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66915  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66916    ac_cs_silent=: ;;
66917
66918  # This is an error.
66919  -*) as_fn_error $? "unrecognized option: \`$1'
66920Try \`$0 --help' for more information." ;;
66921
66922  *) as_fn_append ac_config_targets " $1"
66923     ac_need_defaults=false ;;
66924
66925  esac
66926  shift
66927done
66928
66929ac_configure_extra_args=
66930
66931if $ac_cs_silent; then
66932  exec 6>/dev/null
66933  ac_configure_extra_args="$ac_configure_extra_args --silent"
66934fi
66935
66936_ACEOF
66937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66938if \$ac_cs_recheck; then
66939  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66940  shift
66941  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66942  CONFIG_SHELL='$SHELL'
66943  export CONFIG_SHELL
66944  exec "\$@"
66945fi
66946
66947_ACEOF
66948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66949exec 5>>config.log
66950{
66951  echo
66952  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66953## Running $as_me. ##
66954_ASBOX
66955  $as_echo "$ac_log"
66956} >&5
66957
66958_ACEOF
66959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66960_ACEOF
66961
66962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66963
66964# Handling of arguments.
66965for ac_config_target in $ac_config_targets
66966do
66967  case $ac_config_target in
66968    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66969    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66970    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66971    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66972    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66973
66974  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66975  esac
66976done
66977
66978
66979# If the user did not use the arguments to specify the items to instantiate,
66980# then the envvar interface is used.  Set only those that are not.
66981# We use the long form for the default assignment because of an extremely
66982# bizarre bug on SunOS 4.1.3.
66983if $ac_need_defaults; then
66984  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66985fi
66986
66987# Have a temporary directory for convenience.  Make it in the build tree
66988# simply because there is no reason against having it here, and in addition,
66989# creating and moving files from /tmp can sometimes cause problems.
66990# Hook for its removal unless debugging.
66991# Note that there is a small window in which the directory will not be cleaned:
66992# after its creation but before its name has been assigned to `$tmp'.
66993$debug ||
66994{
66995  tmp= ac_tmp=
66996  trap 'exit_status=$?
66997  : "${ac_tmp:=$tmp}"
66998  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66999' 0
67000  trap 'as_fn_exit 1' 1 2 13 15
67001}
67002# Create a (secure) tmp directory for tmp files.
67003
67004{
67005  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67006  test -d "$tmp"
67007}  ||
67008{
67009  tmp=./conf$$-$RANDOM
67010  (umask 077 && mkdir "$tmp")
67011} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67012ac_tmp=$tmp
67013
67014# Set up the scripts for CONFIG_FILES section.
67015# No need to generate them if there are no CONFIG_FILES.
67016# This happens for instance with `./config.status config.h'.
67017if test -n "$CONFIG_FILES"; then
67018
67019
67020ac_cr=`echo X | tr X '\015'`
67021# On cygwin, bash can eat \r inside `` if the user requested igncr.
67022# But we know of no other shell where ac_cr would be empty at this
67023# point, so we can use a bashism as a fallback.
67024if test "x$ac_cr" = x; then
67025  eval ac_cr=\$\'\\r\'
67026fi
67027ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67028if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67029  ac_cs_awk_cr='\\r'
67030else
67031  ac_cs_awk_cr=$ac_cr
67032fi
67033
67034echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67035_ACEOF
67036
67037
67038{
67039  echo "cat >conf$$subs.awk <<_ACEOF" &&
67040  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67041  echo "_ACEOF"
67042} >conf$$subs.sh ||
67043  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67044ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67045ac_delim='%!_!# '
67046for ac_last_try in false false false false false :; do
67047  . ./conf$$subs.sh ||
67048    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67049
67050  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67051  if test $ac_delim_n = $ac_delim_num; then
67052    break
67053  elif $ac_last_try; then
67054    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67055  else
67056    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67057  fi
67058done
67059rm -f conf$$subs.sh
67060
67061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67062cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67063_ACEOF
67064sed -n '
67065h
67066s/^/S["/; s/!.*/"]=/
67067p
67068g
67069s/^[^!]*!//
67070:repl
67071t repl
67072s/'"$ac_delim"'$//
67073t delim
67074:nl
67075h
67076s/\(.\{148\}\)..*/\1/
67077t more1
67078s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67079p
67080n
67081b repl
67082:more1
67083s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67084p
67085g
67086s/.\{148\}//
67087t nl
67088:delim
67089h
67090s/\(.\{148\}\)..*/\1/
67091t more2
67092s/["\\]/\\&/g; s/^/"/; s/$/"/
67093p
67094b
67095:more2
67096s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67097p
67098g
67099s/.\{148\}//
67100t delim
67101' <conf$$subs.awk | sed '
67102/^[^""]/{
67103  N
67104  s/\n//
67105}
67106' >>$CONFIG_STATUS || ac_write_fail=1
67107rm -f conf$$subs.awk
67108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67109_ACAWK
67110cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67111  for (key in S) S_is_set[key] = 1
67112  FS = ""
67113
67114}
67115{
67116  line = $ 0
67117  nfields = split(line, field, "@")
67118  substed = 0
67119  len = length(field[1])
67120  for (i = 2; i < nfields; i++) {
67121    key = field[i]
67122    keylen = length(key)
67123    if (S_is_set[key]) {
67124      value = S[key]
67125      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67126      len += length(value) + length(field[++i])
67127      substed = 1
67128    } else
67129      len += 1 + keylen
67130  }
67131
67132  print line
67133}
67134
67135_ACAWK
67136_ACEOF
67137cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67138if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67139  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67140else
67141  cat
67142fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67143  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67144_ACEOF
67145
67146# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67147# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67148# trailing colons and then remove the whole line if VPATH becomes empty
67149# (actually we leave an empty line to preserve line numbers).
67150if test "x$srcdir" = x.; then
67151  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67152h
67153s///
67154s/^/:/
67155s/[	 ]*$/:/
67156s/:\$(srcdir):/:/g
67157s/:\${srcdir}:/:/g
67158s/:@srcdir@:/:/g
67159s/^:*//
67160s/:*$//
67161x
67162s/\(=[	 ]*\).*/\1/
67163G
67164s/\n//
67165s/^[^=]*=[	 ]*$//
67166}'
67167fi
67168
67169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67170fi # test -n "$CONFIG_FILES"
67171
67172
67173eval set X "  :F $CONFIG_FILES      "
67174shift
67175for ac_tag
67176do
67177  case $ac_tag in
67178  :[FHLC]) ac_mode=$ac_tag; continue;;
67179  esac
67180  case $ac_mode$ac_tag in
67181  :[FHL]*:*);;
67182  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67183  :[FH]-) ac_tag=-:-;;
67184  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67185  esac
67186  ac_save_IFS=$IFS
67187  IFS=:
67188  set x $ac_tag
67189  IFS=$ac_save_IFS
67190  shift
67191  ac_file=$1
67192  shift
67193
67194  case $ac_mode in
67195  :L) ac_source=$1;;
67196  :[FH])
67197    ac_file_inputs=
67198    for ac_f
67199    do
67200      case $ac_f in
67201      -) ac_f="$ac_tmp/stdin";;
67202      *) # Look for the file first in the build tree, then in the source tree
67203	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67204	 # because $ac_f cannot contain `:'.
67205	 test -f "$ac_f" ||
67206	   case $ac_f in
67207	   [\\/$]*) false;;
67208	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67209	   esac ||
67210	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67211      esac
67212      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67213      as_fn_append ac_file_inputs " '$ac_f'"
67214    done
67215
67216    # Let's still pretend it is `configure' which instantiates (i.e., don't
67217    # use $as_me), people would be surprised to read:
67218    #    /* config.h.  Generated by config.status.  */
67219    configure_input='Generated from '`
67220	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67221	`' by configure.'
67222    if test x"$ac_file" != x-; then
67223      configure_input="$ac_file.  $configure_input"
67224      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67225$as_echo "$as_me: creating $ac_file" >&6;}
67226    fi
67227    # Neutralize special characters interpreted by sed in replacement strings.
67228    case $configure_input in #(
67229    *\&* | *\|* | *\\* )
67230       ac_sed_conf_input=`$as_echo "$configure_input" |
67231       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67232    *) ac_sed_conf_input=$configure_input;;
67233    esac
67234
67235    case $ac_tag in
67236    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67237      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67238    esac
67239    ;;
67240  esac
67241
67242  ac_dir=`$as_dirname -- "$ac_file" ||
67243$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67244	 X"$ac_file" : 'X\(//\)[^/]' \| \
67245	 X"$ac_file" : 'X\(//\)$' \| \
67246	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67247$as_echo X"$ac_file" |
67248    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67249	    s//\1/
67250	    q
67251	  }
67252	  /^X\(\/\/\)[^/].*/{
67253	    s//\1/
67254	    q
67255	  }
67256	  /^X\(\/\/\)$/{
67257	    s//\1/
67258	    q
67259	  }
67260	  /^X\(\/\).*/{
67261	    s//\1/
67262	    q
67263	  }
67264	  s/.*/./; q'`
67265  as_dir="$ac_dir"; as_fn_mkdir_p
67266  ac_builddir=.
67267
67268case "$ac_dir" in
67269.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67270*)
67271  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67272  # A ".." for each directory in $ac_dir_suffix.
67273  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67274  case $ac_top_builddir_sub in
67275  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67276  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67277  esac ;;
67278esac
67279ac_abs_top_builddir=$ac_pwd
67280ac_abs_builddir=$ac_pwd$ac_dir_suffix
67281# for backward compatibility:
67282ac_top_builddir=$ac_top_build_prefix
67283
67284case $srcdir in
67285  .)  # We are building in place.
67286    ac_srcdir=.
67287    ac_top_srcdir=$ac_top_builddir_sub
67288    ac_abs_top_srcdir=$ac_pwd ;;
67289  [\\/]* | ?:[\\/]* )  # Absolute name.
67290    ac_srcdir=$srcdir$ac_dir_suffix;
67291    ac_top_srcdir=$srcdir
67292    ac_abs_top_srcdir=$srcdir ;;
67293  *) # Relative name.
67294    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67295    ac_top_srcdir=$ac_top_build_prefix$srcdir
67296    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67297esac
67298ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67299
67300
67301  case $ac_mode in
67302  :F)
67303  #
67304  # CONFIG_FILE
67305  #
67306
67307_ACEOF
67308
67309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67310# If the template does not know about datarootdir, expand it.
67311# FIXME: This hack should be removed a few years after 2.60.
67312ac_datarootdir_hack=; ac_datarootdir_seen=
67313ac_sed_dataroot='
67314/datarootdir/ {
67315  p
67316  q
67317}
67318/@datadir@/p
67319/@docdir@/p
67320/@infodir@/p
67321/@localedir@/p
67322/@mandir@/p'
67323case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67324*datarootdir*) ac_datarootdir_seen=yes;;
67325*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67326  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67327$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67328_ACEOF
67329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67330  ac_datarootdir_hack='
67331  s&@datadir@&$datadir&g
67332  s&@docdir@&$docdir&g
67333  s&@infodir@&$infodir&g
67334  s&@localedir@&$localedir&g
67335  s&@mandir@&$mandir&g
67336  s&\\\${datarootdir}&$datarootdir&g' ;;
67337esac
67338_ACEOF
67339
67340# Neutralize VPATH when `$srcdir' = `.'.
67341# Shell code in configure.ac might set extrasub.
67342# FIXME: do we really want to maintain this feature?
67343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67344ac_sed_extra="$ac_vpsub
67345$extrasub
67346_ACEOF
67347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67348:t
67349/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67350s|@configure_input@|$ac_sed_conf_input|;t t
67351s&@top_builddir@&$ac_top_builddir_sub&;t t
67352s&@top_build_prefix@&$ac_top_build_prefix&;t t
67353s&@srcdir@&$ac_srcdir&;t t
67354s&@abs_srcdir@&$ac_abs_srcdir&;t t
67355s&@top_srcdir@&$ac_top_srcdir&;t t
67356s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67357s&@builddir@&$ac_builddir&;t t
67358s&@abs_builddir@&$ac_abs_builddir&;t t
67359s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67360$ac_datarootdir_hack
67361"
67362eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67363  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67364
67365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67366  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67367  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67368      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67369  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67370which seems to be undefined.  Please make sure it is defined" >&5
67371$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67372which seems to be undefined.  Please make sure it is defined" >&2;}
67373
67374  rm -f "$ac_tmp/stdin"
67375  case $ac_file in
67376  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67377  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67378  esac \
67379  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67380 ;;
67381
67382
67383
67384  esac
67385
67386done # for ac_tag
67387
67388
67389as_fn_exit 0
67390_ACEOF
67391ac_clean_files=$ac_clean_files_save
67392
67393test $ac_write_fail = 0 ||
67394  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67395
67396
67397# configure is writing to config.log, and then calls config.status.
67398# config.status does its own redirection, appending to config.log.
67399# Unfortunately, on DOS this fails, as config.log is still kept open
67400# by configure, so config.status won't be able to write to it; its
67401# output is simply discarded.  So we exec the FD to /dev/null,
67402# effectively closing config.log, so it can be properly (re)opened and
67403# appended to by config.status.  When coming back to configure, we
67404# need to make the FD available again.
67405if test "$no_create" != yes; then
67406  ac_cs_success=:
67407  ac_config_status_args=
67408  test "$silent" = yes &&
67409    ac_config_status_args="$ac_config_status_args --quiet"
67410  exec 5>/dev/null
67411  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67412  exec 5>>config.log
67413  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67414  # would make configure fail if this is the last instruction.
67415  $ac_cs_success || as_fn_exit 1
67416fi
67417if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67418  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67419$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67420fi
67421
67422
67423# After AC_OUTPUT, we need to do final work
67424
67425
67426  # Try to move config.log (generated by autoconf) to the configure-support directory.
67427  if test -e ./config.log; then
67428    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67429  fi
67430
67431  # Rotate our log file (configure.log)
67432  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67433    $RM -f "$OUTPUT_ROOT/configure.log.old"
67434  fi
67435  if test -e "$OUTPUT_ROOT/configure.log"; then
67436    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67437  fi
67438
67439  # Move configure.log from current directory to the build output root
67440  if test -e ./configure.log; then
67441    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67442  fi
67443
67444  # Make the compare script executable
67445  $CHMOD +x $OUTPUT_ROOT/compare.sh
67446
67447
67448# Finally output some useful information to the user
67449
67450  # Finally output some useful information to the user
67451
67452  printf "\n"
67453  printf "====================================================\n"
67454  if test "x$no_create" != "xyes"; then
67455    if test "x$IS_RECONFIGURE" != "xyes"; then
67456      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67457    else
67458      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67459    fi
67460  else
67461    if test "x$IS_RECONFIGURE" != "xyes"; then
67462      printf "A configuration has been successfully checked but not created\n"
67463    else
67464      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67465    fi
67466  fi
67467  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67468    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67469  else
67470    printf "using default settings.\n"
67471  fi
67472
67473  printf "\n"
67474  printf "Configuration summary:\n"
67475  printf "* Debug level:    $DEBUG_LEVEL\n"
67476  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67477  printf "* JDK variant:    $JDK_VARIANT\n"
67478  printf "* JVM variants:   $JVM_VARIANTS\n"
67479  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67480  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67481
67482  printf "\n"
67483  printf "Tools summary:\n"
67484  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67485    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67486  fi
67487  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67488  if test "x$TOOLCHAIN_VERSION" != "x"; then
67489    print_version=" $TOOLCHAIN_VERSION"
67490  fi
67491  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67492  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67493  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67494
67495  printf "\n"
67496  printf "Build performance summary:\n"
67497  printf "* Cores to use:   $JOBS\n"
67498  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67499  if test "x$CCACHE_STATUS" != "x"; then
67500    printf "* ccache status:  $CCACHE_STATUS\n"
67501  fi
67502  printf "\n"
67503
67504  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67505    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67506    printf "will result in longer build times.\n"
67507    printf "\n"
67508  fi
67509
67510  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67511    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67512    printf "These are not respected, and will be ignored. It is recommended\n"
67513    printf "that you clean your environment. The following variables are set:\n"
67514    printf "$FOUND_ALT_VARIABLES\n"
67515    printf "\n"
67516  fi
67517
67518  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67519    printf "WARNING: Your build output directory is not on a local disk.\n"
67520    printf "This will severely degrade build performance!\n"
67521    printf "It is recommended that you create an output directory on a local disk,\n"
67522    printf "and run the configure script again from that directory.\n"
67523    printf "\n"
67524  fi
67525
67526  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67527    printf "WARNING: The result of this configuration has overridden an older\n"
67528    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67529    printf "proper build. Failure to do so might result in strange build problems.\n"
67530    printf "\n"
67531  fi
67532
67533  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67534    printf "WARNING: The result of this configuration was not saved.\n"
67535    printf "You should run without '--no-create | -n' to create the configuration.\n"
67536    printf "\n"
67537  fi
67538
67539
67540
67541  # Locate config.log.
67542  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67543    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67544  elif test -e "./config.log"; then
67545    CONFIG_LOG_PATH="."
67546  fi
67547
67548  if test -e "$CONFIG_LOG_PATH/config.log"; then
67549    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67550    if test $? -eq 0; then
67551      printf "The following warnings were produced. Repeated here for convenience:\n"
67552      # We must quote sed expression (using []) to stop m4 from eating the [].
67553      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67554      printf "\n"
67555    fi
67556  fi
67557
67558