generated-configure.sh revision 1354:8b84d584d52b
1162413Ssam#!/bin/bash
2178354Ssam#
3162413Ssam# ##########################################################
4162413Ssam# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5162413Ssam# ##########################################################
6162413Ssam#
7162413Ssam#! /bin/sh
8162413Ssam# Guess values for system-dependent variables and create Makefiles.
9162413Ssam# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10162413Ssam#
11162413Ssam# Report bugs to <build-dev@openjdk.java.net>.
12162413Ssam#
13162413Ssam#
14162413Ssam# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15162413Ssam#
16162413Ssam#
17162413Ssam# This configure script is free software; the Free Software Foundation
18162413Ssam# gives unlimited permission to copy, distribute and modify it.
19162413Ssam## -------------------- ##
20162413Ssam## M4sh Initialization. ##
21162413Ssam## -------------------- ##
22162413Ssam
23162413Ssam# Be more Bourne compatible
24162413SsamDUALCASE=1; export DUALCASE # for MKS sh
25162413Ssamif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26162413Ssam  emulate sh
27162413Ssam  NULLCMD=:
28162413Ssam  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29162413Ssam  # is contrary to our usage.  Disable this feature.
30162413Ssam  alias -g '${1+"$@"}'='"$@"'
31162413Ssam  setopt NO_GLOB_SUBST
32162413Ssamelse
33162413Ssam  case `(set -o) 2>/dev/null` in #(
34162413Ssam  *posix*) :
35162413Ssam    set -o posix ;; #(
36162413Ssam  *) :
37162413Ssam     ;;
38162413Ssamesac
39162413Ssamfi
40162413Ssam
41162413Ssam
42162413Ssamas_nl='
43162413Ssam'
44162413Ssamexport as_nl
45162413Ssam# Printing a long string crashes Solaris 7 /usr/bin/printf.
46185522Ssamas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47162413Ssamas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48162413Ssamas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49162413Ssam# Prefer a ksh shell builtin over an external printf program on Solaris,
50162413Ssam# but without wasting forks for bash or zsh.
51162413Ssamif test -z "$BASH_VERSION$ZSH_VERSION" \
52162413Ssam    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53162413Ssam  as_echo='print -r --'
54162413Ssam  as_echo_n='print -rn --'
55162413Ssamelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56162413Ssam  as_echo='printf %s\n'
57162413Ssam  as_echo_n='printf %s'
58162413Ssamelse
59185522Ssam  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60162413Ssam    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61162413Ssam    as_echo_n='/usr/ucb/echo -n'
62162413Ssam  else
63162413Ssam    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64162413Ssam    as_echo_n_body='eval
65162413Ssam      arg=$1;
66162413Ssam      case $arg in #(
67162413Ssam      *"$as_nl"*)
68162413Ssam	expr "X$arg" : "X\\(.*\\)$as_nl";
69162413Ssam	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70162413Ssam      esac;
71162413Ssam      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72162413Ssam    '
73162413Ssam    export as_echo_n_body
74184369Ssam    as_echo_n='sh -c $as_echo_n_body as_echo'
75162413Ssam  fi
76162413Ssam  export as_echo_body
77162413Ssam  as_echo='sh -c $as_echo_body as_echo'
78162413Ssamfi
79162413Ssam
80162413Ssam# The user is always right.
81162413Ssamif test "${PATH_SEPARATOR+set}" != set; then
82162413Ssam  PATH_SEPARATOR=:
83162413Ssam  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84162413Ssam    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85162413Ssam      PATH_SEPARATOR=';'
86162413Ssam  }
87162413Ssamfi
88162413Ssam
89162413Ssam
90162413Ssam# IFS
91162413Ssam# We need space, tab and new line, in precisely that order.  Quoting is
92162413Ssam# there to prevent editors from complaining about space-tab.
93162413Ssam# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94162413Ssam# splitting by setting IFS to empty value.)
95162413SsamIFS=" ""	$as_nl"
96162413Ssam
97162413Ssam# Find who we are.  Look in the path if we contain no directory separator.
98162413Ssamas_myself=
99162413Ssamcase $0 in #((
100162413Ssam  *[\\/]* ) as_myself=$0 ;;
101162413Ssam  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102162413Ssamfor as_dir in $PATH
103162413Ssamdo
104162413Ssam  IFS=$as_save_IFS
105162413Ssam  test -z "$as_dir" && as_dir=.
106162413Ssam    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107162413Ssam  done
108162413SsamIFS=$as_save_IFS
109162413Ssam
110162413Ssam     ;;
111162413Ssamesac
112162413Ssam# We did not find ourselves, most probably we were run as `sh COMMAND'
113196935Ssam# in which case we are not to be found in the path.
114162413Ssamif test "x$as_myself" = x; then
115162413Ssam  as_myself=$0
116162413Ssamfi
117162413Ssamif test ! -f "$as_myself"; then
118162413Ssam  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119162413Ssam  exit 1
120162413Ssamfi
121162413Ssam
122162413Ssam# Unset variables that we do not need and which cause bugs (e.g. in
123162413Ssam# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124162413Ssam# suppresses any "Segmentation fault" message there.  '((' could
125162413Ssam# trigger a bug in pdksh 5.2.14.
126162413Ssamfor as_var in BASH_ENV ENV MAIL MAILPATH
127162413Ssamdo eval test x\${$as_var+set} = xset \
128162413Ssam  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129162413Ssamdone
130162413SsamPS1='$ '
131162413SsamPS2='> '
132162413SsamPS4='+ '
133162413Ssam
134162413Ssam# NLS nuisances.
135162413SsamLC_ALL=C
136162413Ssamexport LC_ALL
137162413SsamLANGUAGE=C
138162413Ssamexport LANGUAGE
139184369Ssam
140184369Ssam# CDPATH.
141184369Ssam(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142184369Ssam
143184369Ssam# Use a proper internal environment variable to ensure we don't fall
144184369Ssam  # into an infinite loop, continuously re-executing ourselves.
145184369Ssam  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146184369Ssam    _as_can_reexec=no; export _as_can_reexec;
147184369Ssam    # We cannot yet assume a decent shell, so we have to provide a
148162413Ssam# neutralization value for shells without unset; and this also
149162413Ssam# works around shells that cannot unset nonexistent variables.
150162413Ssam# Preserve -v and -x to the replacement shell.
151162413SsamBASH_ENV=/dev/null
152162413SsamENV=/dev/null
153162413Ssam(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154162413Ssamcase $- in # ((((
155162413Ssam  *v*x* | *x*v* ) as_opts=-vx ;;
156162413Ssam  *v* ) as_opts=-v ;;
157162413Ssam  *x* ) as_opts=-x ;;
158162413Ssam  * ) as_opts= ;;
159162413Ssamesac
160162413Ssamexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161162413Ssam# Admittedly, this is quite paranoid, since all the known shells bail
162162413Ssam# out after a failed `exec'.
163162413Ssam$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164162413Ssamas_fn_exit 255
165162413Ssam  fi
166185522Ssam  # We don't want this to propagate to other subprocesses.
167162413Ssam          { _as_can_reexec=; unset _as_can_reexec;}
168162413Ssamif test "x$CONFIG_SHELL" = x; then
169162413Ssam  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170162413Ssam  emulate sh
171162413Ssam  NULLCMD=:
172162413Ssam  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173162413Ssam  # is contrary to our usage.  Disable this feature.
174162413Ssam  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175162413Ssam  setopt NO_GLOB_SUBST
176162413Ssamelse
177162413Ssam  case \`(set -o) 2>/dev/null\` in #(
178162413Ssam  *posix*) :
179162413Ssam    set -o posix ;; #(
180168589Srwatson  *) :
181168589Srwatson     ;;
182168589Srwatsonesac
183168589Srwatsonfi
184168589Srwatson"
185168589Srwatson  as_required="as_fn_return () { (exit \$1); }
186168589Srwatsonas_fn_success () { as_fn_return 0; }
187162413Ssamas_fn_failure () { as_fn_return 1; }
188162413Ssamas_fn_ret_success () { return 0; }
189162413Ssamas_fn_ret_failure () { return 1; }
190162413Ssam
191162413Ssamexitcode=0
192162413Ssamas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193162413Ssamas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194162413Ssamas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195162413Ssamas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196162413Ssamif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197162413Ssam
198162413Ssamelse
199162413Ssam  exitcode=1; echo positional parameters were not saved.
200162413Ssamfi
201162413Ssamtest x\$exitcode = x0 || exit 1
202162413Ssamtest -x / || exit 1"
203162413Ssam  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204162413Ssam  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205162413Ssam  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206162413Ssam  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207162413Ssamtest \$(( 1 + 1 )) = 2 || exit 1"
208162413Ssam  if (eval "$as_required") 2>/dev/null; then :
209162413Ssam  as_have_required=yes
210162413Ssamelse
211162413Ssam  as_have_required=no
212162413Ssamfi
213162413Ssam  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214162413Ssam
215162413Ssamelse
216162413Ssam  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217162413Ssamas_found=false
218162413Ssamfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219162413Ssamdo
220162413Ssam  IFS=$as_save_IFS
221162413Ssam  test -z "$as_dir" && as_dir=.
222162413Ssam  as_found=:
223162413Ssam  case $as_dir in #(
224162413Ssam	 /*)
225162413Ssam	   for as_base in sh bash ksh sh5; do
226162413Ssam	     # Try only shells that exist, to save several forks.
227162413Ssam	     as_shell=$as_dir/$as_base
228162413Ssam	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229162413Ssam		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230162413Ssam  CONFIG_SHELL=$as_shell as_have_required=yes
231162413Ssam		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232162413Ssam  break 2
233162413Ssamfi
234162413Ssamfi
235162413Ssam	   done;;
236162413Ssam       esac
237162413Ssam  as_found=false
238162413Ssamdone
239162413Ssam$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240162413Ssam	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241162413Ssam  CONFIG_SHELL=$SHELL as_have_required=yes
242162413Ssamfi; }
243162413SsamIFS=$as_save_IFS
244185522Ssam
245162413Ssam
246162413Ssam      if test "x$CONFIG_SHELL" != x; then :
247162413Ssam  export CONFIG_SHELL
248162413Ssam             # We cannot yet assume a decent shell, so we have to provide a
249162413Ssam# neutralization value for shells without unset; and this also
250162413Ssam# works around shells that cannot unset nonexistent variables.
251162413Ssam# Preserve -v and -x to the replacement shell.
252162413SsamBASH_ENV=/dev/null
253162413SsamENV=/dev/null
254162413Ssam(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255162413Ssamcase $- in # ((((
256162413Ssam  *v*x* | *x*v* ) as_opts=-vx ;;
257195418Ssam  *v* ) as_opts=-v ;;
258162413Ssam  *x* ) as_opts=-x ;;
259162413Ssam  * ) as_opts= ;;
260162413Ssamesac
261162413Ssamexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262162413Ssam# Admittedly, this is quite paranoid, since all the known shells bail
263162413Ssam# out after a failed `exec'.
264162413Ssam$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265162413Ssamexit 255
266162413Ssamfi
267162413Ssam
268185522Ssam    if test x$as_have_required = xno; then :
269162413Ssam  $as_echo "$0: This script requires a shell more modern than all"
270162413Ssam  $as_echo "$0: the shells that I found on your system."
271162413Ssam  if test x${ZSH_VERSION+set} = xset ; then
272195418Ssam    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273162413Ssam    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274162413Ssam  else
275162413Ssam    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276162413Ssam$0: build-dev@openjdk.java.net about your system, including
277162413Ssam$0: any error possibly output before this message. Then
278162413Ssam$0: install a modern shell, or manually run the script
279162413Ssam$0: under such a shell if you do have one."
280162413Ssam  fi
281162413Ssam  exit 1
282162413Ssamfi
283162413Ssamfi
284162413Ssamfi
285162413SsamSHELL=${CONFIG_SHELL-/bin/sh}
286162413Ssamexport SHELL
287162413Ssam# Unset more variables known to interfere with behavior of common tools.
288162413SsamCLICOLOR_FORCE= GREP_OPTIONS=
289162413Ssamunset CLICOLOR_FORCE GREP_OPTIONS
290162413Ssam
291162413Ssam## --------------------- ##
292162413Ssam## M4sh Shell Functions. ##
293162413Ssam## --------------------- ##
294162413Ssam# as_fn_unset VAR
295162413Ssam# ---------------
296162413Ssam# Portably unset VAR.
297162413Ssamas_fn_unset ()
298162413Ssam{
299162413Ssam  { eval $1=; unset $1;}
300162413Ssam}
301162413Ssamas_unset=as_fn_unset
302162413Ssam
303162413Ssam# as_fn_set_status STATUS
304162413Ssam# -----------------------
305162413Ssam# Set $? to STATUS, without forking.
306162413Ssamas_fn_set_status ()
307162413Ssam{
308162413Ssam  return $1
309162413Ssam} # as_fn_set_status
310162413Ssam
311162413Ssam# as_fn_exit STATUS
312162413Ssam# -----------------
313162413Ssam# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314162413Ssamas_fn_exit ()
315162413Ssam{
316162413Ssam  set +e
317162413Ssam  as_fn_set_status $1
318162413Ssam  exit $1
319162413Ssam} # as_fn_exit
320185522Ssam
321162413Ssam# as_fn_mkdir_p
322162413Ssam# -------------
323195418Ssam# Create "$as_dir" as a directory, including parents if necessary.
324162413Ssamas_fn_mkdir_p ()
325162413Ssam{
326162413Ssam
327162413Ssam  case $as_dir in #(
328162413Ssam  -*) as_dir=./$as_dir;;
329162413Ssam  esac
330162413Ssam  test -d "$as_dir" || eval $as_mkdir_p || {
331162413Ssam    as_dirs=
332162413Ssam    while :; do
333162413Ssam      case $as_dir in #(
334185522Ssam      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335162413Ssam      *) as_qdir=$as_dir;;
336162413Ssam      esac
337162413Ssam      as_dirs="'$as_qdir' $as_dirs"
338195418Ssam      as_dir=`$as_dirname -- "$as_dir" ||
339162413Ssam$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340162413Ssam	 X"$as_dir" : 'X\(//\)[^/]' \| \
341162413Ssam	 X"$as_dir" : 'X\(//\)$' \| \
342162413Ssam	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343162413Ssam$as_echo X"$as_dir" |
344162413Ssam    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345162413Ssam	    s//\1/
346162413Ssam	    q
347162413Ssam	  }
348162413Ssam	  /^X\(\/\/\)[^/].*/{
349162413Ssam	    s//\1/
350162413Ssam	    q
351162413Ssam	  }
352162413Ssam	  /^X\(\/\/\)$/{
353162413Ssam	    s//\1/
354162413Ssam	    q
355162413Ssam	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCR_DLL
649LIBCXX
650LLVM_LIBS
651LLVM_LDFLAGS
652LLVM_CFLAGS
653LLVM_CONFIG
654LIBFFI_LIBS
655LIBFFI_CFLAGS
656STATIC_CXX_SETTING
657LIBDL
658LIBM
659LIBZIP_CAN_USE_MMAP
660USE_EXTERNAL_LIBZ
661USE_EXTERNAL_LIBPNG
662PNG_LIBS
663PNG_CFLAGS
664USE_EXTERNAL_LCMS
665LCMS_LIBS
666LCMS_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669ALSA_LIBS
670ALSA_CFLAGS
671FREETYPE_BUNDLE_LIB_PATH
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674CUPS_CFLAGS
675X_EXTRA_LIBS
676X_LIBS
677X_PRE_LIBS
678X_CFLAGS
679XMKMF
680FIXPATH
681ZIP_DEBUGINFO_FILES
682ENABLE_DEBUG_SYMBOLS
683CFLAGS_WARNINGS_ARE_ERRORS
684COMPILER_SUPPORTS_TARGET_BITS_FLAG
685ZERO_ARCHFLAG
686LDFLAGS_CXX_JDK
687LDFLAGS_JDKEXE_SUFFIX
688LDFLAGS_JDKLIB_SUFFIX
689LDFLAGS_JDKEXE
690LDFLAGS_JDKLIB
691CXXFLAGS_JDKEXE
692CXXFLAGS_JDKLIB
693CFLAGS_JDKEXE
694CFLAGS_JDKLIB
695MACOSX_VERSION_MIN
696LEGACY_EXTRA_LDFLAGS
697LEGACY_EXTRA_CXXFLAGS
698LEGACY_EXTRA_CFLAGS
699CXX_O_FLAG_NONE
700CXX_O_FLAG_DEBUG
701CXX_O_FLAG_NORM
702CXX_O_FLAG_HI
703CXX_O_FLAG_HIGHEST
704C_O_FLAG_NONE
705C_O_FLAG_DEBUG
706C_O_FLAG_NORM
707C_O_FLAG_HI
708C_O_FLAG_HIGHEST
709CXXFLAGS_DEBUG_OPTIONS
710CFLAGS_DEBUG_OPTIONS
711CXXFLAGS_DEBUG_SYMBOLS
712CFLAGS_DEBUG_SYMBOLS
713CXX_FLAG_DEPS
714C_FLAG_DEPS
715SET_SHARED_LIBRARY_MAPFILE
716SET_SHARED_LIBRARY_NAME
717SET_SHARED_LIBRARY_ORIGIN
718SET_EXECUTABLE_ORIGIN
719SHARED_LIBRARY_FLAGS
720CXX_FLAG_REORDER
721C_FLAG_REORDER
722SYSROOT_LDFLAGS
723SYSROOT_CFLAGS
724RC_FLAGS
725AR_OUT_OPTION
726LD_OUT_OPTION
727EXE_OUT_OPTION
728CC_OUT_OPTION
729POST_MCS_CMD
730POST_STRIP_CMD
731ARFLAGS
732COMPILER_TARGET_BITS_FLAG
733JT_HOME
734JTREGEXE
735USING_BROKEN_SUSE_LD
736PACKAGE_PATH
737LDEXECXX
738LDEXE
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747ac_ct_OBJDUMP
748OBJDUMP
749ac_ct_OBJCOPY
750OBJCOPY
751ac_ct_NM
752ac_ct_STRIP
753MCS
754GNM
755NM
756STRIP
757MSBUILD
758DUMPBIN
759RC
760MT
761LIPO
762ac_ct_OBJC
763OBJCFLAGS
764OBJC
765ac_ct_AR
766AR
767AS
768LDCXX
769LD
770CXXCPP
771CPP
772ac_ct_CXX
773CXXFLAGS
774CXX
775ac_ct_PROPER_COMPILER_CXX
776PROPER_COMPILER_CXX
777TOOLCHAIN_PATH_CXX
778POTENTIAL_CXX
779OBJEXT
780EXEEXT
781ac_ct_CC
782CPPFLAGS
783LDFLAGS
784CFLAGS
785CC
786ac_ct_PROPER_COMPILER_CC
787PROPER_COMPILER_CC
788TOOLCHAIN_PATH_CC
789POTENTIAL_CC
790VS_LIB
791VS_INCLUDE
792VS_PATH
793CYGWIN_LINK
794EXE_SUFFIX
795OBJ_SUFFIX
796STATIC_LIBRARY
797SHARED_LIBRARY
798STATIC_LIBRARY_SUFFIX
799SHARED_LIBRARY_SUFFIX
800LIBRARY_PREFIX
801TOOLCHAIN_TYPE
802BUILD_HOTSPOT
803HOTSPOT_DIST
804BUILD_OUTPUT
805OVERRIDE_SRC_ROOT
806ADD_SRC_ROOT
807JDK_TOPDIR
808NASHORN_TOPDIR
809HOTSPOT_TOPDIR
810JAXWS_TOPDIR
811JAXP_TOPDIR
812CORBA_TOPDIR
813LANGTOOLS_TOPDIR
814JAVAC_FLAGS
815BOOT_JDK_SOURCETARGET
816JARSIGNER
817NATIVE2ASCII
818JAR
819JAVAH
820JAVAC
821JAVA
822BOOT_JDK
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_CPU_JLI_CFLAGS
910OPENJDK_TARGET_CPU_OSARCH
911OPENJDK_TARGET_CPU_ISADIR
912OPENJDK_TARGET_CPU_LIBDIR
913OPENJDK_TARGET_CPU_LEGACY_LIB
914OPENJDK_TARGET_CPU_LEGACY
915REQUIRED_OS_VERSION
916REQUIRED_OS_NAME
917COMPILE_TYPE
918OPENJDK_TARGET_CPU_ENDIAN
919OPENJDK_TARGET_CPU_BITS
920OPENJDK_TARGET_CPU_ARCH
921OPENJDK_TARGET_CPU
922OPENJDK_TARGET_OS_ENV
923OPENJDK_TARGET_OS_TYPE
924OPENJDK_TARGET_OS
925OPENJDK_BUILD_CPU_ENDIAN
926OPENJDK_BUILD_CPU_BITS
927OPENJDK_BUILD_CPU_ARCH
928OPENJDK_BUILD_CPU
929OPENJDK_BUILD_OS_ENV
930OPENJDK_BUILD_OS_TYPE
931OPENJDK_BUILD_OS
932OPENJDK_BUILD_AUTOCONF_NAME
933OPENJDK_TARGET_AUTOCONF_NAME
934target_os
935target_vendor
936target_cpu
937target
938host_os
939host_vendor
940host_cpu
941host
942build_os
943build_vendor
944build_cpu
945build
946CPIO
947SETFILE
948DF
949READLINK
950CYGPATH
951SED
952FGREP
953EGREP
954GREP
955AWK
956XARGS
957WHICH
958WC
959UNIQ
960UNAME
961TR
962TOUCH
963TEE
964TAR
965TAIL
966SORT
967SH
968RM
969PRINTF
970NAWK
971MV
972MKTEMP
973MKDIR
974LS
975LN
976HEAD
977FIND
978FILE
979EXPR
980ECHO
981DIRNAME
982DIFF
983DATE
984CUT
985CP
986COMM
987CMP
988CHMOD
989CAT
990BASH
991BASENAME
992DATE_WHEN_CONFIGURED
993CONFIGURE_COMMAND_LINE
994target_alias
995host_alias
996build_alias
997LIBS
998ECHO_T
999ECHO_N
1000ECHO_C
1001DEFS
1002mandir
1003localedir
1004libdir
1005psdir
1006pdfdir
1007dvidir
1008htmldir
1009infodir
1010docdir
1011oldincludedir
1012includedir
1013localstatedir
1014sharedstatedir
1015sysconfdir
1016datadir
1017datarootdir
1018libexecdir
1019sbindir
1020bindir
1021program_transform_name
1022prefix
1023exec_prefix
1024PACKAGE_URL
1025PACKAGE_BUGREPORT
1026PACKAGE_STRING
1027PACKAGE_VERSION
1028PACKAGE_TARNAME
1029PACKAGE_NAME
1030PATH_SEPARATOR
1031SHELL'
1032ac_subst_files=''
1033ac_user_opts='
1034enable_option_checking
1035with_target_bits
1036enable_openjdk_only
1037with_custom_make_dir
1038with_jdk_variant
1039with_jvm_interpreter
1040with_jvm_variants
1041enable_debug
1042with_debug_level
1043with_devkit
1044with_sys_root
1045with_sysroot
1046with_tools_dir
1047with_toolchain_path
1048with_extra_path
1049with_sdk_name
1050with_conf_name
1051with_output_sync
1052with_builddeps_conf
1053with_builddeps_server
1054with_builddeps_dir
1055with_builddeps_group
1056enable_headful
1057enable_hotspot_test_in_build
1058with_cacerts_file
1059enable_unlimited_crypto
1060enable_rmiconnector_iiop
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_jtreg
1080with_extra_cflags
1081with_extra_cxxflags
1082with_extra_ldflags
1083enable_debug_symbols
1084enable_zip_debug_info
1085with_x
1086with_cups
1087with_cups_include
1088with_freetype
1089with_freetype_include
1090with_freetype_lib
1091with_freetype_src
1092enable_freetype_bundling
1093with_alsa
1094with_alsa_include
1095with_alsa_lib
1096with_libjpeg
1097with_giflib
1098with_lcms
1099with_libpng
1100with_zlib
1101with_stdc__lib
1102with_msvcr_dll
1103with_dxsdk
1104with_dxsdk_lib
1105with_dxsdk_include
1106with_num_cores
1107with_memory_size
1108with_jobs
1109with_boot_jdk_jvmargs
1110with_sjavac_server_java
1111enable_sjavac
1112enable_precompiled_headers
1113enable_ccache
1114with_ccache_dir
1115'
1116      ac_precious_vars='build_alias
1117host_alias
1118target_alias
1119BASENAME
1120BASH
1121CAT
1122CHMOD
1123CMP
1124COMM
1125CP
1126CUT
1127DATE
1128DIFF
1129DIRNAME
1130ECHO
1131EXPR
1132FILE
1133FIND
1134HEAD
1135LN
1136LS
1137MKDIR
1138MKTEMP
1139MV
1140NAWK
1141PRINTF
1142RM
1143SH
1144SORT
1145TAIL
1146TAR
1147TEE
1148TOUCH
1149TR
1150UNAME
1151UNIQ
1152WC
1153WHICH
1154XARGS
1155AWK
1156GREP
1157EGREP
1158FGREP
1159SED
1160CYGPATH
1161READLINK
1162DF
1163SETFILE
1164CPIO
1165UNZIP
1166ZIP
1167LDD
1168OTOOL
1169READELF
1170HG
1171STAT
1172TIME
1173DSYMUTIL
1174XATTR
1175CODESIGN
1176PKG_CONFIG
1177JAVA
1178JAVAC
1179JAVAH
1180JAR
1181NATIVE2ASCII
1182JARSIGNER
1183CC
1184CFLAGS
1185LDFLAGS
1186LIBS
1187CPPFLAGS
1188CXX
1189CXXFLAGS
1190CCC
1191CPP
1192CXXCPP
1193AS
1194AR
1195OBJC
1196OBJCFLAGS
1197LIPO
1198STRIP
1199NM
1200GNM
1201MCS
1202OBJCOPY
1203OBJDUMP
1204BUILD_CC
1205BUILD_CXX
1206BUILD_LD
1207JTREGEXE
1208XMKMF
1209FREETYPE_CFLAGS
1210FREETYPE_LIBS
1211ALSA_CFLAGS
1212ALSA_LIBS
1213LCMS_CFLAGS
1214LCMS_LIBS
1215PNG_CFLAGS
1216PNG_LIBS
1217LIBFFI_CFLAGS
1218LIBFFI_LIBS
1219CCACHE'
1220
1221
1222# Initialize some variables set by options.
1223ac_init_help=
1224ac_init_version=false
1225ac_unrecognized_opts=
1226ac_unrecognized_sep=
1227# The variables have the same names as the options, with
1228# dashes changed to underlines.
1229cache_file=/dev/null
1230exec_prefix=NONE
1231no_create=
1232no_recursion=
1233prefix=NONE
1234program_prefix=NONE
1235program_suffix=NONE
1236program_transform_name=s,x,x,
1237silent=
1238site=
1239srcdir=
1240verbose=
1241x_includes=NONE
1242x_libraries=NONE
1243
1244# Installation directory options.
1245# These are left unexpanded so users can "make install exec_prefix=/foo"
1246# and all the variables that are supposed to be based on exec_prefix
1247# by default will actually change.
1248# Use braces instead of parens because sh, perl, etc. also accept them.
1249# (The list follows the same order as the GNU Coding Standards.)
1250bindir='${exec_prefix}/bin'
1251sbindir='${exec_prefix}/sbin'
1252libexecdir='${exec_prefix}/libexec'
1253datarootdir='${prefix}/share'
1254datadir='${datarootdir}'
1255sysconfdir='${prefix}/etc'
1256sharedstatedir='${prefix}/com'
1257localstatedir='${prefix}/var'
1258includedir='${prefix}/include'
1259oldincludedir='/usr/include'
1260docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1261infodir='${datarootdir}/info'
1262htmldir='${docdir}'
1263dvidir='${docdir}'
1264pdfdir='${docdir}'
1265psdir='${docdir}'
1266libdir='${exec_prefix}/lib'
1267localedir='${datarootdir}/locale'
1268mandir='${datarootdir}/man'
1269
1270ac_prev=
1271ac_dashdash=
1272for ac_option
1273do
1274  # If the previous option needs an argument, assign it.
1275  if test -n "$ac_prev"; then
1276    eval $ac_prev=\$ac_option
1277    ac_prev=
1278    continue
1279  fi
1280
1281  case $ac_option in
1282  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1283  *=)   ac_optarg= ;;
1284  *)    ac_optarg=yes ;;
1285  esac
1286
1287  # Accept the important Cygnus configure options, so we can diagnose typos.
1288
1289  case $ac_dashdash$ac_option in
1290  --)
1291    ac_dashdash=yes ;;
1292
1293  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1294    ac_prev=bindir ;;
1295  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1296    bindir=$ac_optarg ;;
1297
1298  -build | --build | --buil | --bui | --bu)
1299    ac_prev=build_alias ;;
1300  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1301    build_alias=$ac_optarg ;;
1302
1303  -cache-file | --cache-file | --cache-fil | --cache-fi \
1304  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1305    ac_prev=cache_file ;;
1306  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1307  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1308    cache_file=$ac_optarg ;;
1309
1310  --config-cache | -C)
1311    cache_file=config.cache ;;
1312
1313  -datadir | --datadir | --datadi | --datad)
1314    ac_prev=datadir ;;
1315  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1316    datadir=$ac_optarg ;;
1317
1318  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1319  | --dataroo | --dataro | --datar)
1320    ac_prev=datarootdir ;;
1321  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1322  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1323    datarootdir=$ac_optarg ;;
1324
1325  -disable-* | --disable-*)
1326    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1327    # Reject names that are not valid shell variable names.
1328    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329      as_fn_error $? "invalid feature name: $ac_useropt"
1330    ac_useropt_orig=$ac_useropt
1331    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1332    case $ac_user_opts in
1333      *"
1334"enable_$ac_useropt"
1335"*) ;;
1336      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1337	 ac_unrecognized_sep=', ';;
1338    esac
1339    eval enable_$ac_useropt=no ;;
1340
1341  -docdir | --docdir | --docdi | --doc | --do)
1342    ac_prev=docdir ;;
1343  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1344    docdir=$ac_optarg ;;
1345
1346  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1347    ac_prev=dvidir ;;
1348  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1349    dvidir=$ac_optarg ;;
1350
1351  -enable-* | --enable-*)
1352    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1353    # Reject names that are not valid shell variable names.
1354    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1355      as_fn_error $? "invalid feature name: $ac_useropt"
1356    ac_useropt_orig=$ac_useropt
1357    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1358    case $ac_user_opts in
1359      *"
1360"enable_$ac_useropt"
1361"*) ;;
1362      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1363	 ac_unrecognized_sep=', ';;
1364    esac
1365    eval enable_$ac_useropt=\$ac_optarg ;;
1366
1367  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1368  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1369  | --exec | --exe | --ex)
1370    ac_prev=exec_prefix ;;
1371  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1372  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1373  | --exec=* | --exe=* | --ex=*)
1374    exec_prefix=$ac_optarg ;;
1375
1376  -gas | --gas | --ga | --g)
1377    # Obsolete; use --with-gas.
1378    with_gas=yes ;;
1379
1380  -help | --help | --hel | --he | -h)
1381    ac_init_help=long ;;
1382  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1383    ac_init_help=recursive ;;
1384  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1385    ac_init_help=short ;;
1386
1387  -host | --host | --hos | --ho)
1388    ac_prev=host_alias ;;
1389  -host=* | --host=* | --hos=* | --ho=*)
1390    host_alias=$ac_optarg ;;
1391
1392  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1393    ac_prev=htmldir ;;
1394  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1395  | --ht=*)
1396    htmldir=$ac_optarg ;;
1397
1398  -includedir | --includedir | --includedi | --included | --include \
1399  | --includ | --inclu | --incl | --inc)
1400    ac_prev=includedir ;;
1401  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1402  | --includ=* | --inclu=* | --incl=* | --inc=*)
1403    includedir=$ac_optarg ;;
1404
1405  -infodir | --infodir | --infodi | --infod | --info | --inf)
1406    ac_prev=infodir ;;
1407  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1408    infodir=$ac_optarg ;;
1409
1410  -libdir | --libdir | --libdi | --libd)
1411    ac_prev=libdir ;;
1412  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1413    libdir=$ac_optarg ;;
1414
1415  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1416  | --libexe | --libex | --libe)
1417    ac_prev=libexecdir ;;
1418  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1419  | --libexe=* | --libex=* | --libe=*)
1420    libexecdir=$ac_optarg ;;
1421
1422  -localedir | --localedir | --localedi | --localed | --locale)
1423    ac_prev=localedir ;;
1424  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1425    localedir=$ac_optarg ;;
1426
1427  -localstatedir | --localstatedir | --localstatedi | --localstated \
1428  | --localstate | --localstat | --localsta | --localst | --locals)
1429    ac_prev=localstatedir ;;
1430  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1431  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1432    localstatedir=$ac_optarg ;;
1433
1434  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1435    ac_prev=mandir ;;
1436  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1437    mandir=$ac_optarg ;;
1438
1439  -nfp | --nfp | --nf)
1440    # Obsolete; use --without-fp.
1441    with_fp=no ;;
1442
1443  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1444  | --no-cr | --no-c | -n)
1445    no_create=yes ;;
1446
1447  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1448  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1449    no_recursion=yes ;;
1450
1451  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1452  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1453  | --oldin | --oldi | --old | --ol | --o)
1454    ac_prev=oldincludedir ;;
1455  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1456  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1457  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1458    oldincludedir=$ac_optarg ;;
1459
1460  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1461    ac_prev=prefix ;;
1462  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1463    prefix=$ac_optarg ;;
1464
1465  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1466  | --program-pre | --program-pr | --program-p)
1467    ac_prev=program_prefix ;;
1468  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1469  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1470    program_prefix=$ac_optarg ;;
1471
1472  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1473  | --program-suf | --program-su | --program-s)
1474    ac_prev=program_suffix ;;
1475  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1476  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1477    program_suffix=$ac_optarg ;;
1478
1479  -program-transform-name | --program-transform-name \
1480  | --program-transform-nam | --program-transform-na \
1481  | --program-transform-n | --program-transform- \
1482  | --program-transform | --program-transfor \
1483  | --program-transfo | --program-transf \
1484  | --program-trans | --program-tran \
1485  | --progr-tra | --program-tr | --program-t)
1486    ac_prev=program_transform_name ;;
1487  -program-transform-name=* | --program-transform-name=* \
1488  | --program-transform-nam=* | --program-transform-na=* \
1489  | --program-transform-n=* | --program-transform-=* \
1490  | --program-transform=* | --program-transfor=* \
1491  | --program-transfo=* | --program-transf=* \
1492  | --program-trans=* | --program-tran=* \
1493  | --progr-tra=* | --program-tr=* | --program-t=*)
1494    program_transform_name=$ac_optarg ;;
1495
1496  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1497    ac_prev=pdfdir ;;
1498  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1499    pdfdir=$ac_optarg ;;
1500
1501  -psdir | --psdir | --psdi | --psd | --ps)
1502    ac_prev=psdir ;;
1503  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1504    psdir=$ac_optarg ;;
1505
1506  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507  | -silent | --silent | --silen | --sile | --sil)
1508    silent=yes ;;
1509
1510  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1511    ac_prev=sbindir ;;
1512  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1513  | --sbi=* | --sb=*)
1514    sbindir=$ac_optarg ;;
1515
1516  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1517  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1518  | --sharedst | --shareds | --shared | --share | --shar \
1519  | --sha | --sh)
1520    ac_prev=sharedstatedir ;;
1521  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1522  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1523  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1524  | --sha=* | --sh=*)
1525    sharedstatedir=$ac_optarg ;;
1526
1527  -site | --site | --sit)
1528    ac_prev=site ;;
1529  -site=* | --site=* | --sit=*)
1530    site=$ac_optarg ;;
1531
1532  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1533    ac_prev=srcdir ;;
1534  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1535    srcdir=$ac_optarg ;;
1536
1537  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1538  | --syscon | --sysco | --sysc | --sys | --sy)
1539    ac_prev=sysconfdir ;;
1540  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1541  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1542    sysconfdir=$ac_optarg ;;
1543
1544  -target | --target | --targe | --targ | --tar | --ta | --t)
1545    ac_prev=target_alias ;;
1546  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1547    target_alias=$ac_optarg ;;
1548
1549  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1550    verbose=yes ;;
1551
1552  -version | --version | --versio | --versi | --vers | -V)
1553    ac_init_version=: ;;
1554
1555  -with-* | --with-*)
1556    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1557    # Reject names that are not valid shell variable names.
1558    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1559      as_fn_error $? "invalid package name: $ac_useropt"
1560    ac_useropt_orig=$ac_useropt
1561    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1562    case $ac_user_opts in
1563      *"
1564"with_$ac_useropt"
1565"*) ;;
1566      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1567	 ac_unrecognized_sep=', ';;
1568    esac
1569    eval with_$ac_useropt=\$ac_optarg ;;
1570
1571  -without-* | --without-*)
1572    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1573    # Reject names that are not valid shell variable names.
1574    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575      as_fn_error $? "invalid package name: $ac_useropt"
1576    ac_useropt_orig=$ac_useropt
1577    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578    case $ac_user_opts in
1579      *"
1580"with_$ac_useropt"
1581"*) ;;
1582      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1583	 ac_unrecognized_sep=', ';;
1584    esac
1585    eval with_$ac_useropt=no ;;
1586
1587  --x)
1588    # Obsolete; use --with-x.
1589    with_x=yes ;;
1590
1591  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1592  | --x-incl | --x-inc | --x-in | --x-i)
1593    ac_prev=x_includes ;;
1594  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1595  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1596    x_includes=$ac_optarg ;;
1597
1598  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1599  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1600    ac_prev=x_libraries ;;
1601  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1602  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1603    x_libraries=$ac_optarg ;;
1604
1605  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1606Try \`$0 --help' for more information"
1607    ;;
1608
1609  *=*)
1610    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1611    # Reject names that are not valid shell variable names.
1612    case $ac_envvar in #(
1613      '' | [0-9]* | *[!_$as_cr_alnum]* )
1614      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1615    esac
1616    eval $ac_envvar=\$ac_optarg
1617    export $ac_envvar ;;
1618
1619  *)
1620    # FIXME: should be removed in autoconf 3.0.
1621    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1622    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1623      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1624    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1625    ;;
1626
1627  esac
1628done
1629
1630if test -n "$ac_prev"; then
1631  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1632  as_fn_error $? "missing argument to $ac_option"
1633fi
1634
1635if test -n "$ac_unrecognized_opts"; then
1636  case $enable_option_checking in
1637    no) ;;
1638    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1639    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1640  esac
1641fi
1642
1643# Check all directory arguments for consistency.
1644for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1645		datadir sysconfdir sharedstatedir localstatedir includedir \
1646		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1647		libdir localedir mandir
1648do
1649  eval ac_val=\$$ac_var
1650  # Remove trailing slashes.
1651  case $ac_val in
1652    */ )
1653      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1654      eval $ac_var=\$ac_val;;
1655  esac
1656  # Be sure to have absolute directory names.
1657  case $ac_val in
1658    [\\/$]* | ?:[\\/]* )  continue;;
1659    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1660  esac
1661  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1662done
1663
1664# There might be people who depend on the old broken behavior: `$host'
1665# used to hold the argument of --host etc.
1666# FIXME: To remove some day.
1667build=$build_alias
1668host=$host_alias
1669target=$target_alias
1670
1671# FIXME: To remove some day.
1672if test "x$host_alias" != x; then
1673  if test "x$build_alias" = x; then
1674    cross_compiling=maybe
1675  elif test "x$build_alias" != "x$host_alias"; then
1676    cross_compiling=yes
1677  fi
1678fi
1679
1680ac_tool_prefix=
1681test -n "$host_alias" && ac_tool_prefix=$host_alias-
1682
1683test "$silent" = yes && exec 6>/dev/null
1684
1685
1686ac_pwd=`pwd` && test -n "$ac_pwd" &&
1687ac_ls_di=`ls -di .` &&
1688ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1689  as_fn_error $? "working directory cannot be determined"
1690test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1691  as_fn_error $? "pwd does not report name of working directory"
1692
1693
1694# Find the source files, if location was not specified.
1695if test -z "$srcdir"; then
1696  ac_srcdir_defaulted=yes
1697  # Try the directory containing this script, then the parent directory.
1698  ac_confdir=`$as_dirname -- "$as_myself" ||
1699$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1700	 X"$as_myself" : 'X\(//\)[^/]' \| \
1701	 X"$as_myself" : 'X\(//\)$' \| \
1702	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1703$as_echo X"$as_myself" |
1704    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1705	    s//\1/
1706	    q
1707	  }
1708	  /^X\(\/\/\)[^/].*/{
1709	    s//\1/
1710	    q
1711	  }
1712	  /^X\(\/\/\)$/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\).*/{
1717	    s//\1/
1718	    q
1719	  }
1720	  s/.*/./; q'`
1721  srcdir=$ac_confdir
1722  if test ! -r "$srcdir/$ac_unique_file"; then
1723    srcdir=..
1724  fi
1725else
1726  ac_srcdir_defaulted=no
1727fi
1728if test ! -r "$srcdir/$ac_unique_file"; then
1729  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1730  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1731fi
1732ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1733ac_abs_confdir=`(
1734	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1735	pwd)`
1736# When building in place, set srcdir=.
1737if test "$ac_abs_confdir" = "$ac_pwd"; then
1738  srcdir=.
1739fi
1740# Remove unnecessary trailing slashes from srcdir.
1741# Double slashes in file names in object file debugging info
1742# mess up M-x gdb in Emacs.
1743case $srcdir in
1744*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1745esac
1746for ac_var in $ac_precious_vars; do
1747  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1748  eval ac_env_${ac_var}_value=\$${ac_var}
1749  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1750  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1751done
1752
1753#
1754# Report the --help message.
1755#
1756if test "$ac_init_help" = "long"; then
1757  # Omit some internal or obsolete options to make the list less imposing.
1758  # This message is too long to be a string in the A/UX 3.1 sh.
1759  cat <<_ACEOF
1760\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1761
1762Usage: $0 [OPTION]... [VAR=VALUE]...
1763
1764To assign environment variables (e.g., CC, CFLAGS...), specify them as
1765VAR=VALUE.  See below for descriptions of some of the useful variables.
1766
1767Defaults for the options are specified in brackets.
1768
1769Configuration:
1770  -h, --help              display this help and exit
1771      --help=short        display options specific to this package
1772      --help=recursive    display the short help of all the included packages
1773  -V, --version           display version information and exit
1774  -q, --quiet, --silent   do not print \`checking ...' messages
1775      --cache-file=FILE   cache test results in FILE [disabled]
1776  -C, --config-cache      alias for \`--cache-file=config.cache'
1777  -n, --no-create         do not create output files
1778      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1779
1780Installation directories:
1781  --prefix=PREFIX         install architecture-independent files in PREFIX
1782                          [$ac_default_prefix]
1783  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1784                          [PREFIX]
1785
1786By default, \`make install' will install all the files in
1787\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1788an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1789for instance \`--prefix=\$HOME'.
1790
1791For better control, use the options below.
1792
1793Fine tuning of the installation directories:
1794  --bindir=DIR            user executables [EPREFIX/bin]
1795  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1796  --libexecdir=DIR        program executables [EPREFIX/libexec]
1797  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1798  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1799  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1800  --libdir=DIR            object code libraries [EPREFIX/lib]
1801  --includedir=DIR        C header files [PREFIX/include]
1802  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1803  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1804  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1805  --infodir=DIR           info documentation [DATAROOTDIR/info]
1806  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1807  --mandir=DIR            man documentation [DATAROOTDIR/man]
1808  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1809  --htmldir=DIR           html documentation [DOCDIR]
1810  --dvidir=DIR            dvi documentation [DOCDIR]
1811  --pdfdir=DIR            pdf documentation [DOCDIR]
1812  --psdir=DIR             ps documentation [DOCDIR]
1813_ACEOF
1814
1815  cat <<\_ACEOF
1816
1817X features:
1818  --x-includes=DIR    X include files are in DIR
1819  --x-libraries=DIR   X library files are in DIR
1820
1821System types:
1822  --build=BUILD     configure for building on BUILD [guessed]
1823  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1824  --target=TARGET   configure for building compilers for TARGET [HOST]
1825_ACEOF
1826fi
1827
1828if test -n "$ac_init_help"; then
1829  case $ac_init_help in
1830     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1831   esac
1832  cat <<\_ACEOF
1833
1834Optional Features:
1835  --disable-option-checking  ignore unrecognized --enable/--with options
1836  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1837  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1838  --enable-openjdk-only   suppress building custom source even if present
1839                          [disabled]
1840  --enable-debug          set the debug level to fastdebug (shorthand for
1841                          --with-debug-level=fastdebug) [disabled]
1842  --disable-headful       disable building headful support (graphical UI
1843                          support) [enabled]
1844  --enable-hotspot-test-in-build
1845                          run the Queens test after Hotspot build [disabled]
1846  --enable-unlimited-crypto
1847                          Enable unlimited crypto policy [disabled]
1848  --enable-rmiconnector-iiop
1849                          enable the JMX RMIConnector iiop transport
1850                          [disabled]
1851  --disable-debug-symbols disable generation of debug symbols [enabled]
1852  --disable-zip-debug-info
1853                          disable zipping of debug-info files [enabled]
1854  --disable-freetype-bundling
1855                          disable bundling of the freetype library with the
1856                          build result [enabled on Windows or when using
1857                          --with-freetype, disabled otherwise]
1858  --enable-sjavac         use sjavac to do fast incremental compiles
1859                          [disabled]
1860  --disable-precompiled-headers
1861                          disable using precompiled headers when compiling C++
1862                          [enabled]
1863  --enable-ccache         enable using ccache to speed up recompilations
1864                          [disabled]
1865
1866Optional Packages:
1867  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1868  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1869  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1870                          support it), e.g. --with-target-bits=32 [guessed]
1871  --with-custom-make-dir  Deprecated. Option is kept for backwards
1872                          compatibility and is ignored
1873  --with-jdk-variant      JDK variant to build (normal) [normal]
1874  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1875  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1876                          client, minimal1, kernel, zero, zeroshark, core)
1877                          [server]
1878  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1879                          optimized (HotSpot build only)) [release]
1880  --with-devkit           use this devkit for compilers, tools and resources
1881  --with-sys-root         alias for --with-sysroot for backwards compatability
1882  --with-sysroot          use this directory as sysroot
1883  --with-tools-dir        alias for --with-toolchain-path for backwards
1884                          compatibility
1885  --with-toolchain-path   prepend these directories when searching for
1886                          toolchain binaries (compilers etc)
1887  --with-extra-path       prepend these directories to the default path
1888  --with-sdk-name         use the platform SDK of the given name. [macosx]
1889  --with-conf-name        use this as the name of the configuration [generated
1890                          from important configuration options]
1891  --with-output-sync      set make output sync type if supported by make.
1892                          [recurse]
1893  --with-builddeps-conf   use this configuration file for the builddeps
1894  --with-builddeps-server download and use build dependencies from this server
1895                          url
1896  --with-builddeps-dir    store downloaded build dependencies here
1897                          [/localhome/builddeps]
1898  --with-builddeps-group  chgrp the downloaded build dependencies to this
1899                          group
1900  --with-cacerts-file     specify alternative cacerts file
1901  --with-milestone        Set milestone value for build [internal]
1902  --with-update-version   Set update version value for build [b00]
1903  --with-user-release-suffix
1904                          Add a custom string to the version string if build
1905                          number is not set.[username_builddateb00]
1906  --with-build-number     Set build number value for build [b00]
1907  --with-copyright-year   Set copyright year value for build [current year]
1908  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1909  --with-add-source-root  for each and every source directory, look in this
1910                          additional source root for the same directory; if it
1911                          exists and have files in it, include it in the build
1912  --with-override-source-root
1913                          for each and every source directory, look in this
1914                          override source root for the same directory; if it
1915                          exists, use that directory instead and ignore the
1916                          directory in the original source root
1917  --with-adds-and-overrides
1918                          use the subdirs 'adds' and 'overrides' in the
1919                          specified directory as add-source-root and
1920                          override-source-root
1921  --with-override-langtools
1922                          use this langtools dir for the build
1923  --with-override-corba   use this corba dir for the build
1924  --with-override-jaxp    use this jaxp dir for the build
1925  --with-override-jaxws   use this jaxws dir for the build
1926  --with-override-hotspot use this hotspot dir for the build
1927  --with-override-nashorn use this nashorn dir for the build
1928  --with-override-jdk     use this jdk dir for the build
1929  --with-import-hotspot   import hotspot binaries from this jdk image or
1930                          hotspot build dist dir instead of building from
1931                          source
1932  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1933                          to show possible values [platform dependent]
1934  --with-jtreg            Regression Test Harness [probed]
1935  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937  --with-extra-ldflags    extra flags to be used when linking jdk
1938  --with-x                use the X Window System
1939  --with-cups             specify prefix directory for the cups package
1940                          (expecting the headers under PATH/include)
1941  --with-cups-include     specify directory for the cups include files
1942  --with-freetype         specify prefix directory for the freetype package
1943                          (expecting the libraries under PATH/lib and the
1944                          headers under PATH/include)
1945  --with-freetype-include specify directory for the freetype include files
1946  --with-freetype-lib     specify directory for the freetype library
1947  --with-freetype-src     specify directory with freetype sources to
1948                          automatically build the library (experimental,
1949                          Windows-only)
1950  --with-alsa             specify prefix directory for the alsa package
1951                          (expecting the libraries under PATH/lib and the
1952                          headers under PATH/include)
1953  --with-alsa-include     specify directory for the alsa include files
1954  --with-alsa-lib         specify directory for the alsa library
1955  --with-libjpeg          use libjpeg from build system or OpenJDK source
1956                          (system, bundled) [bundled]
1957  --with-giflib           use giflib from build system or OpenJDK source
1958                          (system, bundled) [bundled]
1959  --with-lcms             use lcms2 from build system or OpenJDK source
1960                          (system, bundled) [bundled]
1961  --with-libpng           use libpng from build system or OpenJDK source
1962                          (system, bundled) [bundled]
1963  --with-zlib             use zlib from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-stdc++lib=<static>,<dynamic>,<default>
1966                          force linking of the C++ runtime on Linux to either
1967                          static or dynamic, default is static with dynamic as
1968                          fallback
1969  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1970                          only) [probed]
1971  --with-dxsdk            Deprecated. Option is kept for backwards
1972                          compatibility and is ignored
1973  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --with-dxsdk-include    Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-num-cores        number of cores in the build system, e.g.
1978                          --with-num-cores=8 [probed]
1979  --with-memory-size      memory (in MB) available in the build system, e.g.
1980                          --with-memory-size=1024 [probed]
1981  --with-jobs             number of parallel jobs to let make run [calculated
1982                          based on cores and memory]
1983  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1984                          invocations of boot JDK, overriding the default
1985                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1986                          -enableassertions"
1987  --with-sjavac-server-java
1988                          use this java binary for running the sjavac
1989                          background server [Boot JDK java]
1990  --with-ccache-dir       where to store ccache files [~/.ccache]
1991
1992Some influential environment variables:
1993  BASENAME    Override default value for BASENAME
1994  BASH        Override default value for BASH
1995  CAT         Override default value for CAT
1996  CHMOD       Override default value for CHMOD
1997  CMP         Override default value for CMP
1998  COMM        Override default value for COMM
1999  CP          Override default value for CP
2000  CUT         Override default value for CUT
2001  DATE        Override default value for DATE
2002  DIFF        Override default value for DIFF
2003  DIRNAME     Override default value for DIRNAME
2004  ECHO        Override default value for ECHO
2005  EXPR        Override default value for EXPR
2006  FILE        Override default value for FILE
2007  FIND        Override default value for FIND
2008  HEAD        Override default value for HEAD
2009  LN          Override default value for LN
2010  LS          Override default value for LS
2011  MKDIR       Override default value for MKDIR
2012  MKTEMP      Override default value for MKTEMP
2013  MV          Override default value for MV
2014  NAWK        Override default value for NAWK
2015  PRINTF      Override default value for PRINTF
2016  RM          Override default value for RM
2017  SH          Override default value for SH
2018  SORT        Override default value for SORT
2019  TAIL        Override default value for TAIL
2020  TAR         Override default value for TAR
2021  TEE         Override default value for TEE
2022  TOUCH       Override default value for TOUCH
2023  TR          Override default value for TR
2024  UNAME       Override default value for UNAME
2025  UNIQ        Override default value for UNIQ
2026  WC          Override default value for WC
2027  WHICH       Override default value for WHICH
2028  XARGS       Override default value for XARGS
2029  AWK         Override default value for AWK
2030  GREP        Override default value for GREP
2031  EGREP       Override default value for EGREP
2032  FGREP       Override default value for FGREP
2033  SED         Override default value for SED
2034  CYGPATH     Override default value for CYGPATH
2035  READLINK    Override default value for READLINK
2036  DF          Override default value for DF
2037  SETFILE     Override default value for SETFILE
2038  CPIO        Override default value for CPIO
2039  UNZIP       Override default value for UNZIP
2040  ZIP         Override default value for ZIP
2041  LDD         Override default value for LDD
2042  OTOOL       Override default value for OTOOL
2043  READELF     Override default value for READELF
2044  HG          Override default value for HG
2045  STAT        Override default value for STAT
2046  TIME        Override default value for TIME
2047  DSYMUTIL    Override default value for DSYMUTIL
2048  XATTR       Override default value for XATTR
2049  CODESIGN    Override default value for CODESIGN
2050  PKG_CONFIG  path to pkg-config utility
2051  JAVA        Override default value for JAVA
2052  JAVAC       Override default value for JAVAC
2053  JAVAH       Override default value for JAVAH
2054  JAR         Override default value for JAR
2055  NATIVE2ASCII
2056              Override default value for NATIVE2ASCII
2057  JARSIGNER   Override default value for JARSIGNER
2058  CC          C compiler command
2059  CFLAGS      C compiler flags
2060  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2061              nonstandard directory <lib dir>
2062  LIBS        libraries to pass to the linker, e.g. -l<library>
2063  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2064              you have headers in a nonstandard directory <include dir>
2065  CXX         C++ compiler command
2066  CXXFLAGS    C++ compiler flags
2067  CPP         C preprocessor
2068  CXXCPP      C++ preprocessor
2069  AS          Override default value for AS
2070  AR          Override default value for AR
2071  OBJC        Objective C compiler command
2072  OBJCFLAGS   Objective C compiler flags
2073  LIPO        Override default value for LIPO
2074  STRIP       Override default value for STRIP
2075  NM          Override default value for NM
2076  GNM         Override default value for GNM
2077  MCS         Override default value for MCS
2078  OBJCOPY     Override default value for OBJCOPY
2079  OBJDUMP     Override default value for OBJDUMP
2080  BUILD_CC    Override default value for BUILD_CC
2081  BUILD_CXX   Override default value for BUILD_CXX
2082  BUILD_LD    Override default value for BUILD_LD
2083  JTREGEXE    Override default value for JTREGEXE
2084  XMKMF       Path to xmkmf, Makefile generator for X Window System
2085  FREETYPE_CFLAGS
2086              C compiler flags for FREETYPE, overriding pkg-config
2087  FREETYPE_LIBS
2088              linker flags for FREETYPE, overriding pkg-config
2089  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2090  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2091  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2092  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2093  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2094  PNG_LIBS    linker flags for PNG, overriding pkg-config
2095  LIBFFI_CFLAGS
2096              C compiler flags for LIBFFI, overriding pkg-config
2097  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2098  CCACHE      Override default value for CCACHE
2099
2100Use these variables to override the choices made by `configure' or to help
2101it to find libraries and programs with nonstandard names/locations.
2102
2103Report bugs to <build-dev@openjdk.java.net>.
2104OpenJDK home page: <http://openjdk.java.net>.
2105_ACEOF
2106ac_status=$?
2107fi
2108
2109if test "$ac_init_help" = "recursive"; then
2110  # If there are subdirs, report their specific --help.
2111  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2112    test -d "$ac_dir" ||
2113      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2114      continue
2115    ac_builddir=.
2116
2117case "$ac_dir" in
2118.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2119*)
2120  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2121  # A ".." for each directory in $ac_dir_suffix.
2122  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2123  case $ac_top_builddir_sub in
2124  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2125  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2126  esac ;;
2127esac
2128ac_abs_top_builddir=$ac_pwd
2129ac_abs_builddir=$ac_pwd$ac_dir_suffix
2130# for backward compatibility:
2131ac_top_builddir=$ac_top_build_prefix
2132
2133case $srcdir in
2134  .)  # We are building in place.
2135    ac_srcdir=.
2136    ac_top_srcdir=$ac_top_builddir_sub
2137    ac_abs_top_srcdir=$ac_pwd ;;
2138  [\\/]* | ?:[\\/]* )  # Absolute name.
2139    ac_srcdir=$srcdir$ac_dir_suffix;
2140    ac_top_srcdir=$srcdir
2141    ac_abs_top_srcdir=$srcdir ;;
2142  *) # Relative name.
2143    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2144    ac_top_srcdir=$ac_top_build_prefix$srcdir
2145    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2146esac
2147ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2148
2149    cd "$ac_dir" || { ac_status=$?; continue; }
2150    # Check for guested configure.
2151    if test -f "$ac_srcdir/configure.gnu"; then
2152      echo &&
2153      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2154    elif test -f "$ac_srcdir/configure"; then
2155      echo &&
2156      $SHELL "$ac_srcdir/configure" --help=recursive
2157    else
2158      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2159    fi || ac_status=$?
2160    cd "$ac_pwd" || { ac_status=$?; break; }
2161  done
2162fi
2163
2164test -n "$ac_init_help" && exit $ac_status
2165if $ac_init_version; then
2166  cat <<\_ACEOF
2167OpenJDK configure jdk9
2168generated by GNU Autoconf 2.69
2169
2170Copyright (C) 2012 Free Software Foundation, Inc.
2171This configure script is free software; the Free Software Foundation
2172gives unlimited permission to copy, distribute and modify it.
2173_ACEOF
2174  exit
2175fi
2176
2177## ------------------------ ##
2178## Autoconf initialization. ##
2179## ------------------------ ##
2180
2181# ac_fn_c_try_compile LINENO
2182# --------------------------
2183# Try to compile conftest.$ac_ext, and return whether this succeeded.
2184ac_fn_c_try_compile ()
2185{
2186  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187  rm -f conftest.$ac_objext
2188  if { { ac_try="$ac_compile"
2189case "(($ac_try" in
2190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191  *) ac_try_echo=$ac_try;;
2192esac
2193eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194$as_echo "$ac_try_echo"; } >&5
2195  (eval "$ac_compile") 2>conftest.err
2196  ac_status=$?
2197  if test -s conftest.err; then
2198    grep -v '^ *+' conftest.err >conftest.er1
2199    cat conftest.er1 >&5
2200    mv -f conftest.er1 conftest.err
2201  fi
2202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203  test $ac_status = 0; } && {
2204	 test -z "$ac_c_werror_flag" ||
2205	 test ! -s conftest.err
2206       } && test -s conftest.$ac_objext; then :
2207  ac_retval=0
2208else
2209  $as_echo "$as_me: failed program was:" >&5
2210sed 's/^/| /' conftest.$ac_ext >&5
2211
2212	ac_retval=1
2213fi
2214  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215  as_fn_set_status $ac_retval
2216
2217} # ac_fn_c_try_compile
2218
2219# ac_fn_cxx_try_compile LINENO
2220# ----------------------------
2221# Try to compile conftest.$ac_ext, and return whether this succeeded.
2222ac_fn_cxx_try_compile ()
2223{
2224  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225  rm -f conftest.$ac_objext
2226  if { { ac_try="$ac_compile"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_compile") 2>conftest.err
2234  ac_status=$?
2235  if test -s conftest.err; then
2236    grep -v '^ *+' conftest.err >conftest.er1
2237    cat conftest.er1 >&5
2238    mv -f conftest.er1 conftest.err
2239  fi
2240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2241  test $ac_status = 0; } && {
2242	 test -z "$ac_cxx_werror_flag" ||
2243	 test ! -s conftest.err
2244       } && test -s conftest.$ac_objext; then :
2245  ac_retval=0
2246else
2247  $as_echo "$as_me: failed program was:" >&5
2248sed 's/^/| /' conftest.$ac_ext >&5
2249
2250	ac_retval=1
2251fi
2252  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253  as_fn_set_status $ac_retval
2254
2255} # ac_fn_cxx_try_compile
2256
2257# ac_fn_c_try_cpp LINENO
2258# ----------------------
2259# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2260ac_fn_c_try_cpp ()
2261{
2262  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263  if { { ac_try="$ac_cpp conftest.$ac_ext"
2264case "(($ac_try" in
2265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266  *) ac_try_echo=$ac_try;;
2267esac
2268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269$as_echo "$ac_try_echo"; } >&5
2270  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2271  ac_status=$?
2272  if test -s conftest.err; then
2273    grep -v '^ *+' conftest.err >conftest.er1
2274    cat conftest.er1 >&5
2275    mv -f conftest.er1 conftest.err
2276  fi
2277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278  test $ac_status = 0; } > conftest.i && {
2279	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2280	 test ! -s conftest.err
2281       }; then :
2282  ac_retval=0
2283else
2284  $as_echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287    ac_retval=1
2288fi
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290  as_fn_set_status $ac_retval
2291
2292} # ac_fn_c_try_cpp
2293
2294# ac_fn_cxx_try_cpp LINENO
2295# ------------------------
2296# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2297ac_fn_cxx_try_cpp ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if { { ac_try="$ac_cpp conftest.$ac_ext"
2301case "(($ac_try" in
2302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303  *) ac_try_echo=$ac_try;;
2304esac
2305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306$as_echo "$ac_try_echo"; } >&5
2307  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2308  ac_status=$?
2309  if test -s conftest.err; then
2310    grep -v '^ *+' conftest.err >conftest.er1
2311    cat conftest.er1 >&5
2312    mv -f conftest.er1 conftest.err
2313  fi
2314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315  test $ac_status = 0; } > conftest.i && {
2316	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2317	 test ! -s conftest.err
2318       }; then :
2319  ac_retval=0
2320else
2321  $as_echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324    ac_retval=1
2325fi
2326  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327  as_fn_set_status $ac_retval
2328
2329} # ac_fn_cxx_try_cpp
2330
2331# ac_fn_objc_try_compile LINENO
2332# -----------------------------
2333# Try to compile conftest.$ac_ext, and return whether this succeeded.
2334ac_fn_objc_try_compile ()
2335{
2336  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337  rm -f conftest.$ac_objext
2338  if { { ac_try="$ac_compile"
2339case "(($ac_try" in
2340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341  *) ac_try_echo=$ac_try;;
2342esac
2343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344$as_echo "$ac_try_echo"; } >&5
2345  (eval "$ac_compile") 2>conftest.err
2346  ac_status=$?
2347  if test -s conftest.err; then
2348    grep -v '^ *+' conftest.err >conftest.er1
2349    cat conftest.er1 >&5
2350    mv -f conftest.er1 conftest.err
2351  fi
2352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353  test $ac_status = 0; } && {
2354	 test -z "$ac_objc_werror_flag" ||
2355	 test ! -s conftest.err
2356       } && test -s conftest.$ac_objext; then :
2357  ac_retval=0
2358else
2359  $as_echo "$as_me: failed program was:" >&5
2360sed 's/^/| /' conftest.$ac_ext >&5
2361
2362	ac_retval=1
2363fi
2364  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365  as_fn_set_status $ac_retval
2366
2367} # ac_fn_objc_try_compile
2368
2369# ac_fn_c_try_link LINENO
2370# -----------------------
2371# Try to link conftest.$ac_ext, and return whether this succeeded.
2372ac_fn_c_try_link ()
2373{
2374  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375  rm -f conftest.$ac_objext conftest$ac_exeext
2376  if { { ac_try="$ac_link"
2377case "(($ac_try" in
2378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2379  *) ac_try_echo=$ac_try;;
2380esac
2381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2382$as_echo "$ac_try_echo"; } >&5
2383  (eval "$ac_link") 2>conftest.err
2384  ac_status=$?
2385  if test -s conftest.err; then
2386    grep -v '^ *+' conftest.err >conftest.er1
2387    cat conftest.er1 >&5
2388    mv -f conftest.er1 conftest.err
2389  fi
2390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2391  test $ac_status = 0; } && {
2392	 test -z "$ac_c_werror_flag" ||
2393	 test ! -s conftest.err
2394       } && test -s conftest$ac_exeext && {
2395	 test "$cross_compiling" = yes ||
2396	 test -x conftest$ac_exeext
2397       }; then :
2398  ac_retval=0
2399else
2400  $as_echo "$as_me: failed program was:" >&5
2401sed 's/^/| /' conftest.$ac_ext >&5
2402
2403	ac_retval=1
2404fi
2405  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2406  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2407  # interfere with the next link command; also delete a directory that is
2408  # left behind by Apple's compiler.  We do this before executing the actions.
2409  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2410  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2411  as_fn_set_status $ac_retval
2412
2413} # ac_fn_c_try_link
2414
2415# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2416# ---------------------------------------------------------
2417# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2418# the include files in INCLUDES and setting the cache variable VAR
2419# accordingly.
2420ac_fn_cxx_check_header_mongrel ()
2421{
2422  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423  if eval \${$3+:} false; then :
2424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2425$as_echo_n "checking for $2... " >&6; }
2426if eval \${$3+:} false; then :
2427  $as_echo_n "(cached) " >&6
2428fi
2429eval ac_res=\$$3
2430	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
2432else
2433  # Is the header compilable?
2434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2435$as_echo_n "checking $2 usability... " >&6; }
2436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h.  */
2438$4
2439#include <$2>
2440_ACEOF
2441if ac_fn_cxx_try_compile "$LINENO"; then :
2442  ac_header_compiler=yes
2443else
2444  ac_header_compiler=no
2445fi
2446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2448$as_echo "$ac_header_compiler" >&6; }
2449
2450# Is the header present?
2451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2452$as_echo_n "checking $2 presence... " >&6; }
2453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455#include <$2>
2456_ACEOF
2457if ac_fn_cxx_try_cpp "$LINENO"; then :
2458  ac_header_preproc=yes
2459else
2460  ac_header_preproc=no
2461fi
2462rm -f conftest.err conftest.i conftest.$ac_ext
2463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2464$as_echo "$ac_header_preproc" >&6; }
2465
2466# So?  What about this header?
2467case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2468  yes:no: )
2469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2470$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2472$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2473    ;;
2474  no:yes:* )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2476$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2478$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2480$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2482$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485( $as_echo "## ----------------------------------------- ##
2486## Report this to build-dev@openjdk.java.net ##
2487## ----------------------------------------- ##"
2488     ) | sed "s/^/$as_me: WARNING:     /" >&2
2489    ;;
2490esac
2491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2492$as_echo_n "checking for $2... " >&6; }
2493if eval \${$3+:} false; then :
2494  $as_echo_n "(cached) " >&6
2495else
2496  eval "$3=\$ac_header_compiler"
2497fi
2498eval ac_res=\$$3
2499	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2500$as_echo "$ac_res" >&6; }
2501fi
2502  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503
2504} # ac_fn_cxx_check_header_mongrel
2505
2506# ac_fn_cxx_try_run LINENO
2507# ------------------------
2508# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2509# that executables *can* be run.
2510ac_fn_cxx_try_run ()
2511{
2512  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513  if { { ac_try="$ac_link"
2514case "(($ac_try" in
2515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2516  *) ac_try_echo=$ac_try;;
2517esac
2518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2519$as_echo "$ac_try_echo"; } >&5
2520  (eval "$ac_link") 2>&5
2521  ac_status=$?
2522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2524  { { case "(($ac_try" in
2525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526  *) ac_try_echo=$ac_try;;
2527esac
2528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529$as_echo "$ac_try_echo"; } >&5
2530  (eval "$ac_try") 2>&5
2531  ac_status=$?
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; }; }; then :
2534  ac_retval=0
2535else
2536  $as_echo "$as_me: program exited with status $ac_status" >&5
2537       $as_echo "$as_me: failed program was:" >&5
2538sed 's/^/| /' conftest.$ac_ext >&5
2539
2540       ac_retval=$ac_status
2541fi
2542  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2543  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2544  as_fn_set_status $ac_retval
2545
2546} # ac_fn_cxx_try_run
2547
2548# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2549# ---------------------------------------------------------
2550# Tests whether HEADER exists and can be compiled using the include files in
2551# INCLUDES, setting the cache variable VAR accordingly.
2552ac_fn_cxx_check_header_compile ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2556$as_echo_n "checking for $2... " >&6; }
2557if eval \${$3+:} false; then :
2558  $as_echo_n "(cached) " >&6
2559else
2560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561/* end confdefs.h.  */
2562$4
2563#include <$2>
2564_ACEOF
2565if ac_fn_cxx_try_compile "$LINENO"; then :
2566  eval "$3=yes"
2567else
2568  eval "$3=no"
2569fi
2570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571fi
2572eval ac_res=\$$3
2573	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2574$as_echo "$ac_res" >&6; }
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576
2577} # ac_fn_cxx_check_header_compile
2578
2579# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2580# ----------------------------------------------
2581# Tries to find the compile-time value of EXPR in a program that includes
2582# INCLUDES, setting VAR accordingly. Returns whether the value could be
2583# computed
2584ac_fn_cxx_compute_int ()
2585{
2586  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587  if test "$cross_compiling" = yes; then
2588    # Depending upon the size, compute the lo and hi bounds.
2589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590/* end confdefs.h.  */
2591$4
2592int
2593main ()
2594{
2595static int test_array [1 - 2 * !(($2) >= 0)];
2596test_array [0] = 0;
2597return test_array [0];
2598
2599  ;
2600  return 0;
2601}
2602_ACEOF
2603if ac_fn_cxx_try_compile "$LINENO"; then :
2604  ac_lo=0 ac_mid=0
2605  while :; do
2606    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609int
2610main ()
2611{
2612static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2613test_array [0] = 0;
2614return test_array [0];
2615
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_compile "$LINENO"; then :
2621  ac_hi=$ac_mid; break
2622else
2623  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2624			if test $ac_lo -le $ac_mid; then
2625			  ac_lo= ac_hi=
2626			  break
2627			fi
2628			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2629fi
2630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2631  done
2632else
2633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635$4
2636int
2637main ()
2638{
2639static int test_array [1 - 2 * !(($2) < 0)];
2640test_array [0] = 0;
2641return test_array [0];
2642
2643  ;
2644  return 0;
2645}
2646_ACEOF
2647if ac_fn_cxx_try_compile "$LINENO"; then :
2648  ac_hi=-1 ac_mid=-1
2649  while :; do
2650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651/* end confdefs.h.  */
2652$4
2653int
2654main ()
2655{
2656static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2657test_array [0] = 0;
2658return test_array [0];
2659
2660  ;
2661  return 0;
2662}
2663_ACEOF
2664if ac_fn_cxx_try_compile "$LINENO"; then :
2665  ac_lo=$ac_mid; break
2666else
2667  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2668			if test $ac_mid -le $ac_hi; then
2669			  ac_lo= ac_hi=
2670			  break
2671			fi
2672			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675  done
2676else
2677  ac_lo= ac_hi=
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682# Binary search between lo and hi bounds.
2683while test "x$ac_lo" != "x$ac_hi"; do
2684  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688int
2689main ()
2690{
2691static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2692test_array [0] = 0;
2693return test_array [0];
2694
2695  ;
2696  return 0;
2697}
2698_ACEOF
2699if ac_fn_cxx_try_compile "$LINENO"; then :
2700  ac_hi=$ac_mid
2701else
2702  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2703fi
2704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2705done
2706case $ac_lo in #((
2707?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2708'') ac_retval=1 ;;
2709esac
2710  else
2711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712/* end confdefs.h.  */
2713$4
2714static long int longval () { return $2; }
2715static unsigned long int ulongval () { return $2; }
2716#include <stdio.h>
2717#include <stdlib.h>
2718int
2719main ()
2720{
2721
2722  FILE *f = fopen ("conftest.val", "w");
2723  if (! f)
2724    return 1;
2725  if (($2) < 0)
2726    {
2727      long int i = longval ();
2728      if (i != ($2))
2729	return 1;
2730      fprintf (f, "%ld", i);
2731    }
2732  else
2733    {
2734      unsigned long int i = ulongval ();
2735      if (i != ($2))
2736	return 1;
2737      fprintf (f, "%lu", i);
2738    }
2739  /* Do not output a trailing newline, as this causes \r\n confusion
2740     on some platforms.  */
2741  return ferror (f) || fclose (f) != 0;
2742
2743  ;
2744  return 0;
2745}
2746_ACEOF
2747if ac_fn_cxx_try_run "$LINENO"; then :
2748  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2749else
2750  ac_retval=1
2751fi
2752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2753  conftest.$ac_objext conftest.beam conftest.$ac_ext
2754rm -f conftest.val
2755
2756  fi
2757  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2758  as_fn_set_status $ac_retval
2759
2760} # ac_fn_cxx_compute_int
2761
2762# ac_fn_cxx_try_link LINENO
2763# -------------------------
2764# Try to link conftest.$ac_ext, and return whether this succeeded.
2765ac_fn_cxx_try_link ()
2766{
2767  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768  rm -f conftest.$ac_objext conftest$ac_exeext
2769  if { { ac_try="$ac_link"
2770case "(($ac_try" in
2771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772  *) ac_try_echo=$ac_try;;
2773esac
2774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775$as_echo "$ac_try_echo"; } >&5
2776  (eval "$ac_link") 2>conftest.err
2777  ac_status=$?
2778  if test -s conftest.err; then
2779    grep -v '^ *+' conftest.err >conftest.er1
2780    cat conftest.er1 >&5
2781    mv -f conftest.er1 conftest.err
2782  fi
2783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784  test $ac_status = 0; } && {
2785	 test -z "$ac_cxx_werror_flag" ||
2786	 test ! -s conftest.err
2787       } && test -s conftest$ac_exeext && {
2788	 test "$cross_compiling" = yes ||
2789	 test -x conftest$ac_exeext
2790       }; then :
2791  ac_retval=0
2792else
2793  $as_echo "$as_me: failed program was:" >&5
2794sed 's/^/| /' conftest.$ac_ext >&5
2795
2796	ac_retval=1
2797fi
2798  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2799  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2800  # interfere with the next link command; also delete a directory that is
2801  # left behind by Apple's compiler.  We do this before executing the actions.
2802  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2803  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2804  as_fn_set_status $ac_retval
2805
2806} # ac_fn_cxx_try_link
2807
2808# ac_fn_cxx_check_func LINENO FUNC VAR
2809# ------------------------------------
2810# Tests whether FUNC exists, setting the cache variable VAR accordingly
2811ac_fn_cxx_check_func ()
2812{
2813  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2815$as_echo_n "checking for $2... " >&6; }
2816if eval \${$3+:} false; then :
2817  $as_echo_n "(cached) " >&6
2818else
2819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2822   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2823#define $2 innocuous_$2
2824
2825/* System header to define __stub macros and hopefully few prototypes,
2826    which can conflict with char $2 (); below.
2827    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2828    <limits.h> exists even on freestanding compilers.  */
2829
2830#ifdef __STDC__
2831# include <limits.h>
2832#else
2833# include <assert.h>
2834#endif
2835
2836#undef $2
2837
2838/* Override any GCC internal prototype to avoid an error.
2839   Use char because int might match the return type of a GCC
2840   builtin and then its argument prototype would still apply.  */
2841#ifdef __cplusplus
2842extern "C"
2843#endif
2844char $2 ();
2845/* The GNU C library defines this for functions which it implements
2846    to always fail with ENOSYS.  Some functions are actually named
2847    something starting with __ and the normal name is an alias.  */
2848#if defined __stub_$2 || defined __stub___$2
2849choke me
2850#endif
2851
2852int
2853main ()
2854{
2855return $2 ();
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_link "$LINENO"; then :
2861  eval "$3=yes"
2862else
2863  eval "$3=no"
2864fi
2865rm -f core conftest.err conftest.$ac_objext \
2866    conftest$ac_exeext conftest.$ac_ext
2867fi
2868eval ac_res=\$$3
2869	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2870$as_echo "$ac_res" >&6; }
2871  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2872
2873} # ac_fn_cxx_check_func
2874
2875# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2876# -------------------------------------------------------
2877# Tests whether HEADER exists and can be compiled using the include files in
2878# INCLUDES, setting the cache variable VAR accordingly.
2879ac_fn_c_check_header_compile ()
2880{
2881  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2883$as_echo_n "checking for $2... " >&6; }
2884if eval \${$3+:} false; then :
2885  $as_echo_n "(cached) " >&6
2886else
2887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888/* end confdefs.h.  */
2889$4
2890#include <$2>
2891_ACEOF
2892if ac_fn_c_try_compile "$LINENO"; then :
2893  eval "$3=yes"
2894else
2895  eval "$3=no"
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898fi
2899eval ac_res=\$$3
2900	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2901$as_echo "$ac_res" >&6; }
2902  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2903
2904} # ac_fn_c_check_header_compile
2905cat >config.log <<_ACEOF
2906This file contains any messages produced by compilers while
2907running configure, to aid debugging if configure makes a mistake.
2908
2909It was created by OpenJDK $as_me jdk9, which was
2910generated by GNU Autoconf 2.69.  Invocation command line was
2911
2912  $ $0 $@
2913
2914_ACEOF
2915exec 5>>config.log
2916{
2917cat <<_ASUNAME
2918## --------- ##
2919## Platform. ##
2920## --------- ##
2921
2922hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2923uname -m = `(uname -m) 2>/dev/null || echo unknown`
2924uname -r = `(uname -r) 2>/dev/null || echo unknown`
2925uname -s = `(uname -s) 2>/dev/null || echo unknown`
2926uname -v = `(uname -v) 2>/dev/null || echo unknown`
2927
2928/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2929/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2930
2931/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2932/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2933/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2934/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2935/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2936/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2937/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2938
2939_ASUNAME
2940
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944  IFS=$as_save_IFS
2945  test -z "$as_dir" && as_dir=.
2946    $as_echo "PATH: $as_dir"
2947  done
2948IFS=$as_save_IFS
2949
2950} >&5
2951
2952cat >&5 <<_ACEOF
2953
2954
2955## ----------- ##
2956## Core tests. ##
2957## ----------- ##
2958
2959_ACEOF
2960
2961
2962# Keep a trace of the command line.
2963# Strip out --no-create and --no-recursion so they do not pile up.
2964# Strip out --silent because we don't want to record it for future runs.
2965# Also quote any args containing shell meta-characters.
2966# Make two passes to allow for proper duplicate-argument suppression.
2967ac_configure_args=
2968ac_configure_args0=
2969ac_configure_args1=
2970ac_must_keep_next=false
2971for ac_pass in 1 2
2972do
2973  for ac_arg
2974  do
2975    case $ac_arg in
2976    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2977    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2978    | -silent | --silent | --silen | --sile | --sil)
2979      continue ;;
2980    *\'*)
2981      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2982    esac
2983    case $ac_pass in
2984    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2985    2)
2986      as_fn_append ac_configure_args1 " '$ac_arg'"
2987      if test $ac_must_keep_next = true; then
2988	ac_must_keep_next=false # Got value, back to normal.
2989      else
2990	case $ac_arg in
2991	  *=* | --config-cache | -C | -disable-* | --disable-* \
2992	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2993	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2994	  | -with-* | --with-* | -without-* | --without-* | --x)
2995	    case "$ac_configure_args0 " in
2996	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2997	    esac
2998	    ;;
2999	  -* ) ac_must_keep_next=true ;;
3000	esac
3001      fi
3002      as_fn_append ac_configure_args " '$ac_arg'"
3003      ;;
3004    esac
3005  done
3006done
3007{ ac_configure_args0=; unset ac_configure_args0;}
3008{ ac_configure_args1=; unset ac_configure_args1;}
3009
3010# When interrupted or exit'd, cleanup temporary files, and complete
3011# config.log.  We remove comments because anyway the quotes in there
3012# would cause problems or look ugly.
3013# WARNING: Use '\'' to represent an apostrophe within the trap.
3014# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3015trap 'exit_status=$?
3016  # Save into config.log some information that might help in debugging.
3017  {
3018    echo
3019
3020    $as_echo "## ---------------- ##
3021## Cache variables. ##
3022## ---------------- ##"
3023    echo
3024    # The following way of writing the cache mishandles newlines in values,
3025(
3026  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3027    eval ac_val=\$$ac_var
3028    case $ac_val in #(
3029    *${as_nl}*)
3030      case $ac_var in #(
3031      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3032$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3033      esac
3034      case $ac_var in #(
3035      _ | IFS | as_nl) ;; #(
3036      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3037      *) { eval $ac_var=; unset $ac_var;} ;;
3038      esac ;;
3039    esac
3040  done
3041  (set) 2>&1 |
3042    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3043    *${as_nl}ac_space=\ *)
3044      sed -n \
3045	"s/'\''/'\''\\\\'\'''\''/g;
3046	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3047      ;; #(
3048    *)
3049      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3050      ;;
3051    esac |
3052    sort
3053)
3054    echo
3055
3056    $as_echo "## ----------------- ##
3057## Output variables. ##
3058## ----------------- ##"
3059    echo
3060    for ac_var in $ac_subst_vars
3061    do
3062      eval ac_val=\$$ac_var
3063      case $ac_val in
3064      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065      esac
3066      $as_echo "$ac_var='\''$ac_val'\''"
3067    done | sort
3068    echo
3069
3070    if test -n "$ac_subst_files"; then
3071      $as_echo "## ------------------- ##
3072## File substitutions. ##
3073## ------------------- ##"
3074      echo
3075      for ac_var in $ac_subst_files
3076      do
3077	eval ac_val=\$$ac_var
3078	case $ac_val in
3079	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3080	esac
3081	$as_echo "$ac_var='\''$ac_val'\''"
3082      done | sort
3083      echo
3084    fi
3085
3086    if test -s confdefs.h; then
3087      $as_echo "## ----------- ##
3088## confdefs.h. ##
3089## ----------- ##"
3090      echo
3091      cat confdefs.h
3092      echo
3093    fi
3094    test "$ac_signal" != 0 &&
3095      $as_echo "$as_me: caught signal $ac_signal"
3096    $as_echo "$as_me: exit $exit_status"
3097  } >&5
3098  rm -f core *.core core.conftest.* &&
3099    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3100    exit $exit_status
3101' 0
3102for ac_signal in 1 2 13 15; do
3103  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3104done
3105ac_signal=0
3106
3107# confdefs.h avoids OS command line length limits that DEFS can exceed.
3108rm -f -r conftest* confdefs.h
3109
3110$as_echo "/* confdefs.h */" > confdefs.h
3111
3112# Predefined preprocessor variables.
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_NAME "$PACKAGE_NAME"
3116_ACEOF
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3120_ACEOF
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_VERSION "$PACKAGE_VERSION"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_STRING "$PACKAGE_STRING"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_URL "$PACKAGE_URL"
3136_ACEOF
3137
3138
3139# Let the site file select an alternate cache file if it wants to.
3140# Prefer an explicitly selected file to automatically selected ones.
3141ac_site_file1=NONE
3142ac_site_file2=NONE
3143if test -n "$CONFIG_SITE"; then
3144  # We do not want a PATH search for config.site.
3145  case $CONFIG_SITE in #((
3146    -*)  ac_site_file1=./$CONFIG_SITE;;
3147    */*) ac_site_file1=$CONFIG_SITE;;
3148    *)   ac_site_file1=./$CONFIG_SITE;;
3149  esac
3150elif test "x$prefix" != xNONE; then
3151  ac_site_file1=$prefix/share/config.site
3152  ac_site_file2=$prefix/etc/config.site
3153else
3154  ac_site_file1=$ac_default_prefix/share/config.site
3155  ac_site_file2=$ac_default_prefix/etc/config.site
3156fi
3157for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3158do
3159  test "x$ac_site_file" = xNONE && continue
3160  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3161    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3162$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3163    sed 's/^/| /' "$ac_site_file" >&5
3164    . "$ac_site_file" \
3165      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3167as_fn_error $? "failed to load site script $ac_site_file
3168See \`config.log' for more details" "$LINENO" 5; }
3169  fi
3170done
3171
3172if test -r "$cache_file"; then
3173  # Some versions of bash will fail to source /dev/null (special files
3174  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3175  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3176    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3177$as_echo "$as_me: loading cache $cache_file" >&6;}
3178    case $cache_file in
3179      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3180      *)                      . "./$cache_file";;
3181    esac
3182  fi
3183else
3184  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3185$as_echo "$as_me: creating cache $cache_file" >&6;}
3186  >$cache_file
3187fi
3188
3189# Check that the precious variables saved in the cache have kept the same
3190# value.
3191ac_cache_corrupted=false
3192for ac_var in $ac_precious_vars; do
3193  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3194  eval ac_new_set=\$ac_env_${ac_var}_set
3195  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3196  eval ac_new_val=\$ac_env_${ac_var}_value
3197  case $ac_old_set,$ac_new_set in
3198    set,)
3199      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3200$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3201      ac_cache_corrupted=: ;;
3202    ,set)
3203      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3204$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3205      ac_cache_corrupted=: ;;
3206    ,);;
3207    *)
3208      if test "x$ac_old_val" != "x$ac_new_val"; then
3209	# differences in whitespace do not lead to failure.
3210	ac_old_val_w=`echo x $ac_old_val`
3211	ac_new_val_w=`echo x $ac_new_val`
3212	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3213	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3214$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3215	  ac_cache_corrupted=:
3216	else
3217	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3218$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3219	  eval $ac_var=\$ac_old_val
3220	fi
3221	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3222$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3223	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3224$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3225      fi;;
3226  esac
3227  # Pass precious variables to config.status.
3228  if test "$ac_new_set" = set; then
3229    case $ac_new_val in
3230    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3231    *) ac_arg=$ac_var=$ac_new_val ;;
3232    esac
3233    case " $ac_configure_args " in
3234      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3235      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3236    esac
3237  fi
3238done
3239if $ac_cache_corrupted; then
3240  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3243$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3244  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3245fi
3246## -------------------- ##
3247## Main body of script. ##
3248## -------------------- ##
3249
3250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255
3256
3257
3258ac_aux_dir=
3259for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3260  if test -f "$ac_dir/install-sh"; then
3261    ac_aux_dir=$ac_dir
3262    ac_install_sh="$ac_aux_dir/install-sh -c"
3263    break
3264  elif test -f "$ac_dir/install.sh"; then
3265    ac_aux_dir=$ac_dir
3266    ac_install_sh="$ac_aux_dir/install.sh -c"
3267    break
3268  elif test -f "$ac_dir/shtool"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/shtool install -c"
3271    break
3272  fi
3273done
3274if test -z "$ac_aux_dir"; then
3275  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
3276fi
3277
3278# These three variables are undocumented and unsupported,
3279# and are intended to be withdrawn in a future Autoconf release.
3280# They can cause serious problems if a builder's source tree is in a directory
3281# whose full name contains unusual characters.
3282ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3283ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3284ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3285
3286
3287# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3288
3289#
3290# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292#
3293# This code is free software; you can redistribute it and/or modify it
3294# under the terms of the GNU General Public License version 2 only, as
3295# published by the Free Software Foundation.  Oracle designates this
3296# particular file as subject to the "Classpath" exception as provided
3297# by Oracle in the LICENSE file that accompanied this code.
3298#
3299# This code is distributed in the hope that it will be useful, but WITHOUT
3300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302# version 2 for more details (a copy is included in the LICENSE file that
3303# accompanied this code).
3304#
3305# You should have received a copy of the GNU General Public License version
3306# 2 along with this work; if not, write to the Free Software Foundation,
3307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308#
3309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310# or visit www.oracle.com if you need additional information or have any
3311# questions.
3312#
3313
3314#
3315# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3316#
3317# This program is free software; you can redistribute it and/or modify
3318# it under the terms of the GNU General Public License as published by
3319# the Free Software Foundation; either version 2 of the License, or
3320# (at your option) any later version.
3321#
3322# This program is distributed in the hope that it will be useful, but
3323# WITHOUT ANY WARRANTY; without even the implied warranty of
3324# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3325# General Public License for more details.
3326#
3327# You should have received a copy of the GNU General Public License
3328# along with this program; if not, write to the Free Software
3329# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3330#
3331# As a special exception to the GNU General Public License, if you
3332# distribute this file as part of a program that contains a
3333# configuration script generated by Autoconf, you may include it under
3334# the same distribution terms that you use for the rest of that program.
3335
3336# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3337# ----------------------------------
3338# PKG_PROG_PKG_CONFIG
3339
3340# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3341#
3342# Check to see whether a particular set of modules exists.  Similar
3343# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3344#
3345#
3346# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3347# this or PKG_CHECK_MODULES is called, or make sure to call
3348# PKG_CHECK_EXISTS manually
3349# --------------------------------------------------------------
3350
3351
3352
3353# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3354# ---------------------------------------------
3355# _PKG_CONFIG
3356
3357# _PKG_SHORT_ERRORS_SUPPORTED
3358# -----------------------------
3359# _PKG_SHORT_ERRORS_SUPPORTED
3360
3361
3362# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3363# [ACTION-IF-NOT-FOUND])
3364#
3365#
3366# Note that if there is a possibility the first call to
3367# PKG_CHECK_MODULES might not happen, you should be sure to include an
3368# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3369#
3370#
3371# --------------------------------------------------------------
3372# PKG_CHECK_MODULES
3373
3374
3375# Include these first...
3376#
3377# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3378# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3379#
3380# This code is free software; you can redistribute it and/or modify it
3381# under the terms of the GNU General Public License version 2 only, as
3382# published by the Free Software Foundation.  Oracle designates this
3383# particular file as subject to the "Classpath" exception as provided
3384# by Oracle in the LICENSE file that accompanied this code.
3385#
3386# This code is distributed in the hope that it will be useful, but WITHOUT
3387# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3388# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3389# version 2 for more details (a copy is included in the LICENSE file that
3390# accompanied this code).
3391#
3392# You should have received a copy of the GNU General Public License version
3393# 2 along with this work; if not, write to the Free Software Foundation,
3394# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3395#
3396# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3397# or visit www.oracle.com if you need additional information or have any
3398# questions.
3399#
3400
3401# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3402# If so, then append $1 to $2 \
3403# Also set JVM_ARG_OK to true/false depending on outcome.
3404
3405
3406# Appends a string to a path variable, only adding the : when needed.
3407
3408
3409# Prepends a string to a path variable, only adding the : when needed.
3410
3411
3412# This will make sure the given variable points to a full and proper
3413# path. This means:
3414# 1) There will be no spaces in the path. On unix platforms,
3415#    spaces in the path will result in an error. On Windows,
3416#    the path will be rewritten using short-style to be space-free.
3417# 2) The path will be absolute, and it will be in unix-style (on
3418#     cygwin).
3419# $1: The name of the variable to fix
3420
3421
3422# This will make sure the given variable points to a executable
3423# with a full and proper path. This means:
3424# 1) There will be no spaces in the path. On unix platforms,
3425#    spaces in the path will result in an error. On Windows,
3426#    the path will be rewritten using short-style to be space-free.
3427# 2) The path will be absolute, and it will be in unix-style (on
3428#     cygwin).
3429# Any arguments given to the executable is preserved.
3430# If the input variable does not have a directory specification, then
3431# it need to be in the PATH.
3432# $1: The name of the variable to fix
3433
3434
3435
3436
3437# Register a --with argument but mark it as deprecated
3438# $1: The name of the with argument to deprecate, not including --with-
3439
3440
3441# Register a --enable argument but mark it as deprecated
3442# $1: The name of the with argument to deprecate, not including --enable-
3443# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3444
3445
3446
3447
3448# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3449# $1: variable to check
3450
3451
3452# Check that there are no unprocessed overridden variables left.
3453# If so, they are an incorrect argument and we will exit with an error.
3454
3455
3456# Setup a tool for the given variable. If correctly specified by the user,
3457# use that value, otherwise search for the tool using the supplied code snippet.
3458# $1: variable to set
3459# $2: code snippet to call to look for the tool
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_PATH_PROGS but fails if no tool was found.
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Like BASIC_SETUP_TOOL but fails if no tool was found.
3478# $1: variable to set
3479# $2: autoconf macro to call to look for the special tool
3480
3481
3482# Setup the most fundamental tools that relies on not much else to set up,
3483# but is used by much of the early bootstrap code.
3484
3485
3486# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496#%%% Simple tools %%%
3497
3498# Check if we have found a usable version of make
3499# $1: the path to a potential make binary (or empty)
3500# $2: the description on how we found this
3501
3502
3503
3504
3505# Goes looking for a usable version of GNU make.
3506
3507
3508
3509
3510
3511
3512# Check if build directory is on local disk. If not possible to determine,
3513# we prefer to claim it's local.
3514# Argument 1: directory to test
3515# Argument 2: what to do if it is on local disk
3516# Argument 3: what to do otherwise (remote disk or failure)
3517
3518
3519# Check that source files have basic read permissions set. This might
3520# not be the case in cygwin in certain conditions.
3521
3522
3523
3524
3525#
3526# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3527# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3528#
3529# This code is free software; you can redistribute it and/or modify it
3530# under the terms of the GNU General Public License version 2 only, as
3531# published by the Free Software Foundation.  Oracle designates this
3532# particular file as subject to the "Classpath" exception as provided
3533# by Oracle in the LICENSE file that accompanied this code.
3534#
3535# This code is distributed in the hope that it will be useful, but WITHOUT
3536# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3537# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3538# version 2 for more details (a copy is included in the LICENSE file that
3539# accompanied this code).
3540#
3541# You should have received a copy of the GNU General Public License version
3542# 2 along with this work; if not, write to the Free Software Foundation,
3543# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3544#
3545# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3546# or visit www.oracle.com if you need additional information or have any
3547# questions.
3548#
3549
3550
3551
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# Helper function which possibly converts a path using DOS-style short mode.
3560# If so, the updated path is stored in $new_path.
3561# $1: The path to check
3562
3563
3564# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3565# and could probably be heavily simplified. However, all changes in this
3566# area tend to need lot of testing in different scenarios, and in lack of
3567# proper unit testing, cleaning this up has not been deemed worth the effort
3568# at the moment.
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3579
3580
3581
3582
3583#
3584# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3585# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3586#
3587# This code is free software; you can redistribute it and/or modify it
3588# under the terms of the GNU General Public License version 2 only, as
3589# published by the Free Software Foundation.  Oracle designates this
3590# particular file as subject to the "Classpath" exception as provided
3591# by Oracle in the LICENSE file that accompanied this code.
3592#
3593# This code is distributed in the hope that it will be useful, but WITHOUT
3594# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3595# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3596# version 2 for more details (a copy is included in the LICENSE file that
3597# accompanied this code).
3598#
3599# You should have received a copy of the GNU General Public License version
3600# 2 along with this work; if not, write to the Free Software Foundation,
3601# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3602#
3603# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3604# or visit www.oracle.com if you need additional information or have any
3605# questions.
3606#
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618# ... then the rest
3619#
3620# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644########################################################################
3645# This file handles detection of the Boot JDK. The Boot JDK detection
3646# process has been developed as a response to solve a complex real-world
3647# problem. Initially, it was simple, but it has grown as platform after
3648# platform, idiosyncracy after idiosyncracy has been supported.
3649#
3650# The basic idea is this:
3651# 1) You need an acceptable *) JDK to use as a Boot JDK
3652# 2) There are several ways to locate a JDK, that are mostly platform
3653#    dependent **)
3654# 3) You can have multiple JDKs installed
3655# 4) If possible, configure should try to dig out an acceptable JDK
3656#    automatically, without having to resort to command-line options
3657#
3658# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3659#     javac) and not a JRE, etc.
3660#
3661# **) On Windows we typically use a well-known path.
3662#     On MacOSX we typically use the tool java_home.
3663#     On Linux we typically find javac in the $PATH, and then follow a
3664#     chain of symlinks that often ends up in a real JDK.
3665#
3666# This leads to the code where we check in different ways to locate a
3667# JDK, and if one is found, check if it is acceptable. If not, we print
3668# our reasons for rejecting it (useful when debugging non-working
3669# configure situations) and continue checking the next one.
3670########################################################################
3671
3672# Execute the check given as argument, and verify the result
3673# If the Boot JDK was previously found, do nothing
3674# $1 A command line (typically autoconf macro) to execute
3675
3676
3677# Test: Is bootjdk explicitely set by command line arguments?
3678
3679
3680# Test: Is bootjdk available from builddeps?
3681
3682
3683# Test: Is $JAVA_HOME set?
3684
3685
3686# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3687
3688
3689# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3690# $1: Argument to the java_home binary (optional)
3691
3692
3693# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3694
3695
3696# Look for a jdk in the given path. If there are multiple, try to select the newest.
3697# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3698# $1 = Path to directory containing jdk installations.
3699# $2 = String to append to the found JDK directory to get the proper JDK home
3700
3701
3702# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3703# environmental variable as base for where to look.
3704# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3705
3706
3707# Test: Is there a JDK installed in default, well-known locations?
3708
3709
3710# Check that a command-line tool in the Boot JDK is correct
3711# $1 = name of variable to assign
3712# $2 = name of binary
3713
3714
3715###############################################################################
3716#
3717# We need a Boot JDK to bootstrap the build.
3718#
3719
3720
3721
3722
3723
3724#
3725# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768#
3769# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3770# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3771#
3772# This code is free software; you can redistribute it and/or modify it
3773# under the terms of the GNU General Public License version 2 only, as
3774# published by the Free Software Foundation.  Oracle designates this
3775# particular file as subject to the "Classpath" exception as provided
3776# by Oracle in the LICENSE file that accompanied this code.
3777#
3778# This code is distributed in the hope that it will be useful, but WITHOUT
3779# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3780# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3781# version 2 for more details (a copy is included in the LICENSE file that
3782# accompanied this code).
3783#
3784# You should have received a copy of the GNU General Public License version
3785# 2 along with this work; if not, write to the Free Software Foundation,
3786# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3787#
3788# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3789# or visit www.oracle.com if you need additional information or have any
3790# questions.
3791#
3792
3793
3794
3795
3796
3797# Documentation on common flags used for solstudio in HIGHEST.
3798#
3799# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3800#          done with care, there are some assumptions below that need to
3801#          be understood about the use of pointers, and IEEE behavior.
3802#
3803# -fns: Use non-standard floating point mode (not IEEE 754)
3804# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3805# -fsingle: Use single precision floating point with 'float'
3806# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3807#   (Source with excessing pointer casting and data access with mixed
3808#    pointer types are not recommended)
3809# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3810#   (If you expect perfect errno behavior, do not use this)
3811# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3812# -xrestrict: Pointer parameters to functions do not overlap
3813#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3814#    If you pass in multiple pointers to the same data, do not use this)
3815# -xlibmil: Inline some library routines
3816#   (If you expect perfect errno behavior, do not use this)
3817# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3818#   (If you expect perfect errno behavior, do not use this)
3819#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3820
3821    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3822    # Bug?
3823    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3824    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3825    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3826    #fi
3827
3828
3829
3830
3831
3832# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3833#                                   [RUN-IF-FALSE])
3834# ------------------------------------------------------------
3835# Check that the c and c++ compilers support an argument
3836
3837
3838# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839#                                    [RUN-IF-FALSE])
3840# ------------------------------------------------------------
3841# Check that the linker support an argument
3842
3843
3844
3845
3846#
3847# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3848# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3849#
3850# This code is free software; you can redistribute it and/or modify it
3851# under the terms of the GNU General Public License version 2 only, as
3852# published by the Free Software Foundation.  Oracle designates this
3853# particular file as subject to the "Classpath" exception as provided
3854# by Oracle in the LICENSE file that accompanied this code.
3855#
3856# This code is distributed in the hope that it will be useful, but WITHOUT
3857# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3858# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3859# version 2 for more details (a copy is included in the LICENSE file that
3860# accompanied this code).
3861#
3862# You should have received a copy of the GNU General Public License version
3863# 2 along with this work; if not, write to the Free Software Foundation,
3864# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3865#
3866# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3867# or visit www.oracle.com if you need additional information or have any
3868# questions.
3869#
3870
3871
3872
3873
3874
3875cygwin_help() {
3876  case $1 in
3877    unzip)
3878      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3880      ;;
3881    zip)
3882      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3883      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3884      ;;
3885    make)
3886      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888      ;;
3889    freetype)
3890      HELP_MSG="
3891The freetype library can now be build during the configure process.
3892Download the freetype sources and unpack them into an arbitrary directory:
3893
3894wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3895tar -xzf freetype-2.5.3.tar.gz
3896
3897Then run configure with '--with-freetype-src=<freetype_src>'. This will
3898automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3899builds or into '<freetype_src>/lib32' for 32-bit builds.
3900Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3901and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3902      ;;
3903  esac
3904}
3905
3906msys_help() {
3907  PKGHANDLER_COMMAND=""
3908}
3909
3910apt_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3928  esac
3929}
3930
3931yum_help() {
3932  case $1 in
3933    devkit)
3934      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3935    openjdk)
3936      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3937    alsa)
3938      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3939    cups)
3940      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3941    freetype)
3942      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3943    pulse)
3944      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3945    x11)
3946      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3947    ccache)
3948      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3949  esac
3950}
3951
3952port_help() {
3953  PKGHANDLER_COMMAND=""
3954}
3955
3956pkgutil_help() {
3957  PKGHANDLER_COMMAND=""
3958}
3959
3960pkgadd_help() {
3961  PKGHANDLER_COMMAND=""
3962}
3963
3964# This function will check if we're called from the "configure" wrapper while
3965# printing --help. If so, we will print out additional information that can
3966# only be extracted within the autoconf script, and then exit. This must be
3967# called at the very beginning in configure.ac.
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008###############################################################################
4009#
4010# Should we build only OpenJDK even if closed sources are present?
4011#
4012
4013
4014
4015
4016###############################################################################
4017#
4018# Setup version numbers
4019#
4020
4021
4022
4023
4024
4025
4026#
4027# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4028# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4029#
4030# This code is free software; you can redistribute it and/or modify it
4031# under the terms of the GNU General Public License version 2 only, as
4032# published by the Free Software Foundation.  Oracle designates this
4033# particular file as subject to the "Classpath" exception as provided
4034# by Oracle in the LICENSE file that accompanied this code.
4035#
4036# This code is distributed in the hope that it will be useful, but WITHOUT
4037# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4038# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4039# version 2 for more details (a copy is included in the LICENSE file that
4040# accompanied this code).
4041#
4042# You should have received a copy of the GNU General Public License version
4043# 2 along with this work; if not, write to the Free Software Foundation,
4044# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4045#
4046# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4047# or visit www.oracle.com if you need additional information or have any
4048# questions.
4049#
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071#
4072# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4073# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4074#
4075# This code is free software; you can redistribute it and/or modify it
4076# under the terms of the GNU General Public License version 2 only, as
4077# published by the Free Software Foundation.  Oracle designates this
4078# particular file as subject to the "Classpath" exception as provided
4079# by Oracle in the LICENSE file that accompanied this code.
4080#
4081# This code is distributed in the hope that it will be useful, but WITHOUT
4082# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4083# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4084# version 2 for more details (a copy is included in the LICENSE file that
4085# accompanied this code).
4086#
4087# You should have received a copy of the GNU General Public License version
4088# 2 along with this work; if not, write to the Free Software Foundation,
4089# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4090#
4091# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4092# or visit www.oracle.com if you need additional information or have any
4093# questions.
4094#
4095
4096# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4097# Converts autoconf style CPU name to OpenJDK style, into
4098# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4099
4100
4101# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4102# Converts autoconf style OS name to OpenJDK style, into
4103# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4104
4105
4106# Expects $host_os $host_cpu $build_os and $build_cpu
4107# and $with_target_bits to have been setup!
4108#
4109# Translate the standard triplet(quadruplet) definition
4110# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4111# OPENJDK_BUILD_OS, etc.
4112
4113
4114# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4115# accordingly. Must be done after setting up build and target system, but before
4116# doing anything else with these values.
4117
4118
4119# Setup the legacy variables, for controlling the old makefiles.
4120#
4121
4122
4123
4124
4125#%%% Build and target systems %%%
4126
4127
4128
4129
4130# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4131# Add -mX to various FLAGS variables.
4132
4133
4134
4135
4136
4137
4138#
4139# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4140# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4141#
4142# This code is free software; you can redistribute it and/or modify it
4143# under the terms of the GNU General Public License version 2 only, as
4144# published by the Free Software Foundation.  Oracle designates this
4145# particular file as subject to the "Classpath" exception as provided
4146# by Oracle in the LICENSE file that accompanied this code.
4147#
4148# This code is distributed in the hope that it will be useful, but WITHOUT
4149# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4150# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4151# version 2 for more details (a copy is included in the LICENSE file that
4152# accompanied this code).
4153#
4154# You should have received a copy of the GNU General Public License version
4155# 2 along with this work; if not, write to the Free Software Foundation,
4156# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4157#
4158# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4159# or visit www.oracle.com if you need additional information or have any
4160# questions.
4161#
4162
4163
4164
4165
4166
4167
4168
4169
4170#
4171# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4172# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4173#
4174# This code is free software; you can redistribute it and/or modify it
4175# under the terms of the GNU General Public License version 2 only, as
4176# published by the Free Software Foundation.  Oracle designates this
4177# particular file as subject to the "Classpath" exception as provided
4178# by Oracle in the LICENSE file that accompanied this code.
4179#
4180# This code is distributed in the hope that it will be useful, but WITHOUT
4181# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4182# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4183# version 2 for more details (a copy is included in the LICENSE file that
4184# accompanied this code).
4185#
4186# You should have received a copy of the GNU General Public License version
4187# 2 along with this work; if not, write to the Free Software Foundation,
4188# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4189#
4190# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4191# or visit www.oracle.com if you need additional information or have any
4192# questions.
4193#
4194
4195########################################################################
4196# This file is responsible for detecting, verifying and setting up the
4197# toolchain, i.e. the compiler, linker and related utilities. It will setup
4198# proper paths to the binaries, but it will not setup any flags.
4199#
4200# The binaries used is determined by the toolchain type, which is the family of
4201# compilers and related tools that are used.
4202########################################################################
4203
4204
4205# All valid toolchains, regardless of platform (used by help.m4)
4206VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4207
4208# These toolchains are valid on different platforms
4209VALID_TOOLCHAINS_linux="gcc clang"
4210VALID_TOOLCHAINS_solaris="solstudio"
4211VALID_TOOLCHAINS_macosx="gcc clang"
4212VALID_TOOLCHAINS_aix="xlc"
4213VALID_TOOLCHAINS_windows="microsoft"
4214
4215# Toolchain descriptions
4216TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4217TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4218TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4219TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4220TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4221
4222# Setup a number of variables describing how native output files are
4223# named on this platform/toolchain.
4224
4225
4226# Determine which toolchain type to use, and make sure it is valid for this
4227# platform. Setup various information about the selected toolchain.
4228
4229
4230# Before we start detecting the toolchain executables, we might need some
4231# special setup, e.g. additional paths etc.
4232
4233
4234# Restore path, etc
4235
4236
4237# Check if a compiler is of the toolchain type we expect, and save the version
4238# information from it. If the compiler does not match the expected type,
4239# this function will abort using AC_MSG_ERROR. If it matches, the version will
4240# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4241# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4242#
4243# $1 = compiler to test (CC or CXX)
4244# $2 = human readable name of compiler (C or C++)
4245
4246
4247# Try to locate the given C or C++ compiler in the path, or otherwise.
4248#
4249# $1 = compiler to test (CC or CXX)
4250# $2 = human readable name of compiler (C or C++)
4251# $3 = list of compiler names to search for
4252
4253
4254# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4255# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4256# archiver (AR). Verify that the compilers are correct according to the
4257# toolchain type.
4258
4259
4260# Setup additional tools that is considered a part of the toolchain, but not the
4261# core part. Many of these are highly platform-specific and do not exist,
4262# and/or are not needed on all platforms.
4263
4264
4265# Setup the build tools (i.e, the compiler and linker used to build programs
4266# that should be run on the build platform, not the target platform, as a build
4267# helper). Since the non-cross-compile case uses the normal, target compilers
4268# for this, we can only do this after these have been setup.
4269
4270
4271# Setup legacy variables that are still needed as alternative ways to refer to
4272# parts of the toolchain.
4273
4274
4275# Do some additional checks on the detected tools.
4276
4277
4278# Setup the JTReg Regression Test Harness.
4279
4280
4281#
4282# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4283# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4284#
4285# This code is free software; you can redistribute it and/or modify it
4286# under the terms of the GNU General Public License version 2 only, as
4287# published by the Free Software Foundation.  Oracle designates this
4288# particular file as subject to the "Classpath" exception as provided
4289# by Oracle in the LICENSE file that accompanied this code.
4290#
4291# This code is distributed in the hope that it will be useful, but WITHOUT
4292# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4293# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4294# version 2 for more details (a copy is included in the LICENSE file that
4295# accompanied this code).
4296#
4297# You should have received a copy of the GNU General Public License version
4298# 2 along with this work; if not, write to the Free Software Foundation,
4299# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4300#
4301# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4302# or visit www.oracle.com if you need additional information or have any
4303# questions.
4304#
4305
4306
4307
4308
4309
4310
4311
4312# Check if the VS env variables were setup prior to running configure.
4313# If not, then find vcvarsall.bat and run it automatically, and integrate
4314# the set env variables into the spec file.
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326# This line needs to be here, verbatim, after all includes and the dummy hook
4327# definitions. It is replaced with custom functionality when building
4328# custom sources.
4329#CUSTOM_AUTOCONF_INCLUDE
4330
4331# Do not change or remove the following line, it is needed for consistency checks:
4332DATE_WHEN_GENERATED=1421796117
4333
4334###############################################################################
4335#
4336# Initialization / Boot-strapping
4337#
4338# The bootstrapping process needs to solve the "chicken or the egg" problem,
4339# thus it jumps back and forth, each time gaining something needed later on.
4340#
4341###############################################################################
4342
4343# If we are requested to print additional help, do that and then exit.
4344# This must be the very first call.
4345
4346  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4347    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4348    $PRINTF "Which are valid to use depends on the build platform.\n"
4349    for toolchain in $VALID_TOOLCHAINS_all; do
4350      # Use indirect variable referencing
4351      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4352      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4353      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4354    done
4355
4356    # And now exit directly
4357    exit 0
4358  fi
4359
4360
4361# Basic initialization that must happen first of all in the normal process.
4362
4363  # Save the original command line. This is passed to us by the wrapper configure script.
4364
4365  DATE_WHEN_CONFIGURED=`LANG=C date`
4366
4367  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4368$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4369  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4370$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4371
4372
4373  # Start with tools that do not need have cross compilation support
4374  # and can be expected to be found in the default PATH. These tools are
4375  # used by configure. Nor are these tools expected to be found in the
4376  # devkit from the builddeps server either, since they are
4377  # needed to download the devkit.
4378
4379  # First are all the simple required tools.
4380
4381
4382
4383  # Publish this variable in the help.
4384
4385
4386  if test "x$BASENAME" = x; then
4387    # The variable is not set by user, try to locate tool using the code snippet
4388    for ac_prog in basename
4389do
4390  # Extract the first word of "$ac_prog", so it can be a program name with args.
4391set dummy $ac_prog; ac_word=$2
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393$as_echo_n "checking for $ac_word... " >&6; }
4394if ${ac_cv_path_BASENAME+:} false; then :
4395  $as_echo_n "(cached) " >&6
4396else
4397  case $BASENAME in
4398  [\\/]* | ?:[\\/]*)
4399  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4400  ;;
4401  *)
4402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405  IFS=$as_save_IFS
4406  test -z "$as_dir" && as_dir=.
4407    for ac_exec_ext in '' $ac_executable_extensions; do
4408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411    break 2
4412  fi
4413done
4414  done
4415IFS=$as_save_IFS
4416
4417  ;;
4418esac
4419fi
4420BASENAME=$ac_cv_path_BASENAME
4421if test -n "$BASENAME"; then
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4423$as_echo "$BASENAME" >&6; }
4424else
4425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426$as_echo "no" >&6; }
4427fi
4428
4429
4430  test -n "$BASENAME" && break
4431done
4432
4433  else
4434    # The variable is set, but is it from the command line or the environment?
4435
4436    # Try to remove the string !BASENAME! from our list.
4437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4439      # If it failed, the variable was not from the command line. Ignore it,
4440      # but warn the user (except for BASH, which is always set by the calling BASH).
4441      if test "xBASENAME" != xBASH; then
4442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4443$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4444      fi
4445      # Try to locate tool using the code snippet
4446      for ac_prog in basename
4447do
4448  # Extract the first word of "$ac_prog", so it can be a program name with args.
4449set dummy $ac_prog; ac_word=$2
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451$as_echo_n "checking for $ac_word... " >&6; }
4452if ${ac_cv_path_BASENAME+:} false; then :
4453  $as_echo_n "(cached) " >&6
4454else
4455  case $BASENAME in
4456  [\\/]* | ?:[\\/]*)
4457  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4458  ;;
4459  *)
4460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH
4462do
4463  IFS=$as_save_IFS
4464  test -z "$as_dir" && as_dir=.
4465    for ac_exec_ext in '' $ac_executable_extensions; do
4466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469    break 2
4470  fi
4471done
4472  done
4473IFS=$as_save_IFS
4474
4475  ;;
4476esac
4477fi
4478BASENAME=$ac_cv_path_BASENAME
4479if test -n "$BASENAME"; then
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4481$as_echo "$BASENAME" >&6; }
4482else
4483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484$as_echo "no" >&6; }
4485fi
4486
4487
4488  test -n "$BASENAME" && break
4489done
4490
4491    else
4492      # If it succeeded, then it was overridden by the user. We will use it
4493      # for the tool.
4494
4495      # First remove it from the list of overridden variables, so we can test
4496      # for unknown variables in the end.
4497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4498
4499      # Check if the provided tool contains a complete path.
4500      tool_specified="$BASENAME"
4501      tool_basename="${tool_specified##*/}"
4502      if test "x$tool_basename" = "x$tool_specified"; then
4503        # A command without a complete path is provided, search $PATH.
4504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4505$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4506        # Extract the first word of "$tool_basename", so it can be a program name with args.
4507set dummy $tool_basename; ac_word=$2
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509$as_echo_n "checking for $ac_word... " >&6; }
4510if ${ac_cv_path_BASENAME+:} false; then :
4511  $as_echo_n "(cached) " >&6
4512else
4513  case $BASENAME in
4514  [\\/]* | ?:[\\/]*)
4515  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4516  ;;
4517  *)
4518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521  IFS=$as_save_IFS
4522  test -z "$as_dir" && as_dir=.
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527    break 2
4528  fi
4529done
4530  done
4531IFS=$as_save_IFS
4532
4533  ;;
4534esac
4535fi
4536BASENAME=$ac_cv_path_BASENAME
4537if test -n "$BASENAME"; then
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4539$as_echo "$BASENAME" >&6; }
4540else
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543fi
4544
4545
4546        if test "x$BASENAME" = x; then
4547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4548        fi
4549      else
4550        # Otherwise we believe it is a complete path. Use it as it is.
4551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4552$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4554$as_echo_n "checking for BASENAME... " >&6; }
4555        if test ! -x "$tool_specified"; then
4556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4557$as_echo "not found" >&6; }
4558          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4559        fi
4560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4561$as_echo "$tool_specified" >&6; }
4562      fi
4563    fi
4564  fi
4565
4566
4567
4568  if test "x$BASENAME" = x; then
4569    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4570  fi
4571
4572
4573
4574
4575
4576  # Publish this variable in the help.
4577
4578
4579  if test "x$BASH" = x; then
4580    # The variable is not set by user, try to locate tool using the code snippet
4581    for ac_prog in bash
4582do
4583  # Extract the first word of "$ac_prog", so it can be a program name with args.
4584set dummy $ac_prog; ac_word=$2
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if ${ac_cv_path_BASH+:} false; then :
4588  $as_echo_n "(cached) " >&6
4589else
4590  case $BASH in
4591  [\\/]* | ?:[\\/]*)
4592  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4593  ;;
4594  *)
4595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598  IFS=$as_save_IFS
4599  test -z "$as_dir" && as_dir=.
4600    for ac_exec_ext in '' $ac_executable_extensions; do
4601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4602    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604    break 2
4605  fi
4606done
4607  done
4608IFS=$as_save_IFS
4609
4610  ;;
4611esac
4612fi
4613BASH=$ac_cv_path_BASH
4614if test -n "$BASH"; then
4615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4616$as_echo "$BASH" >&6; }
4617else
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
4620fi
4621
4622
4623  test -n "$BASH" && break
4624done
4625
4626  else
4627    # The variable is set, but is it from the command line or the environment?
4628
4629    # Try to remove the string !BASH! from our list.
4630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4632      # If it failed, the variable was not from the command line. Ignore it,
4633      # but warn the user (except for BASH, which is always set by the calling BASH).
4634      if test "xBASH" != xBASH; then
4635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4636$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4637      fi
4638      # Try to locate tool using the code snippet
4639      for ac_prog in bash
4640do
4641  # Extract the first word of "$ac_prog", so it can be a program name with args.
4642set dummy $ac_prog; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_BASH+:} false; then :
4646  $as_echo_n "(cached) " >&6
4647else
4648  case $BASH in
4649  [\\/]* | ?:[\\/]*)
4650  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4651  ;;
4652  *)
4653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in $PATH
4655do
4656  IFS=$as_save_IFS
4657  test -z "$as_dir" && as_dir=.
4658    for ac_exec_ext in '' $ac_executable_extensions; do
4659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662    break 2
4663  fi
4664done
4665  done
4666IFS=$as_save_IFS
4667
4668  ;;
4669esac
4670fi
4671BASH=$ac_cv_path_BASH
4672if test -n "$BASH"; then
4673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4674$as_echo "$BASH" >&6; }
4675else
4676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681  test -n "$BASH" && break
4682done
4683
4684    else
4685      # If it succeeded, then it was overridden by the user. We will use it
4686      # for the tool.
4687
4688      # First remove it from the list of overridden variables, so we can test
4689      # for unknown variables in the end.
4690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4691
4692      # Check if the provided tool contains a complete path.
4693      tool_specified="$BASH"
4694      tool_basename="${tool_specified##*/}"
4695      if test "x$tool_basename" = "x$tool_specified"; then
4696        # A command without a complete path is provided, search $PATH.
4697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4698$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4699        # Extract the first word of "$tool_basename", so it can be a program name with args.
4700set dummy $tool_basename; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_BASH+:} false; then :
4704  $as_echo_n "(cached) " >&6
4705else
4706  case $BASH in
4707  [\\/]* | ?:[\\/]*)
4708  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4709  ;;
4710  *)
4711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in $PATH
4713do
4714  IFS=$as_save_IFS
4715  test -z "$as_dir" && as_dir=.
4716    for ac_exec_ext in '' $ac_executable_extensions; do
4717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720    break 2
4721  fi
4722done
4723  done
4724IFS=$as_save_IFS
4725
4726  ;;
4727esac
4728fi
4729BASH=$ac_cv_path_BASH
4730if test -n "$BASH"; then
4731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4732$as_echo "$BASH" >&6; }
4733else
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739        if test "x$BASH" = x; then
4740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4741        fi
4742      else
4743        # Otherwise we believe it is a complete path. Use it as it is.
4744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4745$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4747$as_echo_n "checking for BASH... " >&6; }
4748        if test ! -x "$tool_specified"; then
4749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4750$as_echo "not found" >&6; }
4751          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4752        fi
4753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4754$as_echo "$tool_specified" >&6; }
4755      fi
4756    fi
4757  fi
4758
4759
4760
4761  if test "x$BASH" = x; then
4762    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4763  fi
4764
4765
4766
4767
4768
4769  # Publish this variable in the help.
4770
4771
4772  if test "x$CAT" = x; then
4773    # The variable is not set by user, try to locate tool using the code snippet
4774    for ac_prog in cat
4775do
4776  # Extract the first word of "$ac_prog", so it can be a program name with args.
4777set dummy $ac_prog; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
4780if ${ac_cv_path_CAT+:} false; then :
4781  $as_echo_n "(cached) " >&6
4782else
4783  case $CAT in
4784  [\\/]* | ?:[\\/]*)
4785  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4786  ;;
4787  *)
4788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in $PATH
4790do
4791  IFS=$as_save_IFS
4792  test -z "$as_dir" && as_dir=.
4793    for ac_exec_ext in '' $ac_executable_extensions; do
4794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4795    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797    break 2
4798  fi
4799done
4800  done
4801IFS=$as_save_IFS
4802
4803  ;;
4804esac
4805fi
4806CAT=$ac_cv_path_CAT
4807if test -n "$CAT"; then
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4809$as_echo "$CAT" >&6; }
4810else
4811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
4813fi
4814
4815
4816  test -n "$CAT" && break
4817done
4818
4819  else
4820    # The variable is set, but is it from the command line or the environment?
4821
4822    # Try to remove the string !CAT! from our list.
4823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4825      # If it failed, the variable was not from the command line. Ignore it,
4826      # but warn the user (except for BASH, which is always set by the calling BASH).
4827      if test "xCAT" != xBASH; then
4828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4829$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4830      fi
4831      # Try to locate tool using the code snippet
4832      for ac_prog in cat
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if ${ac_cv_path_CAT+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $CAT in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864CAT=$ac_cv_path_CAT
4865if test -n "$CAT"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4867$as_echo "$CAT" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$CAT" && break
4875done
4876
4877    else
4878      # If it succeeded, then it was overridden by the user. We will use it
4879      # for the tool.
4880
4881      # First remove it from the list of overridden variables, so we can test
4882      # for unknown variables in the end.
4883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4884
4885      # Check if the provided tool contains a complete path.
4886      tool_specified="$CAT"
4887      tool_basename="${tool_specified##*/}"
4888      if test "x$tool_basename" = "x$tool_specified"; then
4889        # A command without a complete path is provided, search $PATH.
4890        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4891$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4892        # Extract the first word of "$tool_basename", so it can be a program name with args.
4893set dummy $tool_basename; ac_word=$2
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; }
4896if ${ac_cv_path_CAT+:} false; then :
4897  $as_echo_n "(cached) " >&6
4898else
4899  case $CAT in
4900  [\\/]* | ?:[\\/]*)
4901  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4902  ;;
4903  *)
4904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907  IFS=$as_save_IFS
4908  test -z "$as_dir" && as_dir=.
4909    for ac_exec_ext in '' $ac_executable_extensions; do
4910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4911    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913    break 2
4914  fi
4915done
4916  done
4917IFS=$as_save_IFS
4918
4919  ;;
4920esac
4921fi
4922CAT=$ac_cv_path_CAT
4923if test -n "$CAT"; then
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4925$as_echo "$CAT" >&6; }
4926else
4927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
4931
4932        if test "x$CAT" = x; then
4933          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4934        fi
4935      else
4936        # Otherwise we believe it is a complete path. Use it as it is.
4937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4938$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4940$as_echo_n "checking for CAT... " >&6; }
4941        if test ! -x "$tool_specified"; then
4942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4943$as_echo "not found" >&6; }
4944          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4945        fi
4946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4947$as_echo "$tool_specified" >&6; }
4948      fi
4949    fi
4950  fi
4951
4952
4953
4954  if test "x$CAT" = x; then
4955    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4956  fi
4957
4958
4959
4960
4961
4962  # Publish this variable in the help.
4963
4964
4965  if test "x$CHMOD" = x; then
4966    # The variable is not set by user, try to locate tool using the code snippet
4967    for ac_prog in chmod
4968do
4969  # Extract the first word of "$ac_prog", so it can be a program name with args.
4970set dummy $ac_prog; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_CHMOD+:} false; then :
4974  $as_echo_n "(cached) " >&6
4975else
4976  case $CHMOD in
4977  [\\/]* | ?:[\\/]*)
4978  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4979  ;;
4980  *)
4981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984  IFS=$as_save_IFS
4985  test -z "$as_dir" && as_dir=.
4986    for ac_exec_ext in '' $ac_executable_extensions; do
4987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990    break 2
4991  fi
4992done
4993  done
4994IFS=$as_save_IFS
4995
4996  ;;
4997esac
4998fi
4999CHMOD=$ac_cv_path_CHMOD
5000if test -n "$CHMOD"; then
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5002$as_echo "$CHMOD" >&6; }
5003else
5004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008
5009  test -n "$CHMOD" && break
5010done
5011
5012  else
5013    # The variable is set, but is it from the command line or the environment?
5014
5015    # Try to remove the string !CHMOD! from our list.
5016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5018      # If it failed, the variable was not from the command line. Ignore it,
5019      # but warn the user (except for BASH, which is always set by the calling BASH).
5020      if test "xCHMOD" != xBASH; then
5021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5022$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5023      fi
5024      # Try to locate tool using the code snippet
5025      for ac_prog in chmod
5026do
5027  # Extract the first word of "$ac_prog", so it can be a program name with args.
5028set dummy $ac_prog; ac_word=$2
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_path_CHMOD+:} false; then :
5032  $as_echo_n "(cached) " >&6
5033else
5034  case $CHMOD in
5035  [\\/]* | ?:[\\/]*)
5036  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5037  ;;
5038  *)
5039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042  IFS=$as_save_IFS
5043  test -z "$as_dir" && as_dir=.
5044    for ac_exec_ext in '' $ac_executable_extensions; do
5045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048    break 2
5049  fi
5050done
5051  done
5052IFS=$as_save_IFS
5053
5054  ;;
5055esac
5056fi
5057CHMOD=$ac_cv_path_CHMOD
5058if test -n "$CHMOD"; then
5059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5060$as_echo "$CHMOD" >&6; }
5061else
5062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
5064fi
5065
5066
5067  test -n "$CHMOD" && break
5068done
5069
5070    else
5071      # If it succeeded, then it was overridden by the user. We will use it
5072      # for the tool.
5073
5074      # First remove it from the list of overridden variables, so we can test
5075      # for unknown variables in the end.
5076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5077
5078      # Check if the provided tool contains a complete path.
5079      tool_specified="$CHMOD"
5080      tool_basename="${tool_specified##*/}"
5081      if test "x$tool_basename" = "x$tool_specified"; then
5082        # A command without a complete path is provided, search $PATH.
5083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5084$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5085        # Extract the first word of "$tool_basename", so it can be a program name with args.
5086set dummy $tool_basename; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if ${ac_cv_path_CHMOD+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092  case $CHMOD in
5093  [\\/]* | ?:[\\/]*)
5094  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5095  ;;
5096  *)
5097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100  IFS=$as_save_IFS
5101  test -z "$as_dir" && as_dir=.
5102    for ac_exec_ext in '' $ac_executable_extensions; do
5103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106    break 2
5107  fi
5108done
5109  done
5110IFS=$as_save_IFS
5111
5112  ;;
5113esac
5114fi
5115CHMOD=$ac_cv_path_CHMOD
5116if test -n "$CHMOD"; then
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5118$as_echo "$CHMOD" >&6; }
5119else
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125        if test "x$CHMOD" = x; then
5126          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5127        fi
5128      else
5129        # Otherwise we believe it is a complete path. Use it as it is.
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5131$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5133$as_echo_n "checking for CHMOD... " >&6; }
5134        if test ! -x "$tool_specified"; then
5135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5136$as_echo "not found" >&6; }
5137          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5138        fi
5139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5140$as_echo "$tool_specified" >&6; }
5141      fi
5142    fi
5143  fi
5144
5145
5146
5147  if test "x$CHMOD" = x; then
5148    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5149  fi
5150
5151
5152
5153
5154
5155  # Publish this variable in the help.
5156
5157
5158  if test "x$CMP" = x; then
5159    # The variable is not set by user, try to locate tool using the code snippet
5160    for ac_prog in cmp
5161do
5162  # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
5166if ${ac_cv_path_CMP+:} false; then :
5167  $as_echo_n "(cached) " >&6
5168else
5169  case $CMP in
5170  [\\/]* | ?:[\\/]*)
5171  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5172  ;;
5173  *)
5174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175for as_dir in $PATH
5176do
5177  IFS=$as_save_IFS
5178  test -z "$as_dir" && as_dir=.
5179    for ac_exec_ext in '' $ac_executable_extensions; do
5180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5181    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5183    break 2
5184  fi
5185done
5186  done
5187IFS=$as_save_IFS
5188
5189  ;;
5190esac
5191fi
5192CMP=$ac_cv_path_CMP
5193if test -n "$CMP"; then
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5195$as_echo "$CMP" >&6; }
5196else
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198$as_echo "no" >&6; }
5199fi
5200
5201
5202  test -n "$CMP" && break
5203done
5204
5205  else
5206    # The variable is set, but is it from the command line or the environment?
5207
5208    # Try to remove the string !CMP! from our list.
5209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5211      # If it failed, the variable was not from the command line. Ignore it,
5212      # but warn the user (except for BASH, which is always set by the calling BASH).
5213      if test "xCMP" != xBASH; then
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5215$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5216      fi
5217      # Try to locate tool using the code snippet
5218      for ac_prog in cmp
5219do
5220  # Extract the first word of "$ac_prog", so it can be a program name with args.
5221set dummy $ac_prog; ac_word=$2
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
5224if ${ac_cv_path_CMP+:} false; then :
5225  $as_echo_n "(cached) " >&6
5226else
5227  case $CMP in
5228  [\\/]* | ?:[\\/]*)
5229  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5230  ;;
5231  *)
5232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233for as_dir in $PATH
5234do
5235  IFS=$as_save_IFS
5236  test -z "$as_dir" && as_dir=.
5237    for ac_exec_ext in '' $ac_executable_extensions; do
5238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241    break 2
5242  fi
5243done
5244  done
5245IFS=$as_save_IFS
5246
5247  ;;
5248esac
5249fi
5250CMP=$ac_cv_path_CMP
5251if test -n "$CMP"; then
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5253$as_echo "$CMP" >&6; }
5254else
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256$as_echo "no" >&6; }
5257fi
5258
5259
5260  test -n "$CMP" && break
5261done
5262
5263    else
5264      # If it succeeded, then it was overridden by the user. We will use it
5265      # for the tool.
5266
5267      # First remove it from the list of overridden variables, so we can test
5268      # for unknown variables in the end.
5269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5270
5271      # Check if the provided tool contains a complete path.
5272      tool_specified="$CMP"
5273      tool_basename="${tool_specified##*/}"
5274      if test "x$tool_basename" = "x$tool_specified"; then
5275        # A command without a complete path is provided, search $PATH.
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5277$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5278        # Extract the first word of "$tool_basename", so it can be a program name with args.
5279set dummy $tool_basename; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_CMP+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $CMP in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308CMP=$ac_cv_path_CMP
5309if test -n "$CMP"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5311$as_echo "$CMP" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318        if test "x$CMP" = x; then
5319          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320        fi
5321      else
5322        # Otherwise we believe it is a complete path. Use it as it is.
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5324$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5326$as_echo_n "checking for CMP... " >&6; }
5327        if test ! -x "$tool_specified"; then
5328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329$as_echo "not found" >&6; }
5330          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5331        fi
5332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333$as_echo "$tool_specified" >&6; }
5334      fi
5335    fi
5336  fi
5337
5338
5339
5340  if test "x$CMP" = x; then
5341    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5342  fi
5343
5344
5345
5346
5347
5348  # Publish this variable in the help.
5349
5350
5351  if test "x$COMM" = x; then
5352    # The variable is not set by user, try to locate tool using the code snippet
5353    for ac_prog in comm
5354do
5355  # Extract the first word of "$ac_prog", so it can be a program name with args.
5356set dummy $ac_prog; ac_word=$2
5357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5358$as_echo_n "checking for $ac_word... " >&6; }
5359if ${ac_cv_path_COMM+:} false; then :
5360  $as_echo_n "(cached) " >&6
5361else
5362  case $COMM in
5363  [\\/]* | ?:[\\/]*)
5364  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5365  ;;
5366  *)
5367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368for as_dir in $PATH
5369do
5370  IFS=$as_save_IFS
5371  test -z "$as_dir" && as_dir=.
5372    for ac_exec_ext in '' $ac_executable_extensions; do
5373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5374    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5376    break 2
5377  fi
5378done
5379  done
5380IFS=$as_save_IFS
5381
5382  ;;
5383esac
5384fi
5385COMM=$ac_cv_path_COMM
5386if test -n "$COMM"; then
5387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5388$as_echo "$COMM" >&6; }
5389else
5390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393
5394
5395  test -n "$COMM" && break
5396done
5397
5398  else
5399    # The variable is set, but is it from the command line or the environment?
5400
5401    # Try to remove the string !COMM! from our list.
5402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5404      # If it failed, the variable was not from the command line. Ignore it,
5405      # but warn the user (except for BASH, which is always set by the calling BASH).
5406      if test "xCOMM" != xBASH; then
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5408$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5409      fi
5410      # Try to locate tool using the code snippet
5411      for ac_prog in comm
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if ${ac_cv_path_COMM+:} false; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $COMM in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5432    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443COMM=$ac_cv_path_COMM
5444if test -n "$COMM"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5446$as_echo "$COMM" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$COMM" && break
5454done
5455
5456    else
5457      # If it succeeded, then it was overridden by the user. We will use it
5458      # for the tool.
5459
5460      # First remove it from the list of overridden variables, so we can test
5461      # for unknown variables in the end.
5462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5463
5464      # Check if the provided tool contains a complete path.
5465      tool_specified="$COMM"
5466      tool_basename="${tool_specified##*/}"
5467      if test "x$tool_basename" = "x$tool_specified"; then
5468        # A command without a complete path is provided, search $PATH.
5469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5470$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5471        # Extract the first word of "$tool_basename", so it can be a program name with args.
5472set dummy $tool_basename; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if ${ac_cv_path_COMM+:} false; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $COMM in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501COMM=$ac_cv_path_COMM
5502if test -n "$COMM"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5504$as_echo "$COMM" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511        if test "x$COMM" = x; then
5512          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5513        fi
5514      else
5515        # Otherwise we believe it is a complete path. Use it as it is.
5516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5517$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5519$as_echo_n "checking for COMM... " >&6; }
5520        if test ! -x "$tool_specified"; then
5521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5522$as_echo "not found" >&6; }
5523          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5524        fi
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5526$as_echo "$tool_specified" >&6; }
5527      fi
5528    fi
5529  fi
5530
5531
5532
5533  if test "x$COMM" = x; then
5534    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5535  fi
5536
5537
5538
5539
5540
5541  # Publish this variable in the help.
5542
5543
5544  if test "x$CP" = x; then
5545    # The variable is not set by user, try to locate tool using the code snippet
5546    for ac_prog in cp
5547do
5548  # Extract the first word of "$ac_prog", so it can be a program name with args.
5549set dummy $ac_prog; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_CP+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $CP in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578CP=$ac_cv_path_CP
5579if test -n "$CP"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5581$as_echo "$CP" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588  test -n "$CP" && break
5589done
5590
5591  else
5592    # The variable is set, but is it from the command line or the environment?
5593
5594    # Try to remove the string !CP! from our list.
5595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5597      # If it failed, the variable was not from the command line. Ignore it,
5598      # but warn the user (except for BASH, which is always set by the calling BASH).
5599      if test "xCP" != xBASH; then
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5601$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5602      fi
5603      # Try to locate tool using the code snippet
5604      for ac_prog in cp
5605do
5606  # Extract the first word of "$ac_prog", so it can be a program name with args.
5607set dummy $ac_prog; ac_word=$2
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609$as_echo_n "checking for $ac_word... " >&6; }
5610if ${ac_cv_path_CP+:} false; then :
5611  $as_echo_n "(cached) " >&6
5612else
5613  case $CP in
5614  [\\/]* | ?:[\\/]*)
5615  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5616  ;;
5617  *)
5618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621  IFS=$as_save_IFS
5622  test -z "$as_dir" && as_dir=.
5623    for ac_exec_ext in '' $ac_executable_extensions; do
5624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5625    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627    break 2
5628  fi
5629done
5630  done
5631IFS=$as_save_IFS
5632
5633  ;;
5634esac
5635fi
5636CP=$ac_cv_path_CP
5637if test -n "$CP"; then
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5639$as_echo "$CP" >&6; }
5640else
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
5643fi
5644
5645
5646  test -n "$CP" && break
5647done
5648
5649    else
5650      # If it succeeded, then it was overridden by the user. We will use it
5651      # for the tool.
5652
5653      # First remove it from the list of overridden variables, so we can test
5654      # for unknown variables in the end.
5655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5656
5657      # Check if the provided tool contains a complete path.
5658      tool_specified="$CP"
5659      tool_basename="${tool_specified##*/}"
5660      if test "x$tool_basename" = "x$tool_specified"; then
5661        # A command without a complete path is provided, search $PATH.
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5663$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5664        # Extract the first word of "$tool_basename", so it can be a program name with args.
5665set dummy $tool_basename; ac_word=$2
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if ${ac_cv_path_CP+:} false; then :
5669  $as_echo_n "(cached) " >&6
5670else
5671  case $CP in
5672  [\\/]* | ?:[\\/]*)
5673  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5674  ;;
5675  *)
5676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679  IFS=$as_save_IFS
5680  test -z "$as_dir" && as_dir=.
5681    for ac_exec_ext in '' $ac_executable_extensions; do
5682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5683    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685    break 2
5686  fi
5687done
5688  done
5689IFS=$as_save_IFS
5690
5691  ;;
5692esac
5693fi
5694CP=$ac_cv_path_CP
5695if test -n "$CP"; then
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5697$as_echo "$CP" >&6; }
5698else
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
5701fi
5702
5703
5704        if test "x$CP" = x; then
5705          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5706        fi
5707      else
5708        # Otherwise we believe it is a complete path. Use it as it is.
5709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5710$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5712$as_echo_n "checking for CP... " >&6; }
5713        if test ! -x "$tool_specified"; then
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5715$as_echo "not found" >&6; }
5716          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5717        fi
5718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5719$as_echo "$tool_specified" >&6; }
5720      fi
5721    fi
5722  fi
5723
5724
5725
5726  if test "x$CP" = x; then
5727    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5728  fi
5729
5730
5731
5732
5733
5734  # Publish this variable in the help.
5735
5736
5737  if test "x$CUT" = x; then
5738    # The variable is not set by user, try to locate tool using the code snippet
5739    for ac_prog in cut
5740do
5741  # Extract the first word of "$ac_prog", so it can be a program name with args.
5742set dummy $ac_prog; ac_word=$2
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5744$as_echo_n "checking for $ac_word... " >&6; }
5745if ${ac_cv_path_CUT+:} false; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748  case $CUT in
5749  [\\/]* | ?:[\\/]*)
5750  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5751  ;;
5752  *)
5753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5754for as_dir in $PATH
5755do
5756  IFS=$as_save_IFS
5757  test -z "$as_dir" && as_dir=.
5758    for ac_exec_ext in '' $ac_executable_extensions; do
5759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5760    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5762    break 2
5763  fi
5764done
5765  done
5766IFS=$as_save_IFS
5767
5768  ;;
5769esac
5770fi
5771CUT=$ac_cv_path_CUT
5772if test -n "$CUT"; then
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5774$as_echo "$CUT" >&6; }
5775else
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778fi
5779
5780
5781  test -n "$CUT" && break
5782done
5783
5784  else
5785    # The variable is set, but is it from the command line or the environment?
5786
5787    # Try to remove the string !CUT! from our list.
5788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5790      # If it failed, the variable was not from the command line. Ignore it,
5791      # but warn the user (except for BASH, which is always set by the calling BASH).
5792      if test "xCUT" != xBASH; then
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5794$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5795      fi
5796      # Try to locate tool using the code snippet
5797      for ac_prog in cut
5798do
5799  # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_path_CUT+:} false; then :
5804  $as_echo_n "(cached) " >&6
5805else
5806  case $CUT in
5807  [\\/]* | ?:[\\/]*)
5808  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5809  ;;
5810  *)
5811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814  IFS=$as_save_IFS
5815  test -z "$as_dir" && as_dir=.
5816    for ac_exec_ext in '' $ac_executable_extensions; do
5817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5818    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820    break 2
5821  fi
5822done
5823  done
5824IFS=$as_save_IFS
5825
5826  ;;
5827esac
5828fi
5829CUT=$ac_cv_path_CUT
5830if test -n "$CUT"; then
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5832$as_echo "$CUT" >&6; }
5833else
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839  test -n "$CUT" && break
5840done
5841
5842    else
5843      # If it succeeded, then it was overridden by the user. We will use it
5844      # for the tool.
5845
5846      # First remove it from the list of overridden variables, so we can test
5847      # for unknown variables in the end.
5848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5849
5850      # Check if the provided tool contains a complete path.
5851      tool_specified="$CUT"
5852      tool_basename="${tool_specified##*/}"
5853      if test "x$tool_basename" = "x$tool_specified"; then
5854        # A command without a complete path is provided, search $PATH.
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5856$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5857        # Extract the first word of "$tool_basename", so it can be a program name with args.
5858set dummy $tool_basename; ac_word=$2
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5860$as_echo_n "checking for $ac_word... " >&6; }
5861if ${ac_cv_path_CUT+:} false; then :
5862  $as_echo_n "(cached) " >&6
5863else
5864  case $CUT in
5865  [\\/]* | ?:[\\/]*)
5866  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5867  ;;
5868  *)
5869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870for as_dir in $PATH
5871do
5872  IFS=$as_save_IFS
5873  test -z "$as_dir" && as_dir=.
5874    for ac_exec_ext in '' $ac_executable_extensions; do
5875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878    break 2
5879  fi
5880done
5881  done
5882IFS=$as_save_IFS
5883
5884  ;;
5885esac
5886fi
5887CUT=$ac_cv_path_CUT
5888if test -n "$CUT"; then
5889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5890$as_echo "$CUT" >&6; }
5891else
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893$as_echo "no" >&6; }
5894fi
5895
5896
5897        if test "x$CUT" = x; then
5898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5899        fi
5900      else
5901        # Otherwise we believe it is a complete path. Use it as it is.
5902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5903$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5905$as_echo_n "checking for CUT... " >&6; }
5906        if test ! -x "$tool_specified"; then
5907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5908$as_echo "not found" >&6; }
5909          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5910        fi
5911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5912$as_echo "$tool_specified" >&6; }
5913      fi
5914    fi
5915  fi
5916
5917
5918
5919  if test "x$CUT" = x; then
5920    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5921  fi
5922
5923
5924
5925
5926
5927  # Publish this variable in the help.
5928
5929
5930  if test "x$DATE" = x; then
5931    # The variable is not set by user, try to locate tool using the code snippet
5932    for ac_prog in date
5933do
5934  # Extract the first word of "$ac_prog", so it can be a program name with args.
5935set dummy $ac_prog; ac_word=$2
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937$as_echo_n "checking for $ac_word... " >&6; }
5938if ${ac_cv_path_DATE+:} false; then :
5939  $as_echo_n "(cached) " >&6
5940else
5941  case $DATE in
5942  [\\/]* | ?:[\\/]*)
5943  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5944  ;;
5945  *)
5946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949  IFS=$as_save_IFS
5950  test -z "$as_dir" && as_dir=.
5951    for ac_exec_ext in '' $ac_executable_extensions; do
5952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955    break 2
5956  fi
5957done
5958  done
5959IFS=$as_save_IFS
5960
5961  ;;
5962esac
5963fi
5964DATE=$ac_cv_path_DATE
5965if test -n "$DATE"; then
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5967$as_echo "$DATE" >&6; }
5968else
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
5971fi
5972
5973
5974  test -n "$DATE" && break
5975done
5976
5977  else
5978    # The variable is set, but is it from the command line or the environment?
5979
5980    # Try to remove the string !DATE! from our list.
5981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5983      # If it failed, the variable was not from the command line. Ignore it,
5984      # but warn the user (except for BASH, which is always set by the calling BASH).
5985      if test "xDATE" != xBASH; then
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5987$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5988      fi
5989      # Try to locate tool using the code snippet
5990      for ac_prog in date
5991do
5992  # Extract the first word of "$ac_prog", so it can be a program name with args.
5993set dummy $ac_prog; ac_word=$2
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
5996if ${ac_cv_path_DATE+:} false; then :
5997  $as_echo_n "(cached) " >&6
5998else
5999  case $DATE in
6000  [\\/]* | ?:[\\/]*)
6001  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6002  ;;
6003  *)
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_exec_ext in '' $ac_executable_extensions; do
6010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013    break 2
6014  fi
6015done
6016  done
6017IFS=$as_save_IFS
6018
6019  ;;
6020esac
6021fi
6022DATE=$ac_cv_path_DATE
6023if test -n "$DATE"; then
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6025$as_echo "$DATE" >&6; }
6026else
6027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
6029fi
6030
6031
6032  test -n "$DATE" && break
6033done
6034
6035    else
6036      # If it succeeded, then it was overridden by the user. We will use it
6037      # for the tool.
6038
6039      # First remove it from the list of overridden variables, so we can test
6040      # for unknown variables in the end.
6041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6042
6043      # Check if the provided tool contains a complete path.
6044      tool_specified="$DATE"
6045      tool_basename="${tool_specified##*/}"
6046      if test "x$tool_basename" = "x$tool_specified"; then
6047        # A command without a complete path is provided, search $PATH.
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6049$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6050        # Extract the first word of "$tool_basename", so it can be a program name with args.
6051set dummy $tool_basename; ac_word=$2
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_path_DATE+:} false; then :
6055  $as_echo_n "(cached) " >&6
6056else
6057  case $DATE in
6058  [\\/]* | ?:[\\/]*)
6059  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6060  ;;
6061  *)
6062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065  IFS=$as_save_IFS
6066  test -z "$as_dir" && as_dir=.
6067    for ac_exec_ext in '' $ac_executable_extensions; do
6068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6069    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071    break 2
6072  fi
6073done
6074  done
6075IFS=$as_save_IFS
6076
6077  ;;
6078esac
6079fi
6080DATE=$ac_cv_path_DATE
6081if test -n "$DATE"; then
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6083$as_echo "$DATE" >&6; }
6084else
6085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087fi
6088
6089
6090        if test "x$DATE" = x; then
6091          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6092        fi
6093      else
6094        # Otherwise we believe it is a complete path. Use it as it is.
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6096$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6098$as_echo_n "checking for DATE... " >&6; }
6099        if test ! -x "$tool_specified"; then
6100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6101$as_echo "not found" >&6; }
6102          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6103        fi
6104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6105$as_echo "$tool_specified" >&6; }
6106      fi
6107    fi
6108  fi
6109
6110
6111
6112  if test "x$DATE" = x; then
6113    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6114  fi
6115
6116
6117
6118
6119
6120  # Publish this variable in the help.
6121
6122
6123  if test "x$DIFF" = x; then
6124    # The variable is not set by user, try to locate tool using the code snippet
6125    for ac_prog in gdiff diff
6126do
6127  # Extract the first word of "$ac_prog", so it can be a program name with args.
6128set dummy $ac_prog; ac_word=$2
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
6131if ${ac_cv_path_DIFF+:} false; then :
6132  $as_echo_n "(cached) " >&6
6133else
6134  case $DIFF in
6135  [\\/]* | ?:[\\/]*)
6136  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6137  ;;
6138  *)
6139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142  IFS=$as_save_IFS
6143  test -z "$as_dir" && as_dir=.
6144    for ac_exec_ext in '' $ac_executable_extensions; do
6145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6146    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6148    break 2
6149  fi
6150done
6151  done
6152IFS=$as_save_IFS
6153
6154  ;;
6155esac
6156fi
6157DIFF=$ac_cv_path_DIFF
6158if test -n "$DIFF"; then
6159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6160$as_echo "$DIFF" >&6; }
6161else
6162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164fi
6165
6166
6167  test -n "$DIFF" && break
6168done
6169
6170  else
6171    # The variable is set, but is it from the command line or the environment?
6172
6173    # Try to remove the string !DIFF! from our list.
6174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6176      # If it failed, the variable was not from the command line. Ignore it,
6177      # but warn the user (except for BASH, which is always set by the calling BASH).
6178      if test "xDIFF" != xBASH; then
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6180$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6181      fi
6182      # Try to locate tool using the code snippet
6183      for ac_prog in gdiff diff
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_DIFF+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $DIFF in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215DIFF=$ac_cv_path_DIFF
6216if test -n "$DIFF"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6218$as_echo "$DIFF" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$DIFF" && break
6226done
6227
6228    else
6229      # If it succeeded, then it was overridden by the user. We will use it
6230      # for the tool.
6231
6232      # First remove it from the list of overridden variables, so we can test
6233      # for unknown variables in the end.
6234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6235
6236      # Check if the provided tool contains a complete path.
6237      tool_specified="$DIFF"
6238      tool_basename="${tool_specified##*/}"
6239      if test "x$tool_basename" = "x$tool_specified"; then
6240        # A command without a complete path is provided, search $PATH.
6241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6242$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6243        # Extract the first word of "$tool_basename", so it can be a program name with args.
6244set dummy $tool_basename; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_DIFF+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $DIFF in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273DIFF=$ac_cv_path_DIFF
6274if test -n "$DIFF"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6276$as_echo "$DIFF" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283        if test "x$DIFF" = x; then
6284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6285        fi
6286      else
6287        # Otherwise we believe it is a complete path. Use it as it is.
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6289$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6291$as_echo_n "checking for DIFF... " >&6; }
6292        if test ! -x "$tool_specified"; then
6293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6294$as_echo "not found" >&6; }
6295          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6296        fi
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6298$as_echo "$tool_specified" >&6; }
6299      fi
6300    fi
6301  fi
6302
6303
6304
6305  if test "x$DIFF" = x; then
6306    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6307  fi
6308
6309
6310
6311
6312
6313  # Publish this variable in the help.
6314
6315
6316  if test "x$DIRNAME" = x; then
6317    # The variable is not set by user, try to locate tool using the code snippet
6318    for ac_prog in dirname
6319do
6320  # Extract the first word of "$ac_prog", so it can be a program name with args.
6321set dummy $ac_prog; ac_word=$2
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323$as_echo_n "checking for $ac_word... " >&6; }
6324if ${ac_cv_path_DIRNAME+:} false; then :
6325  $as_echo_n "(cached) " >&6
6326else
6327  case $DIRNAME in
6328  [\\/]* | ?:[\\/]*)
6329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6330  ;;
6331  *)
6332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333for as_dir in $PATH
6334do
6335  IFS=$as_save_IFS
6336  test -z "$as_dir" && as_dir=.
6337    for ac_exec_ext in '' $ac_executable_extensions; do
6338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6341    break 2
6342  fi
6343done
6344  done
6345IFS=$as_save_IFS
6346
6347  ;;
6348esac
6349fi
6350DIRNAME=$ac_cv_path_DIRNAME
6351if test -n "$DIRNAME"; then
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6353$as_echo "$DIRNAME" >&6; }
6354else
6355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356$as_echo "no" >&6; }
6357fi
6358
6359
6360  test -n "$DIRNAME" && break
6361done
6362
6363  else
6364    # The variable is set, but is it from the command line or the environment?
6365
6366    # Try to remove the string !DIRNAME! from our list.
6367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6369      # If it failed, the variable was not from the command line. Ignore it,
6370      # but warn the user (except for BASH, which is always set by the calling BASH).
6371      if test "xDIRNAME" != xBASH; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6373$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6374      fi
6375      # Try to locate tool using the code snippet
6376      for ac_prog in dirname
6377do
6378  # Extract the first word of "$ac_prog", so it can be a program name with args.
6379set dummy $ac_prog; ac_word=$2
6380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381$as_echo_n "checking for $ac_word... " >&6; }
6382if ${ac_cv_path_DIRNAME+:} false; then :
6383  $as_echo_n "(cached) " >&6
6384else
6385  case $DIRNAME in
6386  [\\/]* | ?:[\\/]*)
6387  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6388  ;;
6389  *)
6390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391for as_dir in $PATH
6392do
6393  IFS=$as_save_IFS
6394  test -z "$as_dir" && as_dir=.
6395    for ac_exec_ext in '' $ac_executable_extensions; do
6396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6397    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6399    break 2
6400  fi
6401done
6402  done
6403IFS=$as_save_IFS
6404
6405  ;;
6406esac
6407fi
6408DIRNAME=$ac_cv_path_DIRNAME
6409if test -n "$DIRNAME"; then
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6411$as_echo "$DIRNAME" >&6; }
6412else
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
6415fi
6416
6417
6418  test -n "$DIRNAME" && break
6419done
6420
6421    else
6422      # If it succeeded, then it was overridden by the user. We will use it
6423      # for the tool.
6424
6425      # First remove it from the list of overridden variables, so we can test
6426      # for unknown variables in the end.
6427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6428
6429      # Check if the provided tool contains a complete path.
6430      tool_specified="$DIRNAME"
6431      tool_basename="${tool_specified##*/}"
6432      if test "x$tool_basename" = "x$tool_specified"; then
6433        # A command without a complete path is provided, search $PATH.
6434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6435$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6436        # Extract the first word of "$tool_basename", so it can be a program name with args.
6437set dummy $tool_basename; ac_word=$2
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439$as_echo_n "checking for $ac_word... " >&6; }
6440if ${ac_cv_path_DIRNAME+:} false; then :
6441  $as_echo_n "(cached) " >&6
6442else
6443  case $DIRNAME in
6444  [\\/]* | ?:[\\/]*)
6445  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6446  ;;
6447  *)
6448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH
6450do
6451  IFS=$as_save_IFS
6452  test -z "$as_dir" && as_dir=.
6453    for ac_exec_ext in '' $ac_executable_extensions; do
6454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6455    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6457    break 2
6458  fi
6459done
6460  done
6461IFS=$as_save_IFS
6462
6463  ;;
6464esac
6465fi
6466DIRNAME=$ac_cv_path_DIRNAME
6467if test -n "$DIRNAME"; then
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6469$as_echo "$DIRNAME" >&6; }
6470else
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475
6476        if test "x$DIRNAME" = x; then
6477          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6478        fi
6479      else
6480        # Otherwise we believe it is a complete path. Use it as it is.
6481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6482$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6484$as_echo_n "checking for DIRNAME... " >&6; }
6485        if test ! -x "$tool_specified"; then
6486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6487$as_echo "not found" >&6; }
6488          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6489        fi
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6491$as_echo "$tool_specified" >&6; }
6492      fi
6493    fi
6494  fi
6495
6496
6497
6498  if test "x$DIRNAME" = x; then
6499    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6500  fi
6501
6502
6503
6504
6505
6506  # Publish this variable in the help.
6507
6508
6509  if test "x$ECHO" = x; then
6510    # The variable is not set by user, try to locate tool using the code snippet
6511    for ac_prog in echo
6512do
6513  # Extract the first word of "$ac_prog", so it can be a program name with args.
6514set dummy $ac_prog; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_ECHO+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $ECHO in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543ECHO=$ac_cv_path_ECHO
6544if test -n "$ECHO"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6546$as_echo "$ECHO" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553  test -n "$ECHO" && break
6554done
6555
6556  else
6557    # The variable is set, but is it from the command line or the environment?
6558
6559    # Try to remove the string !ECHO! from our list.
6560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6562      # If it failed, the variable was not from the command line. Ignore it,
6563      # but warn the user (except for BASH, which is always set by the calling BASH).
6564      if test "xECHO" != xBASH; then
6565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6566$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6567      fi
6568      # Try to locate tool using the code snippet
6569      for ac_prog in echo
6570do
6571  # Extract the first word of "$ac_prog", so it can be a program name with args.
6572set dummy $ac_prog; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ECHO+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $ECHO in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601ECHO=$ac_cv_path_ECHO
6602if test -n "$ECHO"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6604$as_echo "$ECHO" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611  test -n "$ECHO" && break
6612done
6613
6614    else
6615      # If it succeeded, then it was overridden by the user. We will use it
6616      # for the tool.
6617
6618      # First remove it from the list of overridden variables, so we can test
6619      # for unknown variables in the end.
6620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6621
6622      # Check if the provided tool contains a complete path.
6623      tool_specified="$ECHO"
6624      tool_basename="${tool_specified##*/}"
6625      if test "x$tool_basename" = "x$tool_specified"; then
6626        # A command without a complete path is provided, search $PATH.
6627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6628$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6629        # Extract the first word of "$tool_basename", so it can be a program name with args.
6630set dummy $tool_basename; ac_word=$2
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632$as_echo_n "checking for $ac_word... " >&6; }
6633if ${ac_cv_path_ECHO+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  case $ECHO in
6637  [\\/]* | ?:[\\/]*)
6638  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6639  ;;
6640  *)
6641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644  IFS=$as_save_IFS
6645  test -z "$as_dir" && as_dir=.
6646    for ac_exec_ext in '' $ac_executable_extensions; do
6647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6648    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6650    break 2
6651  fi
6652done
6653  done
6654IFS=$as_save_IFS
6655
6656  ;;
6657esac
6658fi
6659ECHO=$ac_cv_path_ECHO
6660if test -n "$ECHO"; then
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6662$as_echo "$ECHO" >&6; }
6663else
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665$as_echo "no" >&6; }
6666fi
6667
6668
6669        if test "x$ECHO" = x; then
6670          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6671        fi
6672      else
6673        # Otherwise we believe it is a complete path. Use it as it is.
6674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6675$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6677$as_echo_n "checking for ECHO... " >&6; }
6678        if test ! -x "$tool_specified"; then
6679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6680$as_echo "not found" >&6; }
6681          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6682        fi
6683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6684$as_echo "$tool_specified" >&6; }
6685      fi
6686    fi
6687  fi
6688
6689
6690
6691  if test "x$ECHO" = x; then
6692    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6693  fi
6694
6695
6696
6697
6698
6699  # Publish this variable in the help.
6700
6701
6702  if test "x$EXPR" = x; then
6703    # The variable is not set by user, try to locate tool using the code snippet
6704    for ac_prog in expr
6705do
6706  # Extract the first word of "$ac_prog", so it can be a program name with args.
6707set dummy $ac_prog; ac_word=$2
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if ${ac_cv_path_EXPR+:} false; then :
6711  $as_echo_n "(cached) " >&6
6712else
6713  case $EXPR in
6714  [\\/]* | ?:[\\/]*)
6715  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6716  ;;
6717  *)
6718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721  IFS=$as_save_IFS
6722  test -z "$as_dir" && as_dir=.
6723    for ac_exec_ext in '' $ac_executable_extensions; do
6724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727    break 2
6728  fi
6729done
6730  done
6731IFS=$as_save_IFS
6732
6733  ;;
6734esac
6735fi
6736EXPR=$ac_cv_path_EXPR
6737if test -n "$EXPR"; then
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6739$as_echo "$EXPR" >&6; }
6740else
6741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742$as_echo "no" >&6; }
6743fi
6744
6745
6746  test -n "$EXPR" && break
6747done
6748
6749  else
6750    # The variable is set, but is it from the command line or the environment?
6751
6752    # Try to remove the string !EXPR! from our list.
6753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6755      # If it failed, the variable was not from the command line. Ignore it,
6756      # but warn the user (except for BASH, which is always set by the calling BASH).
6757      if test "xEXPR" != xBASH; then
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6759$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6760      fi
6761      # Try to locate tool using the code snippet
6762      for ac_prog in expr
6763do
6764  # Extract the first word of "$ac_prog", so it can be a program name with args.
6765set dummy $ac_prog; ac_word=$2
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6767$as_echo_n "checking for $ac_word... " >&6; }
6768if ${ac_cv_path_EXPR+:} false; then :
6769  $as_echo_n "(cached) " >&6
6770else
6771  case $EXPR in
6772  [\\/]* | ?:[\\/]*)
6773  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6774  ;;
6775  *)
6776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6777for as_dir in $PATH
6778do
6779  IFS=$as_save_IFS
6780  test -z "$as_dir" && as_dir=.
6781    for ac_exec_ext in '' $ac_executable_extensions; do
6782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6783    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6785    break 2
6786  fi
6787done
6788  done
6789IFS=$as_save_IFS
6790
6791  ;;
6792esac
6793fi
6794EXPR=$ac_cv_path_EXPR
6795if test -n "$EXPR"; then
6796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6797$as_echo "$EXPR" >&6; }
6798else
6799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6800$as_echo "no" >&6; }
6801fi
6802
6803
6804  test -n "$EXPR" && break
6805done
6806
6807    else
6808      # If it succeeded, then it was overridden by the user. We will use it
6809      # for the tool.
6810
6811      # First remove it from the list of overridden variables, so we can test
6812      # for unknown variables in the end.
6813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6814
6815      # Check if the provided tool contains a complete path.
6816      tool_specified="$EXPR"
6817      tool_basename="${tool_specified##*/}"
6818      if test "x$tool_basename" = "x$tool_specified"; then
6819        # A command without a complete path is provided, search $PATH.
6820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6821$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6822        # Extract the first word of "$tool_basename", so it can be a program name with args.
6823set dummy $tool_basename; ac_word=$2
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6825$as_echo_n "checking for $ac_word... " >&6; }
6826if ${ac_cv_path_EXPR+:} false; then :
6827  $as_echo_n "(cached) " >&6
6828else
6829  case $EXPR in
6830  [\\/]* | ?:[\\/]*)
6831  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6832  ;;
6833  *)
6834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6835for as_dir in $PATH
6836do
6837  IFS=$as_save_IFS
6838  test -z "$as_dir" && as_dir=.
6839    for ac_exec_ext in '' $ac_executable_extensions; do
6840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6841    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843    break 2
6844  fi
6845done
6846  done
6847IFS=$as_save_IFS
6848
6849  ;;
6850esac
6851fi
6852EXPR=$ac_cv_path_EXPR
6853if test -n "$EXPR"; then
6854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6855$as_echo "$EXPR" >&6; }
6856else
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6858$as_echo "no" >&6; }
6859fi
6860
6861
6862        if test "x$EXPR" = x; then
6863          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6864        fi
6865      else
6866        # Otherwise we believe it is a complete path. Use it as it is.
6867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6868$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6870$as_echo_n "checking for EXPR... " >&6; }
6871        if test ! -x "$tool_specified"; then
6872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6873$as_echo "not found" >&6; }
6874          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6875        fi
6876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6877$as_echo "$tool_specified" >&6; }
6878      fi
6879    fi
6880  fi
6881
6882
6883
6884  if test "x$EXPR" = x; then
6885    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6886  fi
6887
6888
6889
6890
6891
6892  # Publish this variable in the help.
6893
6894
6895  if test "x$FILE" = x; then
6896    # The variable is not set by user, try to locate tool using the code snippet
6897    for ac_prog in file
6898do
6899  # Extract the first word of "$ac_prog", so it can be a program name with args.
6900set dummy $ac_prog; ac_word=$2
6901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6902$as_echo_n "checking for $ac_word... " >&6; }
6903if ${ac_cv_path_FILE+:} false; then :
6904  $as_echo_n "(cached) " >&6
6905else
6906  case $FILE in
6907  [\\/]* | ?:[\\/]*)
6908  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6909  ;;
6910  *)
6911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6912for as_dir in $PATH
6913do
6914  IFS=$as_save_IFS
6915  test -z "$as_dir" && as_dir=.
6916    for ac_exec_ext in '' $ac_executable_extensions; do
6917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6918    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6920    break 2
6921  fi
6922done
6923  done
6924IFS=$as_save_IFS
6925
6926  ;;
6927esac
6928fi
6929FILE=$ac_cv_path_FILE
6930if test -n "$FILE"; then
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6932$as_echo "$FILE" >&6; }
6933else
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6935$as_echo "no" >&6; }
6936fi
6937
6938
6939  test -n "$FILE" && break
6940done
6941
6942  else
6943    # The variable is set, but is it from the command line or the environment?
6944
6945    # Try to remove the string !FILE! from our list.
6946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6948      # If it failed, the variable was not from the command line. Ignore it,
6949      # but warn the user (except for BASH, which is always set by the calling BASH).
6950      if test "xFILE" != xBASH; then
6951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6952$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6953      fi
6954      # Try to locate tool using the code snippet
6955      for ac_prog in file
6956do
6957  # Extract the first word of "$ac_prog", so it can be a program name with args.
6958set dummy $ac_prog; ac_word=$2
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6960$as_echo_n "checking for $ac_word... " >&6; }
6961if ${ac_cv_path_FILE+:} false; then :
6962  $as_echo_n "(cached) " >&6
6963else
6964  case $FILE in
6965  [\\/]* | ?:[\\/]*)
6966  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6967  ;;
6968  *)
6969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6970for as_dir in $PATH
6971do
6972  IFS=$as_save_IFS
6973  test -z "$as_dir" && as_dir=.
6974    for ac_exec_ext in '' $ac_executable_extensions; do
6975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6976    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6978    break 2
6979  fi
6980done
6981  done
6982IFS=$as_save_IFS
6983
6984  ;;
6985esac
6986fi
6987FILE=$ac_cv_path_FILE
6988if test -n "$FILE"; then
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6990$as_echo "$FILE" >&6; }
6991else
6992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993$as_echo "no" >&6; }
6994fi
6995
6996
6997  test -n "$FILE" && break
6998done
6999
7000    else
7001      # If it succeeded, then it was overridden by the user. We will use it
7002      # for the tool.
7003
7004      # First remove it from the list of overridden variables, so we can test
7005      # for unknown variables in the end.
7006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7007
7008      # Check if the provided tool contains a complete path.
7009      tool_specified="$FILE"
7010      tool_basename="${tool_specified##*/}"
7011      if test "x$tool_basename" = "x$tool_specified"; then
7012        # A command without a complete path is provided, search $PATH.
7013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7014$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7015        # Extract the first word of "$tool_basename", so it can be a program name with args.
7016set dummy $tool_basename; ac_word=$2
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018$as_echo_n "checking for $ac_word... " >&6; }
7019if ${ac_cv_path_FILE+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  case $FILE in
7023  [\\/]* | ?:[\\/]*)
7024  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7025  ;;
7026  *)
7027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028for as_dir in $PATH
7029do
7030  IFS=$as_save_IFS
7031  test -z "$as_dir" && as_dir=.
7032    for ac_exec_ext in '' $ac_executable_extensions; do
7033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036    break 2
7037  fi
7038done
7039  done
7040IFS=$as_save_IFS
7041
7042  ;;
7043esac
7044fi
7045FILE=$ac_cv_path_FILE
7046if test -n "$FILE"; then
7047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7048$as_echo "$FILE" >&6; }
7049else
7050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051$as_echo "no" >&6; }
7052fi
7053
7054
7055        if test "x$FILE" = x; then
7056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7057        fi
7058      else
7059        # Otherwise we believe it is a complete path. Use it as it is.
7060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7061$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7063$as_echo_n "checking for FILE... " >&6; }
7064        if test ! -x "$tool_specified"; then
7065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7066$as_echo "not found" >&6; }
7067          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7068        fi
7069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7070$as_echo "$tool_specified" >&6; }
7071      fi
7072    fi
7073  fi
7074
7075
7076
7077  if test "x$FILE" = x; then
7078    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7079  fi
7080
7081
7082
7083
7084
7085  # Publish this variable in the help.
7086
7087
7088  if test "x$FIND" = x; then
7089    # The variable is not set by user, try to locate tool using the code snippet
7090    for ac_prog in find
7091do
7092  # Extract the first word of "$ac_prog", so it can be a program name with args.
7093set dummy $ac_prog; ac_word=$2
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095$as_echo_n "checking for $ac_word... " >&6; }
7096if ${ac_cv_path_FIND+:} false; then :
7097  $as_echo_n "(cached) " >&6
7098else
7099  case $FIND in
7100  [\\/]* | ?:[\\/]*)
7101  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7102  ;;
7103  *)
7104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105for as_dir in $PATH
7106do
7107  IFS=$as_save_IFS
7108  test -z "$as_dir" && as_dir=.
7109    for ac_exec_ext in '' $ac_executable_extensions; do
7110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7111    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7113    break 2
7114  fi
7115done
7116  done
7117IFS=$as_save_IFS
7118
7119  ;;
7120esac
7121fi
7122FIND=$ac_cv_path_FIND
7123if test -n "$FIND"; then
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7125$as_echo "$FIND" >&6; }
7126else
7127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
7129fi
7130
7131
7132  test -n "$FIND" && break
7133done
7134
7135  else
7136    # The variable is set, but is it from the command line or the environment?
7137
7138    # Try to remove the string !FIND! from our list.
7139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7141      # If it failed, the variable was not from the command line. Ignore it,
7142      # but warn the user (except for BASH, which is always set by the calling BASH).
7143      if test "xFIND" != xBASH; then
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7145$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7146      fi
7147      # Try to locate tool using the code snippet
7148      for ac_prog in find
7149do
7150  # Extract the first word of "$ac_prog", so it can be a program name with args.
7151set dummy $ac_prog; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_FIND+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $FIND in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180FIND=$ac_cv_path_FIND
7181if test -n "$FIND"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7183$as_echo "$FIND" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190  test -n "$FIND" && break
7191done
7192
7193    else
7194      # If it succeeded, then it was overridden by the user. We will use it
7195      # for the tool.
7196
7197      # First remove it from the list of overridden variables, so we can test
7198      # for unknown variables in the end.
7199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7200
7201      # Check if the provided tool contains a complete path.
7202      tool_specified="$FIND"
7203      tool_basename="${tool_specified##*/}"
7204      if test "x$tool_basename" = "x$tool_specified"; then
7205        # A command without a complete path is provided, search $PATH.
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7207$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7208        # Extract the first word of "$tool_basename", so it can be a program name with args.
7209set dummy $tool_basename; ac_word=$2
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
7212if ${ac_cv_path_FIND+:} false; then :
7213  $as_echo_n "(cached) " >&6
7214else
7215  case $FIND in
7216  [\\/]* | ?:[\\/]*)
7217  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7218  ;;
7219  *)
7220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221for as_dir in $PATH
7222do
7223  IFS=$as_save_IFS
7224  test -z "$as_dir" && as_dir=.
7225    for ac_exec_ext in '' $ac_executable_extensions; do
7226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229    break 2
7230  fi
7231done
7232  done
7233IFS=$as_save_IFS
7234
7235  ;;
7236esac
7237fi
7238FIND=$ac_cv_path_FIND
7239if test -n "$FIND"; then
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7241$as_echo "$FIND" >&6; }
7242else
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
7245fi
7246
7247
7248        if test "x$FIND" = x; then
7249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7250        fi
7251      else
7252        # Otherwise we believe it is a complete path. Use it as it is.
7253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7254$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7256$as_echo_n "checking for FIND... " >&6; }
7257        if test ! -x "$tool_specified"; then
7258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7259$as_echo "not found" >&6; }
7260          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7261        fi
7262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7263$as_echo "$tool_specified" >&6; }
7264      fi
7265    fi
7266  fi
7267
7268
7269
7270  if test "x$FIND" = x; then
7271    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7272  fi
7273
7274
7275
7276
7277
7278  # Publish this variable in the help.
7279
7280
7281  if test "x$HEAD" = x; then
7282    # The variable is not set by user, try to locate tool using the code snippet
7283    for ac_prog in head
7284do
7285  # Extract the first word of "$ac_prog", so it can be a program name with args.
7286set dummy $ac_prog; ac_word=$2
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7288$as_echo_n "checking for $ac_word... " >&6; }
7289if ${ac_cv_path_HEAD+:} false; then :
7290  $as_echo_n "(cached) " >&6
7291else
7292  case $HEAD in
7293  [\\/]* | ?:[\\/]*)
7294  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7295  ;;
7296  *)
7297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7298for as_dir in $PATH
7299do
7300  IFS=$as_save_IFS
7301  test -z "$as_dir" && as_dir=.
7302    for ac_exec_ext in '' $ac_executable_extensions; do
7303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7304    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7306    break 2
7307  fi
7308done
7309  done
7310IFS=$as_save_IFS
7311
7312  ;;
7313esac
7314fi
7315HEAD=$ac_cv_path_HEAD
7316if test -n "$HEAD"; then
7317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7318$as_echo "$HEAD" >&6; }
7319else
7320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321$as_echo "no" >&6; }
7322fi
7323
7324
7325  test -n "$HEAD" && break
7326done
7327
7328  else
7329    # The variable is set, but is it from the command line or the environment?
7330
7331    # Try to remove the string !HEAD! from our list.
7332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7334      # If it failed, the variable was not from the command line. Ignore it,
7335      # but warn the user (except for BASH, which is always set by the calling BASH).
7336      if test "xHEAD" != xBASH; then
7337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7338$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7339      fi
7340      # Try to locate tool using the code snippet
7341      for ac_prog in head
7342do
7343  # Extract the first word of "$ac_prog", so it can be a program name with args.
7344set dummy $ac_prog; ac_word=$2
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346$as_echo_n "checking for $ac_word... " >&6; }
7347if ${ac_cv_path_HEAD+:} false; then :
7348  $as_echo_n "(cached) " >&6
7349else
7350  case $HEAD in
7351  [\\/]* | ?:[\\/]*)
7352  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7353  ;;
7354  *)
7355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356for as_dir in $PATH
7357do
7358  IFS=$as_save_IFS
7359  test -z "$as_dir" && as_dir=.
7360    for ac_exec_ext in '' $ac_executable_extensions; do
7361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7362    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364    break 2
7365  fi
7366done
7367  done
7368IFS=$as_save_IFS
7369
7370  ;;
7371esac
7372fi
7373HEAD=$ac_cv_path_HEAD
7374if test -n "$HEAD"; then
7375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7376$as_echo "$HEAD" >&6; }
7377else
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
7380fi
7381
7382
7383  test -n "$HEAD" && break
7384done
7385
7386    else
7387      # If it succeeded, then it was overridden by the user. We will use it
7388      # for the tool.
7389
7390      # First remove it from the list of overridden variables, so we can test
7391      # for unknown variables in the end.
7392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7393
7394      # Check if the provided tool contains a complete path.
7395      tool_specified="$HEAD"
7396      tool_basename="${tool_specified##*/}"
7397      if test "x$tool_basename" = "x$tool_specified"; then
7398        # A command without a complete path is provided, search $PATH.
7399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7400$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7401        # Extract the first word of "$tool_basename", so it can be a program name with args.
7402set dummy $tool_basename; ac_word=$2
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
7405if ${ac_cv_path_HEAD+:} false; then :
7406  $as_echo_n "(cached) " >&6
7407else
7408  case $HEAD in
7409  [\\/]* | ?:[\\/]*)
7410  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7411  ;;
7412  *)
7413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414for as_dir in $PATH
7415do
7416  IFS=$as_save_IFS
7417  test -z "$as_dir" && as_dir=.
7418    for ac_exec_ext in '' $ac_executable_extensions; do
7419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422    break 2
7423  fi
7424done
7425  done
7426IFS=$as_save_IFS
7427
7428  ;;
7429esac
7430fi
7431HEAD=$ac_cv_path_HEAD
7432if test -n "$HEAD"; then
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7434$as_echo "$HEAD" >&6; }
7435else
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438fi
7439
7440
7441        if test "x$HEAD" = x; then
7442          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7443        fi
7444      else
7445        # Otherwise we believe it is a complete path. Use it as it is.
7446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7447$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7449$as_echo_n "checking for HEAD... " >&6; }
7450        if test ! -x "$tool_specified"; then
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7452$as_echo "not found" >&6; }
7453          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7454        fi
7455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7456$as_echo "$tool_specified" >&6; }
7457      fi
7458    fi
7459  fi
7460
7461
7462
7463  if test "x$HEAD" = x; then
7464    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7465  fi
7466
7467
7468
7469
7470
7471  # Publish this variable in the help.
7472
7473
7474  if test "x$LN" = x; then
7475    # The variable is not set by user, try to locate tool using the code snippet
7476    for ac_prog in ln
7477do
7478  # Extract the first word of "$ac_prog", so it can be a program name with args.
7479set dummy $ac_prog; ac_word=$2
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481$as_echo_n "checking for $ac_word... " >&6; }
7482if ${ac_cv_path_LN+:} false; then :
7483  $as_echo_n "(cached) " >&6
7484else
7485  case $LN in
7486  [\\/]* | ?:[\\/]*)
7487  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7488  ;;
7489  *)
7490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7491for as_dir in $PATH
7492do
7493  IFS=$as_save_IFS
7494  test -z "$as_dir" && as_dir=.
7495    for ac_exec_ext in '' $ac_executable_extensions; do
7496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7497    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7499    break 2
7500  fi
7501done
7502  done
7503IFS=$as_save_IFS
7504
7505  ;;
7506esac
7507fi
7508LN=$ac_cv_path_LN
7509if test -n "$LN"; then
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7511$as_echo "$LN" >&6; }
7512else
7513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
7515fi
7516
7517
7518  test -n "$LN" && break
7519done
7520
7521  else
7522    # The variable is set, but is it from the command line or the environment?
7523
7524    # Try to remove the string !LN! from our list.
7525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7527      # If it failed, the variable was not from the command line. Ignore it,
7528      # but warn the user (except for BASH, which is always set by the calling BASH).
7529      if test "xLN" != xBASH; then
7530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7531$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7532      fi
7533      # Try to locate tool using the code snippet
7534      for ac_prog in ln
7535do
7536  # Extract the first word of "$ac_prog", so it can be a program name with args.
7537set dummy $ac_prog; ac_word=$2
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if ${ac_cv_path_LN+:} false; then :
7541  $as_echo_n "(cached) " >&6
7542else
7543  case $LN in
7544  [\\/]* | ?:[\\/]*)
7545  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7546  ;;
7547  *)
7548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7549for as_dir in $PATH
7550do
7551  IFS=$as_save_IFS
7552  test -z "$as_dir" && as_dir=.
7553    for ac_exec_ext in '' $ac_executable_extensions; do
7554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7555    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7557    break 2
7558  fi
7559done
7560  done
7561IFS=$as_save_IFS
7562
7563  ;;
7564esac
7565fi
7566LN=$ac_cv_path_LN
7567if test -n "$LN"; then
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7569$as_echo "$LN" >&6; }
7570else
7571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572$as_echo "no" >&6; }
7573fi
7574
7575
7576  test -n "$LN" && break
7577done
7578
7579    else
7580      # If it succeeded, then it was overridden by the user. We will use it
7581      # for the tool.
7582
7583      # First remove it from the list of overridden variables, so we can test
7584      # for unknown variables in the end.
7585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7586
7587      # Check if the provided tool contains a complete path.
7588      tool_specified="$LN"
7589      tool_basename="${tool_specified##*/}"
7590      if test "x$tool_basename" = "x$tool_specified"; then
7591        # A command without a complete path is provided, search $PATH.
7592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7593$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7594        # Extract the first word of "$tool_basename", so it can be a program name with args.
7595set dummy $tool_basename; ac_word=$2
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7597$as_echo_n "checking for $ac_word... " >&6; }
7598if ${ac_cv_path_LN+:} false; then :
7599  $as_echo_n "(cached) " >&6
7600else
7601  case $LN in
7602  [\\/]* | ?:[\\/]*)
7603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7604  ;;
7605  *)
7606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607for as_dir in $PATH
7608do
7609  IFS=$as_save_IFS
7610  test -z "$as_dir" && as_dir=.
7611    for ac_exec_ext in '' $ac_executable_extensions; do
7612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7615    break 2
7616  fi
7617done
7618  done
7619IFS=$as_save_IFS
7620
7621  ;;
7622esac
7623fi
7624LN=$ac_cv_path_LN
7625if test -n "$LN"; then
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7627$as_echo "$LN" >&6; }
7628else
7629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630$as_echo "no" >&6; }
7631fi
7632
7633
7634        if test "x$LN" = x; then
7635          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7636        fi
7637      else
7638        # Otherwise we believe it is a complete path. Use it as it is.
7639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7640$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7642$as_echo_n "checking for LN... " >&6; }
7643        if test ! -x "$tool_specified"; then
7644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7645$as_echo "not found" >&6; }
7646          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7647        fi
7648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7649$as_echo "$tool_specified" >&6; }
7650      fi
7651    fi
7652  fi
7653
7654
7655
7656  if test "x$LN" = x; then
7657    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7658  fi
7659
7660
7661
7662
7663
7664  # Publish this variable in the help.
7665
7666
7667  if test "x$LS" = x; then
7668    # The variable is not set by user, try to locate tool using the code snippet
7669    for ac_prog in ls
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_LS+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $LS in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701LS=$ac_cv_path_LS
7702if test -n "$LS"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7704$as_echo "$LS" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$LS" && break
7712done
7713
7714  else
7715    # The variable is set, but is it from the command line or the environment?
7716
7717    # Try to remove the string !LS! from our list.
7718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7720      # If it failed, the variable was not from the command line. Ignore it,
7721      # but warn the user (except for BASH, which is always set by the calling BASH).
7722      if test "xLS" != xBASH; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7724$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7725      fi
7726      # Try to locate tool using the code snippet
7727      for ac_prog in ls
7728do
7729  # Extract the first word of "$ac_prog", so it can be a program name with args.
7730set dummy $ac_prog; ac_word=$2
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7732$as_echo_n "checking for $ac_word... " >&6; }
7733if ${ac_cv_path_LS+:} false; then :
7734  $as_echo_n "(cached) " >&6
7735else
7736  case $LS in
7737  [\\/]* | ?:[\\/]*)
7738  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7739  ;;
7740  *)
7741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7742for as_dir in $PATH
7743do
7744  IFS=$as_save_IFS
7745  test -z "$as_dir" && as_dir=.
7746    for ac_exec_ext in '' $ac_executable_extensions; do
7747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7748    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7750    break 2
7751  fi
7752done
7753  done
7754IFS=$as_save_IFS
7755
7756  ;;
7757esac
7758fi
7759LS=$ac_cv_path_LS
7760if test -n "$LS"; then
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7762$as_echo "$LS" >&6; }
7763else
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7765$as_echo "no" >&6; }
7766fi
7767
7768
7769  test -n "$LS" && break
7770done
7771
7772    else
7773      # If it succeeded, then it was overridden by the user. We will use it
7774      # for the tool.
7775
7776      # First remove it from the list of overridden variables, so we can test
7777      # for unknown variables in the end.
7778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7779
7780      # Check if the provided tool contains a complete path.
7781      tool_specified="$LS"
7782      tool_basename="${tool_specified##*/}"
7783      if test "x$tool_basename" = "x$tool_specified"; then
7784        # A command without a complete path is provided, search $PATH.
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7786$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7787        # Extract the first word of "$tool_basename", so it can be a program name with args.
7788set dummy $tool_basename; ac_word=$2
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7790$as_echo_n "checking for $ac_word... " >&6; }
7791if ${ac_cv_path_LS+:} false; then :
7792  $as_echo_n "(cached) " >&6
7793else
7794  case $LS in
7795  [\\/]* | ?:[\\/]*)
7796  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7797  ;;
7798  *)
7799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800for as_dir in $PATH
7801do
7802  IFS=$as_save_IFS
7803  test -z "$as_dir" && as_dir=.
7804    for ac_exec_ext in '' $ac_executable_extensions; do
7805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7806    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808    break 2
7809  fi
7810done
7811  done
7812IFS=$as_save_IFS
7813
7814  ;;
7815esac
7816fi
7817LS=$ac_cv_path_LS
7818if test -n "$LS"; then
7819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7820$as_echo "$LS" >&6; }
7821else
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
7824fi
7825
7826
7827        if test "x$LS" = x; then
7828          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7829        fi
7830      else
7831        # Otherwise we believe it is a complete path. Use it as it is.
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7833$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7835$as_echo_n "checking for LS... " >&6; }
7836        if test ! -x "$tool_specified"; then
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7838$as_echo "not found" >&6; }
7839          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7840        fi
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7842$as_echo "$tool_specified" >&6; }
7843      fi
7844    fi
7845  fi
7846
7847
7848
7849  if test "x$LS" = x; then
7850    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7851  fi
7852
7853
7854
7855
7856
7857  # Publish this variable in the help.
7858
7859
7860  if test "x$MKDIR" = x; then
7861    # The variable is not set by user, try to locate tool using the code snippet
7862    for ac_prog in mkdir
7863do
7864  # Extract the first word of "$ac_prog", so it can be a program name with args.
7865set dummy $ac_prog; ac_word=$2
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7867$as_echo_n "checking for $ac_word... " >&6; }
7868if ${ac_cv_path_MKDIR+:} false; then :
7869  $as_echo_n "(cached) " >&6
7870else
7871  case $MKDIR in
7872  [\\/]* | ?:[\\/]*)
7873  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7874  ;;
7875  *)
7876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7877for as_dir in $PATH
7878do
7879  IFS=$as_save_IFS
7880  test -z "$as_dir" && as_dir=.
7881    for ac_exec_ext in '' $ac_executable_extensions; do
7882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7883    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7885    break 2
7886  fi
7887done
7888  done
7889IFS=$as_save_IFS
7890
7891  ;;
7892esac
7893fi
7894MKDIR=$ac_cv_path_MKDIR
7895if test -n "$MKDIR"; then
7896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7897$as_echo "$MKDIR" >&6; }
7898else
7899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7900$as_echo "no" >&6; }
7901fi
7902
7903
7904  test -n "$MKDIR" && break
7905done
7906
7907  else
7908    # The variable is set, but is it from the command line or the environment?
7909
7910    # Try to remove the string !MKDIR! from our list.
7911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7913      # If it failed, the variable was not from the command line. Ignore it,
7914      # but warn the user (except for BASH, which is always set by the calling BASH).
7915      if test "xMKDIR" != xBASH; then
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7917$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7918      fi
7919      # Try to locate tool using the code snippet
7920      for ac_prog in mkdir
7921do
7922  # Extract the first word of "$ac_prog", so it can be a program name with args.
7923set dummy $ac_prog; ac_word=$2
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7925$as_echo_n "checking for $ac_word... " >&6; }
7926if ${ac_cv_path_MKDIR+:} false; then :
7927  $as_echo_n "(cached) " >&6
7928else
7929  case $MKDIR in
7930  [\\/]* | ?:[\\/]*)
7931  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7932  ;;
7933  *)
7934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7935for as_dir in $PATH
7936do
7937  IFS=$as_save_IFS
7938  test -z "$as_dir" && as_dir=.
7939    for ac_exec_ext in '' $ac_executable_extensions; do
7940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7941    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7943    break 2
7944  fi
7945done
7946  done
7947IFS=$as_save_IFS
7948
7949  ;;
7950esac
7951fi
7952MKDIR=$ac_cv_path_MKDIR
7953if test -n "$MKDIR"; then
7954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7955$as_echo "$MKDIR" >&6; }
7956else
7957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958$as_echo "no" >&6; }
7959fi
7960
7961
7962  test -n "$MKDIR" && break
7963done
7964
7965    else
7966      # If it succeeded, then it was overridden by the user. We will use it
7967      # for the tool.
7968
7969      # First remove it from the list of overridden variables, so we can test
7970      # for unknown variables in the end.
7971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7972
7973      # Check if the provided tool contains a complete path.
7974      tool_specified="$MKDIR"
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 MKDIR=$tool_basename" >&5
7979$as_echo "$as_me: Will search for user supplied tool MKDIR=$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_MKDIR+:} false; then :
7985  $as_echo_n "(cached) " >&6
7986else
7987  case $MKDIR in
7988  [\\/]* | ?:[\\/]*)
7989  ac_cv_path_MKDIR="$MKDIR" # 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_MKDIR="$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
8010MKDIR=$ac_cv_path_MKDIR
8011if test -n "$MKDIR"; then
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8013$as_echo "$MKDIR" >&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$MKDIR" = 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 MKDIR=$tool_specified" >&5
8026$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8028$as_echo_n "checking for MKDIR... " >&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 MKDIR=$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
8041
8042  if test "x$MKDIR" = x; then
8043    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8044  fi
8045
8046
8047
8048
8049
8050  # Publish this variable in the help.
8051
8052
8053  if test "x$MKTEMP" = x; then
8054    # The variable is not set by user, try to locate tool using the code snippet
8055    for ac_prog in mktemp
8056do
8057  # Extract the first word of "$ac_prog", so it can be a program name with args.
8058set dummy $ac_prog; ac_word=$2
8059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060$as_echo_n "checking for $ac_word... " >&6; }
8061if ${ac_cv_path_MKTEMP+:} false; then :
8062  $as_echo_n "(cached) " >&6
8063else
8064  case $MKTEMP in
8065  [\\/]* | ?:[\\/]*)
8066  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8067  ;;
8068  *)
8069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070for as_dir in $PATH
8071do
8072  IFS=$as_save_IFS
8073  test -z "$as_dir" && as_dir=.
8074    for ac_exec_ext in '' $ac_executable_extensions; do
8075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8076    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8078    break 2
8079  fi
8080done
8081  done
8082IFS=$as_save_IFS
8083
8084  ;;
8085esac
8086fi
8087MKTEMP=$ac_cv_path_MKTEMP
8088if test -n "$MKTEMP"; then
8089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8090$as_echo "$MKTEMP" >&6; }
8091else
8092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093$as_echo "no" >&6; }
8094fi
8095
8096
8097  test -n "$MKTEMP" && break
8098done
8099
8100  else
8101    # The variable is set, but is it from the command line or the environment?
8102
8103    # Try to remove the string !MKTEMP! from our list.
8104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8106      # If it failed, the variable was not from the command line. Ignore it,
8107      # but warn the user (except for BASH, which is always set by the calling BASH).
8108      if test "xMKTEMP" != xBASH; then
8109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8110$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8111      fi
8112      # Try to locate tool using the code snippet
8113      for ac_prog in mktemp
8114do
8115  # Extract the first word of "$ac_prog", so it can be a program name with args.
8116set dummy $ac_prog; ac_word=$2
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118$as_echo_n "checking for $ac_word... " >&6; }
8119if ${ac_cv_path_MKTEMP+:} false; then :
8120  $as_echo_n "(cached) " >&6
8121else
8122  case $MKTEMP in
8123  [\\/]* | ?:[\\/]*)
8124  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8125  ;;
8126  *)
8127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128for as_dir in $PATH
8129do
8130  IFS=$as_save_IFS
8131  test -z "$as_dir" && as_dir=.
8132    for ac_exec_ext in '' $ac_executable_extensions; do
8133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136    break 2
8137  fi
8138done
8139  done
8140IFS=$as_save_IFS
8141
8142  ;;
8143esac
8144fi
8145MKTEMP=$ac_cv_path_MKTEMP
8146if test -n "$MKTEMP"; then
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8148$as_echo "$MKTEMP" >&6; }
8149else
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151$as_echo "no" >&6; }
8152fi
8153
8154
8155  test -n "$MKTEMP" && break
8156done
8157
8158    else
8159      # If it succeeded, then it was overridden by the user. We will use it
8160      # for the tool.
8161
8162      # First remove it from the list of overridden variables, so we can test
8163      # for unknown variables in the end.
8164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8165
8166      # Check if the provided tool contains a complete path.
8167      tool_specified="$MKTEMP"
8168      tool_basename="${tool_specified##*/}"
8169      if test "x$tool_basename" = "x$tool_specified"; then
8170        # A command without a complete path is provided, search $PATH.
8171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8172$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8173        # Extract the first word of "$tool_basename", so it can be a program name with args.
8174set dummy $tool_basename; ac_word=$2
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176$as_echo_n "checking for $ac_word... " >&6; }
8177if ${ac_cv_path_MKTEMP+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  case $MKTEMP in
8181  [\\/]* | ?:[\\/]*)
8182  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8183  ;;
8184  *)
8185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8186for as_dir in $PATH
8187do
8188  IFS=$as_save_IFS
8189  test -z "$as_dir" && as_dir=.
8190    for ac_exec_ext in '' $ac_executable_extensions; do
8191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8192    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8194    break 2
8195  fi
8196done
8197  done
8198IFS=$as_save_IFS
8199
8200  ;;
8201esac
8202fi
8203MKTEMP=$ac_cv_path_MKTEMP
8204if test -n "$MKTEMP"; then
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8206$as_echo "$MKTEMP" >&6; }
8207else
8208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
8210fi
8211
8212
8213        if test "x$MKTEMP" = x; then
8214          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8215        fi
8216      else
8217        # Otherwise we believe it is a complete path. Use it as it is.
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8219$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8221$as_echo_n "checking for MKTEMP... " >&6; }
8222        if test ! -x "$tool_specified"; then
8223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8224$as_echo "not found" >&6; }
8225          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8226        fi
8227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8228$as_echo "$tool_specified" >&6; }
8229      fi
8230    fi
8231  fi
8232
8233
8234
8235  if test "x$MKTEMP" = x; then
8236    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8237  fi
8238
8239
8240
8241
8242
8243  # Publish this variable in the help.
8244
8245
8246  if test "x$MV" = x; then
8247    # The variable is not set by user, try to locate tool using the code snippet
8248    for ac_prog in mv
8249do
8250  # Extract the first word of "$ac_prog", so it can be a program name with args.
8251set dummy $ac_prog; ac_word=$2
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8253$as_echo_n "checking for $ac_word... " >&6; }
8254if ${ac_cv_path_MV+:} false; then :
8255  $as_echo_n "(cached) " >&6
8256else
8257  case $MV in
8258  [\\/]* | ?:[\\/]*)
8259  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8260  ;;
8261  *)
8262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8263for as_dir in $PATH
8264do
8265  IFS=$as_save_IFS
8266  test -z "$as_dir" && as_dir=.
8267    for ac_exec_ext in '' $ac_executable_extensions; do
8268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8269    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8271    break 2
8272  fi
8273done
8274  done
8275IFS=$as_save_IFS
8276
8277  ;;
8278esac
8279fi
8280MV=$ac_cv_path_MV
8281if test -n "$MV"; then
8282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8283$as_echo "$MV" >&6; }
8284else
8285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8286$as_echo "no" >&6; }
8287fi
8288
8289
8290  test -n "$MV" && break
8291done
8292
8293  else
8294    # The variable is set, but is it from the command line or the environment?
8295
8296    # Try to remove the string !MV! from our list.
8297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8299      # If it failed, the variable was not from the command line. Ignore it,
8300      # but warn the user (except for BASH, which is always set by the calling BASH).
8301      if test "xMV" != xBASH; then
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8303$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8304      fi
8305      # Try to locate tool using the code snippet
8306      for ac_prog in mv
8307do
8308  # Extract the first word of "$ac_prog", so it can be a program name with args.
8309set dummy $ac_prog; ac_word=$2
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311$as_echo_n "checking for $ac_word... " >&6; }
8312if ${ac_cv_path_MV+:} false; then :
8313  $as_echo_n "(cached) " >&6
8314else
8315  case $MV in
8316  [\\/]* | ?:[\\/]*)
8317  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8318  ;;
8319  *)
8320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321for as_dir in $PATH
8322do
8323  IFS=$as_save_IFS
8324  test -z "$as_dir" && as_dir=.
8325    for ac_exec_ext in '' $ac_executable_extensions; do
8326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329    break 2
8330  fi
8331done
8332  done
8333IFS=$as_save_IFS
8334
8335  ;;
8336esac
8337fi
8338MV=$ac_cv_path_MV
8339if test -n "$MV"; then
8340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8341$as_echo "$MV" >&6; }
8342else
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344$as_echo "no" >&6; }
8345fi
8346
8347
8348  test -n "$MV" && break
8349done
8350
8351    else
8352      # If it succeeded, then it was overridden by the user. We will use it
8353      # for the tool.
8354
8355      # First remove it from the list of overridden variables, so we can test
8356      # for unknown variables in the end.
8357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8358
8359      # Check if the provided tool contains a complete path.
8360      tool_specified="$MV"
8361      tool_basename="${tool_specified##*/}"
8362      if test "x$tool_basename" = "x$tool_specified"; then
8363        # A command without a complete path is provided, search $PATH.
8364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8365$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8366        # Extract the first word of "$tool_basename", so it can be a program name with args.
8367set dummy $tool_basename; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_MV+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $MV in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396MV=$ac_cv_path_MV
8397if test -n "$MV"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8399$as_echo "$MV" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406        if test "x$MV" = x; then
8407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8408        fi
8409      else
8410        # Otherwise we believe it is a complete path. Use it as it is.
8411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8412$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8414$as_echo_n "checking for MV... " >&6; }
8415        if test ! -x "$tool_specified"; then
8416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8417$as_echo "not found" >&6; }
8418          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8419        fi
8420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8421$as_echo "$tool_specified" >&6; }
8422      fi
8423    fi
8424  fi
8425
8426
8427
8428  if test "x$MV" = x; then
8429    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8430  fi
8431
8432
8433
8434
8435
8436  # Publish this variable in the help.
8437
8438
8439  if test "x$NAWK" = x; then
8440    # The variable is not set by user, try to locate tool using the code snippet
8441    for ac_prog in nawk gawk awk
8442do
8443  # Extract the first word of "$ac_prog", so it can be a program name with args.
8444set dummy $ac_prog; ac_word=$2
8445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446$as_echo_n "checking for $ac_word... " >&6; }
8447if ${ac_cv_path_NAWK+:} false; then :
8448  $as_echo_n "(cached) " >&6
8449else
8450  case $NAWK in
8451  [\\/]* | ?:[\\/]*)
8452  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8453  ;;
8454  *)
8455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456for as_dir in $PATH
8457do
8458  IFS=$as_save_IFS
8459  test -z "$as_dir" && as_dir=.
8460    for ac_exec_ext in '' $ac_executable_extensions; do
8461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464    break 2
8465  fi
8466done
8467  done
8468IFS=$as_save_IFS
8469
8470  ;;
8471esac
8472fi
8473NAWK=$ac_cv_path_NAWK
8474if test -n "$NAWK"; then
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8476$as_echo "$NAWK" >&6; }
8477else
8478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479$as_echo "no" >&6; }
8480fi
8481
8482
8483  test -n "$NAWK" && break
8484done
8485
8486  else
8487    # The variable is set, but is it from the command line or the environment?
8488
8489    # Try to remove the string !NAWK! from our list.
8490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8492      # If it failed, the variable was not from the command line. Ignore it,
8493      # but warn the user (except for BASH, which is always set by the calling BASH).
8494      if test "xNAWK" != xBASH; then
8495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8496$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8497      fi
8498      # Try to locate tool using the code snippet
8499      for ac_prog in nawk gawk awk
8500do
8501  # Extract the first word of "$ac_prog", so it can be a program name with args.
8502set dummy $ac_prog; ac_word=$2
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504$as_echo_n "checking for $ac_word... " >&6; }
8505if ${ac_cv_path_NAWK+:} false; then :
8506  $as_echo_n "(cached) " >&6
8507else
8508  case $NAWK in
8509  [\\/]* | ?:[\\/]*)
8510  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8511  ;;
8512  *)
8513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514for as_dir in $PATH
8515do
8516  IFS=$as_save_IFS
8517  test -z "$as_dir" && as_dir=.
8518    for ac_exec_ext in '' $ac_executable_extensions; do
8519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522    break 2
8523  fi
8524done
8525  done
8526IFS=$as_save_IFS
8527
8528  ;;
8529esac
8530fi
8531NAWK=$ac_cv_path_NAWK
8532if test -n "$NAWK"; then
8533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8534$as_echo "$NAWK" >&6; }
8535else
8536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537$as_echo "no" >&6; }
8538fi
8539
8540
8541  test -n "$NAWK" && break
8542done
8543
8544    else
8545      # If it succeeded, then it was overridden by the user. We will use it
8546      # for the tool.
8547
8548      # First remove it from the list of overridden variables, so we can test
8549      # for unknown variables in the end.
8550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8551
8552      # Check if the provided tool contains a complete path.
8553      tool_specified="$NAWK"
8554      tool_basename="${tool_specified##*/}"
8555      if test "x$tool_basename" = "x$tool_specified"; then
8556        # A command without a complete path is provided, search $PATH.
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8558$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8559        # Extract the first word of "$tool_basename", so it can be a program name with args.
8560set dummy $tool_basename; ac_word=$2
8561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8562$as_echo_n "checking for $ac_word... " >&6; }
8563if ${ac_cv_path_NAWK+:} false; then :
8564  $as_echo_n "(cached) " >&6
8565else
8566  case $NAWK in
8567  [\\/]* | ?:[\\/]*)
8568  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8569  ;;
8570  *)
8571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8572for as_dir in $PATH
8573do
8574  IFS=$as_save_IFS
8575  test -z "$as_dir" && as_dir=.
8576    for ac_exec_ext in '' $ac_executable_extensions; do
8577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8578    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8580    break 2
8581  fi
8582done
8583  done
8584IFS=$as_save_IFS
8585
8586  ;;
8587esac
8588fi
8589NAWK=$ac_cv_path_NAWK
8590if test -n "$NAWK"; then
8591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8592$as_echo "$NAWK" >&6; }
8593else
8594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595$as_echo "no" >&6; }
8596fi
8597
8598
8599        if test "x$NAWK" = x; then
8600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8601        fi
8602      else
8603        # Otherwise we believe it is a complete path. Use it as it is.
8604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8605$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8607$as_echo_n "checking for NAWK... " >&6; }
8608        if test ! -x "$tool_specified"; then
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8610$as_echo "not found" >&6; }
8611          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8612        fi
8613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8614$as_echo "$tool_specified" >&6; }
8615      fi
8616    fi
8617  fi
8618
8619
8620
8621  if test "x$NAWK" = x; then
8622    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8623  fi
8624
8625
8626
8627
8628
8629  # Publish this variable in the help.
8630
8631
8632  if test "x$PRINTF" = x; then
8633    # The variable is not set by user, try to locate tool using the code snippet
8634    for ac_prog in printf
8635do
8636  # Extract the first word of "$ac_prog", so it can be a program name with args.
8637set dummy $ac_prog; ac_word=$2
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639$as_echo_n "checking for $ac_word... " >&6; }
8640if ${ac_cv_path_PRINTF+:} false; then :
8641  $as_echo_n "(cached) " >&6
8642else
8643  case $PRINTF in
8644  [\\/]* | ?:[\\/]*)
8645  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8646  ;;
8647  *)
8648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649for as_dir in $PATH
8650do
8651  IFS=$as_save_IFS
8652  test -z "$as_dir" && as_dir=.
8653    for ac_exec_ext in '' $ac_executable_extensions; do
8654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657    break 2
8658  fi
8659done
8660  done
8661IFS=$as_save_IFS
8662
8663  ;;
8664esac
8665fi
8666PRINTF=$ac_cv_path_PRINTF
8667if test -n "$PRINTF"; then
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8669$as_echo "$PRINTF" >&6; }
8670else
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672$as_echo "no" >&6; }
8673fi
8674
8675
8676  test -n "$PRINTF" && break
8677done
8678
8679  else
8680    # The variable is set, but is it from the command line or the environment?
8681
8682    # Try to remove the string !PRINTF! from our list.
8683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8685      # If it failed, the variable was not from the command line. Ignore it,
8686      # but warn the user (except for BASH, which is always set by the calling BASH).
8687      if test "xPRINTF" != xBASH; then
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8689$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8690      fi
8691      # Try to locate tool using the code snippet
8692      for ac_prog in printf
8693do
8694  # Extract the first word of "$ac_prog", so it can be a program name with args.
8695set dummy $ac_prog; ac_word=$2
8696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697$as_echo_n "checking for $ac_word... " >&6; }
8698if ${ac_cv_path_PRINTF+:} false; then :
8699  $as_echo_n "(cached) " >&6
8700else
8701  case $PRINTF in
8702  [\\/]* | ?:[\\/]*)
8703  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8704  ;;
8705  *)
8706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709  IFS=$as_save_IFS
8710  test -z "$as_dir" && as_dir=.
8711    for ac_exec_ext in '' $ac_executable_extensions; do
8712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715    break 2
8716  fi
8717done
8718  done
8719IFS=$as_save_IFS
8720
8721  ;;
8722esac
8723fi
8724PRINTF=$ac_cv_path_PRINTF
8725if test -n "$PRINTF"; then
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8727$as_echo "$PRINTF" >&6; }
8728else
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730$as_echo "no" >&6; }
8731fi
8732
8733
8734  test -n "$PRINTF" && break
8735done
8736
8737    else
8738      # If it succeeded, then it was overridden by the user. We will use it
8739      # for the tool.
8740
8741      # First remove it from the list of overridden variables, so we can test
8742      # for unknown variables in the end.
8743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8744
8745      # Check if the provided tool contains a complete path.
8746      tool_specified="$PRINTF"
8747      tool_basename="${tool_specified##*/}"
8748      if test "x$tool_basename" = "x$tool_specified"; then
8749        # A command without a complete path is provided, search $PATH.
8750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8751$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8752        # Extract the first word of "$tool_basename", so it can be a program name with args.
8753set dummy $tool_basename; ac_word=$2
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755$as_echo_n "checking for $ac_word... " >&6; }
8756if ${ac_cv_path_PRINTF+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  case $PRINTF in
8760  [\\/]* | ?:[\\/]*)
8761  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8762  ;;
8763  *)
8764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767  IFS=$as_save_IFS
8768  test -z "$as_dir" && as_dir=.
8769    for ac_exec_ext in '' $ac_executable_extensions; do
8770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773    break 2
8774  fi
8775done
8776  done
8777IFS=$as_save_IFS
8778
8779  ;;
8780esac
8781fi
8782PRINTF=$ac_cv_path_PRINTF
8783if test -n "$PRINTF"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8785$as_echo "$PRINTF" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792        if test "x$PRINTF" = x; then
8793          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8794        fi
8795      else
8796        # Otherwise we believe it is a complete path. Use it as it is.
8797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8798$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8800$as_echo_n "checking for PRINTF... " >&6; }
8801        if test ! -x "$tool_specified"; then
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8803$as_echo "not found" >&6; }
8804          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8805        fi
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8807$as_echo "$tool_specified" >&6; }
8808      fi
8809    fi
8810  fi
8811
8812
8813
8814  if test "x$PRINTF" = x; then
8815    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8816  fi
8817
8818
8819
8820
8821
8822  # Publish this variable in the help.
8823
8824
8825  if test "x$RM" = x; then
8826    # The variable is not set by user, try to locate tool using the code snippet
8827    for ac_prog in rm
8828do
8829  # Extract the first word of "$ac_prog", so it can be a program name with args.
8830set dummy $ac_prog; ac_word=$2
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832$as_echo_n "checking for $ac_word... " >&6; }
8833if ${ac_cv_path_RM+:} false; then :
8834  $as_echo_n "(cached) " >&6
8835else
8836  case $RM in
8837  [\\/]* | ?:[\\/]*)
8838  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8839  ;;
8840  *)
8841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842for as_dir in $PATH
8843do
8844  IFS=$as_save_IFS
8845  test -z "$as_dir" && as_dir=.
8846    for ac_exec_ext in '' $ac_executable_extensions; do
8847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850    break 2
8851  fi
8852done
8853  done
8854IFS=$as_save_IFS
8855
8856  ;;
8857esac
8858fi
8859RM=$ac_cv_path_RM
8860if test -n "$RM"; then
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8862$as_echo "$RM" >&6; }
8863else
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865$as_echo "no" >&6; }
8866fi
8867
8868
8869  test -n "$RM" && break
8870done
8871
8872  else
8873    # The variable is set, but is it from the command line or the environment?
8874
8875    # Try to remove the string !RM! from our list.
8876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8878      # If it failed, the variable was not from the command line. Ignore it,
8879      # but warn the user (except for BASH, which is always set by the calling BASH).
8880      if test "xRM" != xBASH; then
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8882$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8883      fi
8884      # Try to locate tool using the code snippet
8885      for ac_prog in rm
8886do
8887  # Extract the first word of "$ac_prog", so it can be a program name with args.
8888set dummy $ac_prog; ac_word=$2
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890$as_echo_n "checking for $ac_word... " >&6; }
8891if ${ac_cv_path_RM+:} false; then :
8892  $as_echo_n "(cached) " >&6
8893else
8894  case $RM in
8895  [\\/]* | ?:[\\/]*)
8896  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8897  ;;
8898  *)
8899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900for as_dir in $PATH
8901do
8902  IFS=$as_save_IFS
8903  test -z "$as_dir" && as_dir=.
8904    for ac_exec_ext in '' $ac_executable_extensions; do
8905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908    break 2
8909  fi
8910done
8911  done
8912IFS=$as_save_IFS
8913
8914  ;;
8915esac
8916fi
8917RM=$ac_cv_path_RM
8918if test -n "$RM"; then
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8920$as_echo "$RM" >&6; }
8921else
8922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
8924fi
8925
8926
8927  test -n "$RM" && break
8928done
8929
8930    else
8931      # If it succeeded, then it was overridden by the user. We will use it
8932      # for the tool.
8933
8934      # First remove it from the list of overridden variables, so we can test
8935      # for unknown variables in the end.
8936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8937
8938      # Check if the provided tool contains a complete path.
8939      tool_specified="$RM"
8940      tool_basename="${tool_specified##*/}"
8941      if test "x$tool_basename" = "x$tool_specified"; then
8942        # A command without a complete path is provided, search $PATH.
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8944$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8945        # Extract the first word of "$tool_basename", so it can be a program name with args.
8946set dummy $tool_basename; ac_word=$2
8947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8948$as_echo_n "checking for $ac_word... " >&6; }
8949if ${ac_cv_path_RM+:} false; then :
8950  $as_echo_n "(cached) " >&6
8951else
8952  case $RM in
8953  [\\/]* | ?:[\\/]*)
8954  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8955  ;;
8956  *)
8957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8958for as_dir in $PATH
8959do
8960  IFS=$as_save_IFS
8961  test -z "$as_dir" && as_dir=.
8962    for ac_exec_ext in '' $ac_executable_extensions; do
8963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8964    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8966    break 2
8967  fi
8968done
8969  done
8970IFS=$as_save_IFS
8971
8972  ;;
8973esac
8974fi
8975RM=$ac_cv_path_RM
8976if test -n "$RM"; then
8977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8978$as_echo "$RM" >&6; }
8979else
8980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8981$as_echo "no" >&6; }
8982fi
8983
8984
8985        if test "x$RM" = x; then
8986          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8987        fi
8988      else
8989        # Otherwise we believe it is a complete path. Use it as it is.
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8991$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8993$as_echo_n "checking for RM... " >&6; }
8994        if test ! -x "$tool_specified"; then
8995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8996$as_echo "not found" >&6; }
8997          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8998        fi
8999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9000$as_echo "$tool_specified" >&6; }
9001      fi
9002    fi
9003  fi
9004
9005
9006
9007  if test "x$RM" = x; then
9008    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9009  fi
9010
9011
9012
9013
9014
9015  # Publish this variable in the help.
9016
9017
9018  if test "x$SH" = x; then
9019    # The variable is not set by user, try to locate tool using the code snippet
9020    for ac_prog in sh
9021do
9022  # Extract the first word of "$ac_prog", so it can be a program name with args.
9023set dummy $ac_prog; ac_word=$2
9024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9025$as_echo_n "checking for $ac_word... " >&6; }
9026if ${ac_cv_path_SH+:} false; then :
9027  $as_echo_n "(cached) " >&6
9028else
9029  case $SH in
9030  [\\/]* | ?:[\\/]*)
9031  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9032  ;;
9033  *)
9034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035for as_dir in $PATH
9036do
9037  IFS=$as_save_IFS
9038  test -z "$as_dir" && as_dir=.
9039    for ac_exec_ext in '' $ac_executable_extensions; do
9040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9041    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9043    break 2
9044  fi
9045done
9046  done
9047IFS=$as_save_IFS
9048
9049  ;;
9050esac
9051fi
9052SH=$ac_cv_path_SH
9053if test -n "$SH"; then
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9055$as_echo "$SH" >&6; }
9056else
9057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9058$as_echo "no" >&6; }
9059fi
9060
9061
9062  test -n "$SH" && break
9063done
9064
9065  else
9066    # The variable is set, but is it from the command line or the environment?
9067
9068    # Try to remove the string !SH! from our list.
9069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9071      # If it failed, the variable was not from the command line. Ignore it,
9072      # but warn the user (except for BASH, which is always set by the calling BASH).
9073      if test "xSH" != xBASH; then
9074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9075$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9076      fi
9077      # Try to locate tool using the code snippet
9078      for ac_prog in sh
9079do
9080  # Extract the first word of "$ac_prog", so it can be a program name with args.
9081set dummy $ac_prog; ac_word=$2
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083$as_echo_n "checking for $ac_word... " >&6; }
9084if ${ac_cv_path_SH+:} false; then :
9085  $as_echo_n "(cached) " >&6
9086else
9087  case $SH in
9088  [\\/]* | ?:[\\/]*)
9089  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9090  ;;
9091  *)
9092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093for as_dir in $PATH
9094do
9095  IFS=$as_save_IFS
9096  test -z "$as_dir" && as_dir=.
9097    for ac_exec_ext in '' $ac_executable_extensions; do
9098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9101    break 2
9102  fi
9103done
9104  done
9105IFS=$as_save_IFS
9106
9107  ;;
9108esac
9109fi
9110SH=$ac_cv_path_SH
9111if test -n "$SH"; then
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9113$as_echo "$SH" >&6; }
9114else
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
9117fi
9118
9119
9120  test -n "$SH" && break
9121done
9122
9123    else
9124      # If it succeeded, then it was overridden by the user. We will use it
9125      # for the tool.
9126
9127      # First remove it from the list of overridden variables, so we can test
9128      # for unknown variables in the end.
9129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9130
9131      # Check if the provided tool contains a complete path.
9132      tool_specified="$SH"
9133      tool_basename="${tool_specified##*/}"
9134      if test "x$tool_basename" = "x$tool_specified"; then
9135        # A command without a complete path is provided, search $PATH.
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9137$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9138        # Extract the first word of "$tool_basename", so it can be a program name with args.
9139set dummy $tool_basename; ac_word=$2
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141$as_echo_n "checking for $ac_word... " >&6; }
9142if ${ac_cv_path_SH+:} false; then :
9143  $as_echo_n "(cached) " >&6
9144else
9145  case $SH in
9146  [\\/]* | ?:[\\/]*)
9147  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9148  ;;
9149  *)
9150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151for as_dir in $PATH
9152do
9153  IFS=$as_save_IFS
9154  test -z "$as_dir" && as_dir=.
9155    for ac_exec_ext in '' $ac_executable_extensions; do
9156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9157    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9159    break 2
9160  fi
9161done
9162  done
9163IFS=$as_save_IFS
9164
9165  ;;
9166esac
9167fi
9168SH=$ac_cv_path_SH
9169if test -n "$SH"; then
9170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9171$as_echo "$SH" >&6; }
9172else
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
9175fi
9176
9177
9178        if test "x$SH" = x; then
9179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9180        fi
9181      else
9182        # Otherwise we believe it is a complete path. Use it as it is.
9183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9184$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9186$as_echo_n "checking for SH... " >&6; }
9187        if test ! -x "$tool_specified"; then
9188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9189$as_echo "not found" >&6; }
9190          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9191        fi
9192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9193$as_echo "$tool_specified" >&6; }
9194      fi
9195    fi
9196  fi
9197
9198
9199
9200  if test "x$SH" = x; then
9201    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9202  fi
9203
9204
9205
9206
9207
9208  # Publish this variable in the help.
9209
9210
9211  if test "x$SORT" = x; then
9212    # The variable is not set by user, try to locate tool using the code snippet
9213    for ac_prog in sort
9214do
9215  # Extract the first word of "$ac_prog", so it can be a program name with args.
9216set dummy $ac_prog; ac_word=$2
9217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9218$as_echo_n "checking for $ac_word... " >&6; }
9219if ${ac_cv_path_SORT+:} false; then :
9220  $as_echo_n "(cached) " >&6
9221else
9222  case $SORT in
9223  [\\/]* | ?:[\\/]*)
9224  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9225  ;;
9226  *)
9227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9228for as_dir in $PATH
9229do
9230  IFS=$as_save_IFS
9231  test -z "$as_dir" && as_dir=.
9232    for ac_exec_ext in '' $ac_executable_extensions; do
9233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9234    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9236    break 2
9237  fi
9238done
9239  done
9240IFS=$as_save_IFS
9241
9242  ;;
9243esac
9244fi
9245SORT=$ac_cv_path_SORT
9246if test -n "$SORT"; then
9247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9248$as_echo "$SORT" >&6; }
9249else
9250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9251$as_echo "no" >&6; }
9252fi
9253
9254
9255  test -n "$SORT" && break
9256done
9257
9258  else
9259    # The variable is set, but is it from the command line or the environment?
9260
9261    # Try to remove the string !SORT! from our list.
9262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9264      # If it failed, the variable was not from the command line. Ignore it,
9265      # but warn the user (except for BASH, which is always set by the calling BASH).
9266      if test "xSORT" != xBASH; then
9267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9268$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9269      fi
9270      # Try to locate tool using the code snippet
9271      for ac_prog in sort
9272do
9273  # Extract the first word of "$ac_prog", so it can be a program name with args.
9274set dummy $ac_prog; ac_word=$2
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276$as_echo_n "checking for $ac_word... " >&6; }
9277if ${ac_cv_path_SORT+:} false; then :
9278  $as_echo_n "(cached) " >&6
9279else
9280  case $SORT in
9281  [\\/]* | ?:[\\/]*)
9282  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9283  ;;
9284  *)
9285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286for as_dir in $PATH
9287do
9288  IFS=$as_save_IFS
9289  test -z "$as_dir" && as_dir=.
9290    for ac_exec_ext in '' $ac_executable_extensions; do
9291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294    break 2
9295  fi
9296done
9297  done
9298IFS=$as_save_IFS
9299
9300  ;;
9301esac
9302fi
9303SORT=$ac_cv_path_SORT
9304if test -n "$SORT"; then
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9306$as_echo "$SORT" >&6; }
9307else
9308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
9310fi
9311
9312
9313  test -n "$SORT" && break
9314done
9315
9316    else
9317      # If it succeeded, then it was overridden by the user. We will use it
9318      # for the tool.
9319
9320      # First remove it from the list of overridden variables, so we can test
9321      # for unknown variables in the end.
9322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9323
9324      # Check if the provided tool contains a complete path.
9325      tool_specified="$SORT"
9326      tool_basename="${tool_specified##*/}"
9327      if test "x$tool_basename" = "x$tool_specified"; then
9328        # A command without a complete path is provided, search $PATH.
9329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9330$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9331        # Extract the first word of "$tool_basename", so it can be a program name with args.
9332set dummy $tool_basename; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_SORT+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $SORT in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361SORT=$ac_cv_path_SORT
9362if test -n "$SORT"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9364$as_echo "$SORT" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371        if test "x$SORT" = x; then
9372          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9373        fi
9374      else
9375        # Otherwise we believe it is a complete path. Use it as it is.
9376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9377$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9379$as_echo_n "checking for SORT... " >&6; }
9380        if test ! -x "$tool_specified"; then
9381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9382$as_echo "not found" >&6; }
9383          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9384        fi
9385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9386$as_echo "$tool_specified" >&6; }
9387      fi
9388    fi
9389  fi
9390
9391
9392
9393  if test "x$SORT" = x; then
9394    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9395  fi
9396
9397
9398
9399
9400
9401  # Publish this variable in the help.
9402
9403
9404  if test "x$TAIL" = x; then
9405    # The variable is not set by user, try to locate tool using the code snippet
9406    for ac_prog in tail
9407do
9408  # Extract the first word of "$ac_prog", so it can be a program name with args.
9409set dummy $ac_prog; 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_TAIL+:} false; then :
9413  $as_echo_n "(cached) " >&6
9414else
9415  case $TAIL in
9416  [\\/]* | ?:[\\/]*)
9417  ac_cv_path_TAIL="$TAIL" # 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_TAIL="$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
9438TAIL=$ac_cv_path_TAIL
9439if test -n "$TAIL"; then
9440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9441$as_echo "$TAIL" >&6; }
9442else
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
9445fi
9446
9447
9448  test -n "$TAIL" && break
9449done
9450
9451  else
9452    # The variable is set, but is it from the command line or the environment?
9453
9454    # Try to remove the string !TAIL! from our list.
9455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9457      # If it failed, the variable was not from the command line. Ignore it,
9458      # but warn the user (except for BASH, which is always set by the calling BASH).
9459      if test "xTAIL" != xBASH; then
9460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9461$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9462      fi
9463      # Try to locate tool using the code snippet
9464      for ac_prog in tail
9465do
9466  # Extract the first word of "$ac_prog", so it can be a program name with args.
9467set dummy $ac_prog; ac_word=$2
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469$as_echo_n "checking for $ac_word... " >&6; }
9470if ${ac_cv_path_TAIL+:} false; then :
9471  $as_echo_n "(cached) " >&6
9472else
9473  case $TAIL in
9474  [\\/]* | ?:[\\/]*)
9475  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9476  ;;
9477  *)
9478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479for as_dir in $PATH
9480do
9481  IFS=$as_save_IFS
9482  test -z "$as_dir" && as_dir=.
9483    for ac_exec_ext in '' $ac_executable_extensions; do
9484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9485    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9487    break 2
9488  fi
9489done
9490  done
9491IFS=$as_save_IFS
9492
9493  ;;
9494esac
9495fi
9496TAIL=$ac_cv_path_TAIL
9497if test -n "$TAIL"; then
9498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9499$as_echo "$TAIL" >&6; }
9500else
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
9503fi
9504
9505
9506  test -n "$TAIL" && break
9507done
9508
9509    else
9510      # If it succeeded, then it was overridden by the user. We will use it
9511      # for the tool.
9512
9513      # First remove it from the list of overridden variables, so we can test
9514      # for unknown variables in the end.
9515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9516
9517      # Check if the provided tool contains a complete path.
9518      tool_specified="$TAIL"
9519      tool_basename="${tool_specified##*/}"
9520      if test "x$tool_basename" = "x$tool_specified"; then
9521        # A command without a complete path is provided, search $PATH.
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9523$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9524        # Extract the first word of "$tool_basename", so it can be a program name with args.
9525set dummy $tool_basename; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if ${ac_cv_path_TAIL+:} false; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  case $TAIL in
9532  [\\/]* | ?:[\\/]*)
9533  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9534  ;;
9535  *)
9536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539  IFS=$as_save_IFS
9540  test -z "$as_dir" && as_dir=.
9541    for ac_exec_ext in '' $ac_executable_extensions; do
9542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9543    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545    break 2
9546  fi
9547done
9548  done
9549IFS=$as_save_IFS
9550
9551  ;;
9552esac
9553fi
9554TAIL=$ac_cv_path_TAIL
9555if test -n "$TAIL"; then
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9557$as_echo "$TAIL" >&6; }
9558else
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
9561fi
9562
9563
9564        if test "x$TAIL" = x; then
9565          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9566        fi
9567      else
9568        # Otherwise we believe it is a complete path. Use it as it is.
9569        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9570$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9572$as_echo_n "checking for TAIL... " >&6; }
9573        if test ! -x "$tool_specified"; then
9574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9575$as_echo "not found" >&6; }
9576          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9577        fi
9578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9579$as_echo "$tool_specified" >&6; }
9580      fi
9581    fi
9582  fi
9583
9584
9585
9586  if test "x$TAIL" = x; then
9587    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9588  fi
9589
9590
9591
9592
9593
9594  # Publish this variable in the help.
9595
9596
9597  if test "x$TAR" = x; then
9598    # The variable is not set by user, try to locate tool using the code snippet
9599    for ac_prog in tar
9600do
9601  # Extract the first word of "$ac_prog", so it can be a program name with args.
9602set dummy $ac_prog; ac_word=$2
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9604$as_echo_n "checking for $ac_word... " >&6; }
9605if ${ac_cv_path_TAR+:} false; then :
9606  $as_echo_n "(cached) " >&6
9607else
9608  case $TAR in
9609  [\\/]* | ?:[\\/]*)
9610  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9611  ;;
9612  *)
9613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614for as_dir in $PATH
9615do
9616  IFS=$as_save_IFS
9617  test -z "$as_dir" && as_dir=.
9618    for ac_exec_ext in '' $ac_executable_extensions; do
9619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622    break 2
9623  fi
9624done
9625  done
9626IFS=$as_save_IFS
9627
9628  ;;
9629esac
9630fi
9631TAR=$ac_cv_path_TAR
9632if test -n "$TAR"; then
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9634$as_echo "$TAR" >&6; }
9635else
9636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
9638fi
9639
9640
9641  test -n "$TAR" && break
9642done
9643
9644  else
9645    # The variable is set, but is it from the command line or the environment?
9646
9647    # Try to remove the string !TAR! from our list.
9648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9650      # If it failed, the variable was not from the command line. Ignore it,
9651      # but warn the user (except for BASH, which is always set by the calling BASH).
9652      if test "xTAR" != xBASH; then
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9654$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9655      fi
9656      # Try to locate tool using the code snippet
9657      for ac_prog in tar
9658do
9659  # Extract the first word of "$ac_prog", so it can be a program name with args.
9660set dummy $ac_prog; ac_word=$2
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662$as_echo_n "checking for $ac_word... " >&6; }
9663if ${ac_cv_path_TAR+:} false; then :
9664  $as_echo_n "(cached) " >&6
9665else
9666  case $TAR in
9667  [\\/]* | ?:[\\/]*)
9668  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9669  ;;
9670  *)
9671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672for as_dir in $PATH
9673do
9674  IFS=$as_save_IFS
9675  test -z "$as_dir" && as_dir=.
9676    for ac_exec_ext in '' $ac_executable_extensions; do
9677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680    break 2
9681  fi
9682done
9683  done
9684IFS=$as_save_IFS
9685
9686  ;;
9687esac
9688fi
9689TAR=$ac_cv_path_TAR
9690if test -n "$TAR"; then
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9692$as_echo "$TAR" >&6; }
9693else
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696fi
9697
9698
9699  test -n "$TAR" && break
9700done
9701
9702    else
9703      # If it succeeded, then it was overridden by the user. We will use it
9704      # for the tool.
9705
9706      # First remove it from the list of overridden variables, so we can test
9707      # for unknown variables in the end.
9708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9709
9710      # Check if the provided tool contains a complete path.
9711      tool_specified="$TAR"
9712      tool_basename="${tool_specified##*/}"
9713      if test "x$tool_basename" = "x$tool_specified"; then
9714        # A command without a complete path is provided, search $PATH.
9715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9716$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9717        # Extract the first word of "$tool_basename", so it can be a program name with args.
9718set dummy $tool_basename; ac_word=$2
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9720$as_echo_n "checking for $ac_word... " >&6; }
9721if ${ac_cv_path_TAR+:} false; then :
9722  $as_echo_n "(cached) " >&6
9723else
9724  case $TAR in
9725  [\\/]* | ?:[\\/]*)
9726  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9727  ;;
9728  *)
9729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730for as_dir in $PATH
9731do
9732  IFS=$as_save_IFS
9733  test -z "$as_dir" && as_dir=.
9734    for ac_exec_ext in '' $ac_executable_extensions; do
9735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9736    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9738    break 2
9739  fi
9740done
9741  done
9742IFS=$as_save_IFS
9743
9744  ;;
9745esac
9746fi
9747TAR=$ac_cv_path_TAR
9748if test -n "$TAR"; then
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9750$as_echo "$TAR" >&6; }
9751else
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
9754fi
9755
9756
9757        if test "x$TAR" = x; then
9758          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9759        fi
9760      else
9761        # Otherwise we believe it is a complete path. Use it as it is.
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9763$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9765$as_echo_n "checking for TAR... " >&6; }
9766        if test ! -x "$tool_specified"; then
9767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9768$as_echo "not found" >&6; }
9769          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9770        fi
9771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9772$as_echo "$tool_specified" >&6; }
9773      fi
9774    fi
9775  fi
9776
9777
9778
9779  if test "x$TAR" = x; then
9780    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9781  fi
9782
9783
9784
9785
9786
9787  # Publish this variable in the help.
9788
9789
9790  if test "x$TEE" = x; then
9791    # The variable is not set by user, try to locate tool using the code snippet
9792    for ac_prog in tee
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_TEE+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $TEE in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824TEE=$ac_cv_path_TEE
9825if test -n "$TEE"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9827$as_echo "$TEE" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$TEE" && break
9835done
9836
9837  else
9838    # The variable is set, but is it from the command line or the environment?
9839
9840    # Try to remove the string !TEE! from our list.
9841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9843      # If it failed, the variable was not from the command line. Ignore it,
9844      # but warn the user (except for BASH, which is always set by the calling BASH).
9845      if test "xTEE" != xBASH; then
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9847$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9848      fi
9849      # Try to locate tool using the code snippet
9850      for ac_prog in tee
9851do
9852  # Extract the first word of "$ac_prog", so it can be a program name with args.
9853set dummy $ac_prog; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_TEE+:} false; then :
9857  $as_echo_n "(cached) " >&6
9858else
9859  case $TEE in
9860  [\\/]* | ?:[\\/]*)
9861  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9862  ;;
9863  *)
9864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  test -z "$as_dir" && as_dir=.
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879  ;;
9880esac
9881fi
9882TEE=$ac_cv_path_TEE
9883if test -n "$TEE"; then
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9885$as_echo "$TEE" >&6; }
9886else
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891
9892  test -n "$TEE" && break
9893done
9894
9895    else
9896      # If it succeeded, then it was overridden by the user. We will use it
9897      # for the tool.
9898
9899      # First remove it from the list of overridden variables, so we can test
9900      # for unknown variables in the end.
9901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9902
9903      # Check if the provided tool contains a complete path.
9904      tool_specified="$TEE"
9905      tool_basename="${tool_specified##*/}"
9906      if test "x$tool_basename" = "x$tool_specified"; then
9907        # A command without a complete path is provided, search $PATH.
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9909$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9910        # Extract the first word of "$tool_basename", so it can be a program name with args.
9911set dummy $tool_basename; ac_word=$2
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913$as_echo_n "checking for $ac_word... " >&6; }
9914if ${ac_cv_path_TEE+:} false; then :
9915  $as_echo_n "(cached) " >&6
9916else
9917  case $TEE in
9918  [\\/]* | ?:[\\/]*)
9919  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9920  ;;
9921  *)
9922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923for as_dir in $PATH
9924do
9925  IFS=$as_save_IFS
9926  test -z "$as_dir" && as_dir=.
9927    for ac_exec_ext in '' $ac_executable_extensions; do
9928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931    break 2
9932  fi
9933done
9934  done
9935IFS=$as_save_IFS
9936
9937  ;;
9938esac
9939fi
9940TEE=$ac_cv_path_TEE
9941if test -n "$TEE"; then
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9943$as_echo "$TEE" >&6; }
9944else
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
9947fi
9948
9949
9950        if test "x$TEE" = x; then
9951          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9952        fi
9953      else
9954        # Otherwise we believe it is a complete path. Use it as it is.
9955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9956$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9958$as_echo_n "checking for TEE... " >&6; }
9959        if test ! -x "$tool_specified"; then
9960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9961$as_echo "not found" >&6; }
9962          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9963        fi
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9965$as_echo "$tool_specified" >&6; }
9966      fi
9967    fi
9968  fi
9969
9970
9971
9972  if test "x$TEE" = x; then
9973    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9974  fi
9975
9976
9977
9978
9979
9980  # Publish this variable in the help.
9981
9982
9983  if test "x$TOUCH" = x; then
9984    # The variable is not set by user, try to locate tool using the code snippet
9985    for ac_prog in touch
9986do
9987  # Extract the first word of "$ac_prog", so it can be a program name with args.
9988set dummy $ac_prog; ac_word=$2
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9990$as_echo_n "checking for $ac_word... " >&6; }
9991if ${ac_cv_path_TOUCH+:} false; then :
9992  $as_echo_n "(cached) " >&6
9993else
9994  case $TOUCH in
9995  [\\/]* | ?:[\\/]*)
9996  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9997  ;;
9998  *)
9999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10000for as_dir in $PATH
10001do
10002  IFS=$as_save_IFS
10003  test -z "$as_dir" && as_dir=.
10004    for ac_exec_ext in '' $ac_executable_extensions; do
10005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10006    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10008    break 2
10009  fi
10010done
10011  done
10012IFS=$as_save_IFS
10013
10014  ;;
10015esac
10016fi
10017TOUCH=$ac_cv_path_TOUCH
10018if test -n "$TOUCH"; then
10019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10020$as_echo "$TOUCH" >&6; }
10021else
10022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023$as_echo "no" >&6; }
10024fi
10025
10026
10027  test -n "$TOUCH" && break
10028done
10029
10030  else
10031    # The variable is set, but is it from the command line or the environment?
10032
10033    # Try to remove the string !TOUCH! from our list.
10034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10036      # If it failed, the variable was not from the command line. Ignore it,
10037      # but warn the user (except for BASH, which is always set by the calling BASH).
10038      if test "xTOUCH" != xBASH; then
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10040$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10041      fi
10042      # Try to locate tool using the code snippet
10043      for ac_prog in touch
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if ${ac_cv_path_TOUCH+:} false; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $TOUCH in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075TOUCH=$ac_cv_path_TOUCH
10076if test -n "$TOUCH"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10078$as_echo "$TOUCH" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$TOUCH" && break
10086done
10087
10088    else
10089      # If it succeeded, then it was overridden by the user. We will use it
10090      # for the tool.
10091
10092      # First remove it from the list of overridden variables, so we can test
10093      # for unknown variables in the end.
10094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10095
10096      # Check if the provided tool contains a complete path.
10097      tool_specified="$TOUCH"
10098      tool_basename="${tool_specified##*/}"
10099      if test "x$tool_basename" = "x$tool_specified"; then
10100        # A command without a complete path is provided, search $PATH.
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10102$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10103        # Extract the first word of "$tool_basename", so it can be a program name with args.
10104set dummy $tool_basename; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_TOUCH+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $TOUCH in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133TOUCH=$ac_cv_path_TOUCH
10134if test -n "$TOUCH"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10136$as_echo "$TOUCH" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143        if test "x$TOUCH" = x; then
10144          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10145        fi
10146      else
10147        # Otherwise we believe it is a complete path. Use it as it is.
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10149$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10151$as_echo_n "checking for TOUCH... " >&6; }
10152        if test ! -x "$tool_specified"; then
10153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10154$as_echo "not found" >&6; }
10155          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10156        fi
10157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10158$as_echo "$tool_specified" >&6; }
10159      fi
10160    fi
10161  fi
10162
10163
10164
10165  if test "x$TOUCH" = x; then
10166    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10167  fi
10168
10169
10170
10171
10172
10173  # Publish this variable in the help.
10174
10175
10176  if test "x$TR" = x; then
10177    # The variable is not set by user, try to locate tool using the code snippet
10178    for ac_prog in tr
10179do
10180  # Extract the first word of "$ac_prog", so it can be a program name with args.
10181set dummy $ac_prog; ac_word=$2
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183$as_echo_n "checking for $ac_word... " >&6; }
10184if ${ac_cv_path_TR+:} false; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  case $TR in
10188  [\\/]* | ?:[\\/]*)
10189  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10190  ;;
10191  *)
10192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193for as_dir in $PATH
10194do
10195  IFS=$as_save_IFS
10196  test -z "$as_dir" && as_dir=.
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201    break 2
10202  fi
10203done
10204  done
10205IFS=$as_save_IFS
10206
10207  ;;
10208esac
10209fi
10210TR=$ac_cv_path_TR
10211if test -n "$TR"; then
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10213$as_echo "$TR" >&6; }
10214else
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216$as_echo "no" >&6; }
10217fi
10218
10219
10220  test -n "$TR" && break
10221done
10222
10223  else
10224    # The variable is set, but is it from the command line or the environment?
10225
10226    # Try to remove the string !TR! from our list.
10227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10229      # If it failed, the variable was not from the command line. Ignore it,
10230      # but warn the user (except for BASH, which is always set by the calling BASH).
10231      if test "xTR" != xBASH; then
10232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10233$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10234      fi
10235      # Try to locate tool using the code snippet
10236      for ac_prog in tr
10237do
10238  # Extract the first word of "$ac_prog", so it can be a program name with args.
10239set dummy $ac_prog; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if ${ac_cv_path_TR+:} false; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $TR in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  ;;
10266esac
10267fi
10268TR=$ac_cv_path_TR
10269if test -n "$TR"; then
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10271$as_echo "$TR" >&6; }
10272else
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
10275fi
10276
10277
10278  test -n "$TR" && break
10279done
10280
10281    else
10282      # If it succeeded, then it was overridden by the user. We will use it
10283      # for the tool.
10284
10285      # First remove it from the list of overridden variables, so we can test
10286      # for unknown variables in the end.
10287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10288
10289      # Check if the provided tool contains a complete path.
10290      tool_specified="$TR"
10291      tool_basename="${tool_specified##*/}"
10292      if test "x$tool_basename" = "x$tool_specified"; then
10293        # A command without a complete path is provided, search $PATH.
10294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10295$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10296        # Extract the first word of "$tool_basename", so it can be a program name with args.
10297set dummy $tool_basename; ac_word=$2
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10299$as_echo_n "checking for $ac_word... " >&6; }
10300if ${ac_cv_path_TR+:} false; then :
10301  $as_echo_n "(cached) " >&6
10302else
10303  case $TR in
10304  [\\/]* | ?:[\\/]*)
10305  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10306  ;;
10307  *)
10308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309for as_dir in $PATH
10310do
10311  IFS=$as_save_IFS
10312  test -z "$as_dir" && as_dir=.
10313    for ac_exec_ext in '' $ac_executable_extensions; do
10314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10315    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10317    break 2
10318  fi
10319done
10320  done
10321IFS=$as_save_IFS
10322
10323  ;;
10324esac
10325fi
10326TR=$ac_cv_path_TR
10327if test -n "$TR"; then
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10329$as_echo "$TR" >&6; }
10330else
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
10333fi
10334
10335
10336        if test "x$TR" = x; then
10337          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10338        fi
10339      else
10340        # Otherwise we believe it is a complete path. Use it as it is.
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10342$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10344$as_echo_n "checking for TR... " >&6; }
10345        if test ! -x "$tool_specified"; then
10346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10347$as_echo "not found" >&6; }
10348          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10349        fi
10350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10351$as_echo "$tool_specified" >&6; }
10352      fi
10353    fi
10354  fi
10355
10356
10357
10358  if test "x$TR" = x; then
10359    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10360  fi
10361
10362
10363
10364
10365
10366  # Publish this variable in the help.
10367
10368
10369  if test "x$UNAME" = x; then
10370    # The variable is not set by user, try to locate tool using the code snippet
10371    for ac_prog in uname
10372do
10373  # Extract the first word of "$ac_prog", so it can be a program name with args.
10374set dummy $ac_prog; ac_word=$2
10375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10376$as_echo_n "checking for $ac_word... " >&6; }
10377if ${ac_cv_path_UNAME+:} false; then :
10378  $as_echo_n "(cached) " >&6
10379else
10380  case $UNAME in
10381  [\\/]* | ?:[\\/]*)
10382  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10383  ;;
10384  *)
10385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10386for as_dir in $PATH
10387do
10388  IFS=$as_save_IFS
10389  test -z "$as_dir" && as_dir=.
10390    for ac_exec_ext in '' $ac_executable_extensions; do
10391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10392    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10394    break 2
10395  fi
10396done
10397  done
10398IFS=$as_save_IFS
10399
10400  ;;
10401esac
10402fi
10403UNAME=$ac_cv_path_UNAME
10404if test -n "$UNAME"; then
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10406$as_echo "$UNAME" >&6; }
10407else
10408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
10410fi
10411
10412
10413  test -n "$UNAME" && break
10414done
10415
10416  else
10417    # The variable is set, but is it from the command line or the environment?
10418
10419    # Try to remove the string !UNAME! from our list.
10420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10422      # If it failed, the variable was not from the command line. Ignore it,
10423      # but warn the user (except for BASH, which is always set by the calling BASH).
10424      if test "xUNAME" != xBASH; then
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10426$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10427      fi
10428      # Try to locate tool using the code snippet
10429      for ac_prog in uname
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_UNAME+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $UNAME in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461UNAME=$ac_cv_path_UNAME
10462if test -n "$UNAME"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10464$as_echo "$UNAME" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$UNAME" && break
10472done
10473
10474    else
10475      # If it succeeded, then it was overridden by the user. We will use it
10476      # for the tool.
10477
10478      # First remove it from the list of overridden variables, so we can test
10479      # for unknown variables in the end.
10480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10481
10482      # Check if the provided tool contains a complete path.
10483      tool_specified="$UNAME"
10484      tool_basename="${tool_specified##*/}"
10485      if test "x$tool_basename" = "x$tool_specified"; then
10486        # A command without a complete path is provided, search $PATH.
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10488$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10489        # Extract the first word of "$tool_basename", so it can be a program name with args.
10490set dummy $tool_basename; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_UNAME+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $UNAME in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519UNAME=$ac_cv_path_UNAME
10520if test -n "$UNAME"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10522$as_echo "$UNAME" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529        if test "x$UNAME" = x; then
10530          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10531        fi
10532      else
10533        # Otherwise we believe it is a complete path. Use it as it is.
10534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10535$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10537$as_echo_n "checking for UNAME... " >&6; }
10538        if test ! -x "$tool_specified"; then
10539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10540$as_echo "not found" >&6; }
10541          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10542        fi
10543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10544$as_echo "$tool_specified" >&6; }
10545      fi
10546    fi
10547  fi
10548
10549
10550
10551  if test "x$UNAME" = x; then
10552    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10553  fi
10554
10555
10556
10557
10558
10559  # Publish this variable in the help.
10560
10561
10562  if test "x$UNIQ" = x; then
10563    # The variable is not set by user, try to locate tool using the code snippet
10564    for ac_prog in uniq
10565do
10566  # Extract the first word of "$ac_prog", so it can be a program name with args.
10567set dummy $ac_prog; ac_word=$2
10568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10569$as_echo_n "checking for $ac_word... " >&6; }
10570if ${ac_cv_path_UNIQ+:} false; then :
10571  $as_echo_n "(cached) " >&6
10572else
10573  case $UNIQ in
10574  [\\/]* | ?:[\\/]*)
10575  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10576  ;;
10577  *)
10578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10579for as_dir in $PATH
10580do
10581  IFS=$as_save_IFS
10582  test -z "$as_dir" && as_dir=.
10583    for ac_exec_ext in '' $ac_executable_extensions; do
10584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10585    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10587    break 2
10588  fi
10589done
10590  done
10591IFS=$as_save_IFS
10592
10593  ;;
10594esac
10595fi
10596UNIQ=$ac_cv_path_UNIQ
10597if test -n "$UNIQ"; then
10598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10599$as_echo "$UNIQ" >&6; }
10600else
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
10603fi
10604
10605
10606  test -n "$UNIQ" && break
10607done
10608
10609  else
10610    # The variable is set, but is it from the command line or the environment?
10611
10612    # Try to remove the string !UNIQ! from our list.
10613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10615      # If it failed, the variable was not from the command line. Ignore it,
10616      # but warn the user (except for BASH, which is always set by the calling BASH).
10617      if test "xUNIQ" != xBASH; then
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10619$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10620      fi
10621      # Try to locate tool using the code snippet
10622      for ac_prog in uniq
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if ${ac_cv_path_UNIQ+:} false; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  case $UNIQ in
10632  [\\/]* | ?:[\\/]*)
10633  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10634  ;;
10635  *)
10636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637for as_dir in $PATH
10638do
10639  IFS=$as_save_IFS
10640  test -z "$as_dir" && as_dir=.
10641    for ac_exec_ext in '' $ac_executable_extensions; do
10642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645    break 2
10646  fi
10647done
10648  done
10649IFS=$as_save_IFS
10650
10651  ;;
10652esac
10653fi
10654UNIQ=$ac_cv_path_UNIQ
10655if test -n "$UNIQ"; then
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10657$as_echo "$UNIQ" >&6; }
10658else
10659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661fi
10662
10663
10664  test -n "$UNIQ" && break
10665done
10666
10667    else
10668      # If it succeeded, then it was overridden by the user. We will use it
10669      # for the tool.
10670
10671      # First remove it from the list of overridden variables, so we can test
10672      # for unknown variables in the end.
10673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10674
10675      # Check if the provided tool contains a complete path.
10676      tool_specified="$UNIQ"
10677      tool_basename="${tool_specified##*/}"
10678      if test "x$tool_basename" = "x$tool_specified"; then
10679        # A command without a complete path is provided, search $PATH.
10680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10681$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10682        # Extract the first word of "$tool_basename", so it can be a program name with args.
10683set dummy $tool_basename; ac_word=$2
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685$as_echo_n "checking for $ac_word... " >&6; }
10686if ${ac_cv_path_UNIQ+:} false; then :
10687  $as_echo_n "(cached) " >&6
10688else
10689  case $UNIQ in
10690  [\\/]* | ?:[\\/]*)
10691  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10692  ;;
10693  *)
10694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695for as_dir in $PATH
10696do
10697  IFS=$as_save_IFS
10698  test -z "$as_dir" && as_dir=.
10699    for ac_exec_ext in '' $ac_executable_extensions; do
10700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10701    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703    break 2
10704  fi
10705done
10706  done
10707IFS=$as_save_IFS
10708
10709  ;;
10710esac
10711fi
10712UNIQ=$ac_cv_path_UNIQ
10713if test -n "$UNIQ"; then
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10715$as_echo "$UNIQ" >&6; }
10716else
10717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
10719fi
10720
10721
10722        if test "x$UNIQ" = x; then
10723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10724        fi
10725      else
10726        # Otherwise we believe it is a complete path. Use it as it is.
10727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10728$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10730$as_echo_n "checking for UNIQ... " >&6; }
10731        if test ! -x "$tool_specified"; then
10732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10733$as_echo "not found" >&6; }
10734          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10735        fi
10736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10737$as_echo "$tool_specified" >&6; }
10738      fi
10739    fi
10740  fi
10741
10742
10743
10744  if test "x$UNIQ" = x; then
10745    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10746  fi
10747
10748
10749
10750
10751
10752  # Publish this variable in the help.
10753
10754
10755  if test "x$WC" = x; then
10756    # The variable is not set by user, try to locate tool using the code snippet
10757    for ac_prog in wc
10758do
10759  # Extract the first word of "$ac_prog", so it can be a program name with args.
10760set dummy $ac_prog; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_WC+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $WC in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789WC=$ac_cv_path_WC
10790if test -n "$WC"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10792$as_echo "$WC" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798
10799  test -n "$WC" && break
10800done
10801
10802  else
10803    # The variable is set, but is it from the command line or the environment?
10804
10805    # Try to remove the string !WC! from our list.
10806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808      # If it failed, the variable was not from the command line. Ignore it,
10809      # but warn the user (except for BASH, which is always set by the calling BASH).
10810      if test "xWC" != xBASH; then
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10812$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10813      fi
10814      # Try to locate tool using the code snippet
10815      for ac_prog in wc
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_WC+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $WC in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847WC=$ac_cv_path_WC
10848if test -n "$WC"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10850$as_echo "$WC" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$WC" && break
10858done
10859
10860    else
10861      # If it succeeded, then it was overridden by the user. We will use it
10862      # for the tool.
10863
10864      # First remove it from the list of overridden variables, so we can test
10865      # for unknown variables in the end.
10866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867
10868      # Check if the provided tool contains a complete path.
10869      tool_specified="$WC"
10870      tool_basename="${tool_specified##*/}"
10871      if test "x$tool_basename" = "x$tool_specified"; then
10872        # A command without a complete path is provided, search $PATH.
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10874$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10875        # Extract the first word of "$tool_basename", so it can be a program name with args.
10876set dummy $tool_basename; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_WC+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $WC in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905WC=$ac_cv_path_WC
10906if test -n "$WC"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10908$as_echo "$WC" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915        if test "x$WC" = x; then
10916          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10917        fi
10918      else
10919        # Otherwise we believe it is a complete path. Use it as it is.
10920        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10921$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10923$as_echo_n "checking for WC... " >&6; }
10924        if test ! -x "$tool_specified"; then
10925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10926$as_echo "not found" >&6; }
10927          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10928        fi
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10930$as_echo "$tool_specified" >&6; }
10931      fi
10932    fi
10933  fi
10934
10935
10936
10937  if test "x$WC" = x; then
10938    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10939  fi
10940
10941
10942
10943
10944
10945  # Publish this variable in the help.
10946
10947
10948  if test "x$WHICH" = x; then
10949    # The variable is not set by user, try to locate tool using the code snippet
10950    for ac_prog in which
10951do
10952  # Extract the first word of "$ac_prog", so it can be a program name with args.
10953set dummy $ac_prog; ac_word=$2
10954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10955$as_echo_n "checking for $ac_word... " >&6; }
10956if ${ac_cv_path_WHICH+:} false; then :
10957  $as_echo_n "(cached) " >&6
10958else
10959  case $WHICH in
10960  [\\/]* | ?:[\\/]*)
10961  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10962  ;;
10963  *)
10964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10965for as_dir in $PATH
10966do
10967  IFS=$as_save_IFS
10968  test -z "$as_dir" && as_dir=.
10969    for ac_exec_ext in '' $ac_executable_extensions; do
10970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10971    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10973    break 2
10974  fi
10975done
10976  done
10977IFS=$as_save_IFS
10978
10979  ;;
10980esac
10981fi
10982WHICH=$ac_cv_path_WHICH
10983if test -n "$WHICH"; then
10984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10985$as_echo "$WHICH" >&6; }
10986else
10987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
10989fi
10990
10991
10992  test -n "$WHICH" && break
10993done
10994
10995  else
10996    # The variable is set, but is it from the command line or the environment?
10997
10998    # Try to remove the string !WHICH! from our list.
10999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11001      # If it failed, the variable was not from the command line. Ignore it,
11002      # but warn the user (except for BASH, which is always set by the calling BASH).
11003      if test "xWHICH" != xBASH; then
11004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11005$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11006      fi
11007      # Try to locate tool using the code snippet
11008      for ac_prog in which
11009do
11010  # Extract the first word of "$ac_prog", so it can be a program name with args.
11011set dummy $ac_prog; ac_word=$2
11012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11013$as_echo_n "checking for $ac_word... " >&6; }
11014if ${ac_cv_path_WHICH+:} false; then :
11015  $as_echo_n "(cached) " >&6
11016else
11017  case $WHICH in
11018  [\\/]* | ?:[\\/]*)
11019  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11020  ;;
11021  *)
11022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11023for as_dir in $PATH
11024do
11025  IFS=$as_save_IFS
11026  test -z "$as_dir" && as_dir=.
11027    for ac_exec_ext in '' $ac_executable_extensions; do
11028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11029    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11031    break 2
11032  fi
11033done
11034  done
11035IFS=$as_save_IFS
11036
11037  ;;
11038esac
11039fi
11040WHICH=$ac_cv_path_WHICH
11041if test -n "$WHICH"; then
11042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11043$as_echo "$WHICH" >&6; }
11044else
11045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
11047fi
11048
11049
11050  test -n "$WHICH" && break
11051done
11052
11053    else
11054      # If it succeeded, then it was overridden by the user. We will use it
11055      # for the tool.
11056
11057      # First remove it from the list of overridden variables, so we can test
11058      # for unknown variables in the end.
11059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11060
11061      # Check if the provided tool contains a complete path.
11062      tool_specified="$WHICH"
11063      tool_basename="${tool_specified##*/}"
11064      if test "x$tool_basename" = "x$tool_specified"; then
11065        # A command without a complete path is provided, search $PATH.
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11067$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11068        # Extract the first word of "$tool_basename", so it can be a program name with args.
11069set dummy $tool_basename; ac_word=$2
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071$as_echo_n "checking for $ac_word... " >&6; }
11072if ${ac_cv_path_WHICH+:} false; then :
11073  $as_echo_n "(cached) " >&6
11074else
11075  case $WHICH in
11076  [\\/]* | ?:[\\/]*)
11077  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11078  ;;
11079  *)
11080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081for as_dir in $PATH
11082do
11083  IFS=$as_save_IFS
11084  test -z "$as_dir" && as_dir=.
11085    for ac_exec_ext in '' $ac_executable_extensions; do
11086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089    break 2
11090  fi
11091done
11092  done
11093IFS=$as_save_IFS
11094
11095  ;;
11096esac
11097fi
11098WHICH=$ac_cv_path_WHICH
11099if test -n "$WHICH"; then
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11101$as_echo "$WHICH" >&6; }
11102else
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
11105fi
11106
11107
11108        if test "x$WHICH" = x; then
11109          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11110        fi
11111      else
11112        # Otherwise we believe it is a complete path. Use it as it is.
11113        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11114$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11116$as_echo_n "checking for WHICH... " >&6; }
11117        if test ! -x "$tool_specified"; then
11118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11119$as_echo "not found" >&6; }
11120          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11121        fi
11122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11123$as_echo "$tool_specified" >&6; }
11124      fi
11125    fi
11126  fi
11127
11128
11129
11130  if test "x$WHICH" = x; then
11131    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11132  fi
11133
11134
11135
11136
11137
11138  # Publish this variable in the help.
11139
11140
11141  if test "x$XARGS" = x; then
11142    # The variable is not set by user, try to locate tool using the code snippet
11143    for ac_prog in xargs
11144do
11145  # Extract the first word of "$ac_prog", so it can be a program name with args.
11146set dummy $ac_prog; ac_word=$2
11147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11148$as_echo_n "checking for $ac_word... " >&6; }
11149if ${ac_cv_path_XARGS+:} false; then :
11150  $as_echo_n "(cached) " >&6
11151else
11152  case $XARGS in
11153  [\\/]* | ?:[\\/]*)
11154  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11155  ;;
11156  *)
11157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11158for as_dir in $PATH
11159do
11160  IFS=$as_save_IFS
11161  test -z "$as_dir" && as_dir=.
11162    for ac_exec_ext in '' $ac_executable_extensions; do
11163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11164    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11166    break 2
11167  fi
11168done
11169  done
11170IFS=$as_save_IFS
11171
11172  ;;
11173esac
11174fi
11175XARGS=$ac_cv_path_XARGS
11176if test -n "$XARGS"; then
11177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11178$as_echo "$XARGS" >&6; }
11179else
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11181$as_echo "no" >&6; }
11182fi
11183
11184
11185  test -n "$XARGS" && break
11186done
11187
11188  else
11189    # The variable is set, but is it from the command line or the environment?
11190
11191    # Try to remove the string !XARGS! from our list.
11192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11194      # If it failed, the variable was not from the command line. Ignore it,
11195      # but warn the user (except for BASH, which is always set by the calling BASH).
11196      if test "xXARGS" != xBASH; then
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11198$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11199      fi
11200      # Try to locate tool using the code snippet
11201      for ac_prog in xargs
11202do
11203  # Extract the first word of "$ac_prog", so it can be a program name with args.
11204set dummy $ac_prog; ac_word=$2
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206$as_echo_n "checking for $ac_word... " >&6; }
11207if ${ac_cv_path_XARGS+:} false; then :
11208  $as_echo_n "(cached) " >&6
11209else
11210  case $XARGS in
11211  [\\/]* | ?:[\\/]*)
11212  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11213  ;;
11214  *)
11215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216for as_dir in $PATH
11217do
11218  IFS=$as_save_IFS
11219  test -z "$as_dir" && as_dir=.
11220    for ac_exec_ext in '' $ac_executable_extensions; do
11221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224    break 2
11225  fi
11226done
11227  done
11228IFS=$as_save_IFS
11229
11230  ;;
11231esac
11232fi
11233XARGS=$ac_cv_path_XARGS
11234if test -n "$XARGS"; then
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11236$as_echo "$XARGS" >&6; }
11237else
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
11240fi
11241
11242
11243  test -n "$XARGS" && break
11244done
11245
11246    else
11247      # If it succeeded, then it was overridden by the user. We will use it
11248      # for the tool.
11249
11250      # First remove it from the list of overridden variables, so we can test
11251      # for unknown variables in the end.
11252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11253
11254      # Check if the provided tool contains a complete path.
11255      tool_specified="$XARGS"
11256      tool_basename="${tool_specified##*/}"
11257      if test "x$tool_basename" = "x$tool_specified"; then
11258        # A command without a complete path is provided, search $PATH.
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11260$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11261        # Extract the first word of "$tool_basename", so it can be a program name with args.
11262set dummy $tool_basename; ac_word=$2
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264$as_echo_n "checking for $ac_word... " >&6; }
11265if ${ac_cv_path_XARGS+:} false; then :
11266  $as_echo_n "(cached) " >&6
11267else
11268  case $XARGS in
11269  [\\/]* | ?:[\\/]*)
11270  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11271  ;;
11272  *)
11273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274for as_dir in $PATH
11275do
11276  IFS=$as_save_IFS
11277  test -z "$as_dir" && as_dir=.
11278    for ac_exec_ext in '' $ac_executable_extensions; do
11279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282    break 2
11283  fi
11284done
11285  done
11286IFS=$as_save_IFS
11287
11288  ;;
11289esac
11290fi
11291XARGS=$ac_cv_path_XARGS
11292if test -n "$XARGS"; then
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11294$as_echo "$XARGS" >&6; }
11295else
11296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
11298fi
11299
11300
11301        if test "x$XARGS" = x; then
11302          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11303        fi
11304      else
11305        # Otherwise we believe it is a complete path. Use it as it is.
11306        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11307$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11309$as_echo_n "checking for XARGS... " >&6; }
11310        if test ! -x "$tool_specified"; then
11311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11312$as_echo "not found" >&6; }
11313          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11314        fi
11315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11316$as_echo "$tool_specified" >&6; }
11317      fi
11318    fi
11319  fi
11320
11321
11322
11323  if test "x$XARGS" = x; then
11324    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11325  fi
11326
11327
11328
11329  # Then required tools that require some special treatment.
11330
11331
11332  # Publish this variable in the help.
11333
11334
11335  if test "x$AWK" = x; then
11336    # The variable is not set by user, try to locate tool using the code snippet
11337    for ac_prog in gawk mawk nawk awk
11338do
11339  # Extract the first word of "$ac_prog", so it can be a program name with args.
11340set dummy $ac_prog; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_prog_AWK+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  if test -n "$AWK"; then
11347  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11348else
11349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11350for as_dir in $PATH
11351do
11352  IFS=$as_save_IFS
11353  test -z "$as_dir" && as_dir=.
11354    for ac_exec_ext in '' $ac_executable_extensions; do
11355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11356    ac_cv_prog_AWK="$ac_prog"
11357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11358    break 2
11359  fi
11360done
11361  done
11362IFS=$as_save_IFS
11363
11364fi
11365fi
11366AWK=$ac_cv_prog_AWK
11367if test -n "$AWK"; then
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11369$as_echo "$AWK" >&6; }
11370else
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373fi
11374
11375
11376  test -n "$AWK" && break
11377done
11378
11379  else
11380    # The variable is set, but is it from the command line or the environment?
11381
11382    # Try to remove the string !AWK! from our list.
11383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11385      # If it failed, the variable was not from the command line. Ignore it,
11386      # but warn the user (except for BASH, which is always set by the calling BASH).
11387      if test "xAWK" != xBASH; then
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11389$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11390      fi
11391      # Try to locate tool using the code snippet
11392      for ac_prog in gawk mawk nawk awk
11393do
11394  # Extract the first word of "$ac_prog", so it can be a program name with args.
11395set dummy $ac_prog; ac_word=$2
11396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11397$as_echo_n "checking for $ac_word... " >&6; }
11398if ${ac_cv_prog_AWK+:} false; then :
11399  $as_echo_n "(cached) " >&6
11400else
11401  if test -n "$AWK"; then
11402  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11403else
11404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11405for as_dir in $PATH
11406do
11407  IFS=$as_save_IFS
11408  test -z "$as_dir" && as_dir=.
11409    for ac_exec_ext in '' $ac_executable_extensions; do
11410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11411    ac_cv_prog_AWK="$ac_prog"
11412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11413    break 2
11414  fi
11415done
11416  done
11417IFS=$as_save_IFS
11418
11419fi
11420fi
11421AWK=$ac_cv_prog_AWK
11422if test -n "$AWK"; then
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11424$as_echo "$AWK" >&6; }
11425else
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428fi
11429
11430
11431  test -n "$AWK" && break
11432done
11433
11434    else
11435      # If it succeeded, then it was overridden by the user. We will use it
11436      # for the tool.
11437
11438      # First remove it from the list of overridden variables, so we can test
11439      # for unknown variables in the end.
11440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11441
11442      # Check if the provided tool contains a complete path.
11443      tool_specified="$AWK"
11444      tool_basename="${tool_specified##*/}"
11445      if test "x$tool_basename" = "x$tool_specified"; then
11446        # A command without a complete path is provided, search $PATH.
11447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11448$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11449        # Extract the first word of "$tool_basename", so it can be a program name with args.
11450set dummy $tool_basename; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_path_AWK+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  case $AWK in
11457  [\\/]* | ?:[\\/]*)
11458  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11459  ;;
11460  *)
11461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476  ;;
11477esac
11478fi
11479AWK=$ac_cv_path_AWK
11480if test -n "$AWK"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11482$as_echo "$AWK" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489        if test "x$AWK" = x; then
11490          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11491        fi
11492      else
11493        # Otherwise we believe it is a complete path. Use it as it is.
11494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11495$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11497$as_echo_n "checking for AWK... " >&6; }
11498        if test ! -x "$tool_specified"; then
11499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11500$as_echo "not found" >&6; }
11501          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11502        fi
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11504$as_echo "$tool_specified" >&6; }
11505      fi
11506    fi
11507  fi
11508
11509
11510  if test "x$AWK" = x; then
11511    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11512  fi
11513
11514
11515
11516
11517  # Publish this variable in the help.
11518
11519
11520  if test "x$GREP" = x; then
11521    # The variable is not set by user, try to locate tool using the code snippet
11522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11523$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11524if ${ac_cv_path_GREP+:} false; then :
11525  $as_echo_n "(cached) " >&6
11526else
11527  if test -z "$GREP"; then
11528  ac_path_GREP_found=false
11529  # Loop through the user's path and test for each of PROGNAME-LIST
11530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11531for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11532do
11533  IFS=$as_save_IFS
11534  test -z "$as_dir" && as_dir=.
11535    for ac_prog in grep ggrep; do
11536    for ac_exec_ext in '' $ac_executable_extensions; do
11537      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11538      as_fn_executable_p "$ac_path_GREP" || continue
11539# Check for GNU ac_path_GREP and select it if it is found.
11540  # Check for GNU $ac_path_GREP
11541case `"$ac_path_GREP" --version 2>&1` in
11542*GNU*)
11543  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11544*)
11545  ac_count=0
11546  $as_echo_n 0123456789 >"conftest.in"
11547  while :
11548  do
11549    cat "conftest.in" "conftest.in" >"conftest.tmp"
11550    mv "conftest.tmp" "conftest.in"
11551    cp "conftest.in" "conftest.nl"
11552    $as_echo 'GREP' >> "conftest.nl"
11553    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11554    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11555    as_fn_arith $ac_count + 1 && ac_count=$as_val
11556    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11557      # Best one so far, save it but keep looking for a better one
11558      ac_cv_path_GREP="$ac_path_GREP"
11559      ac_path_GREP_max=$ac_count
11560    fi
11561    # 10*(2^10) chars as input seems more than enough
11562    test $ac_count -gt 10 && break
11563  done
11564  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11565esac
11566
11567      $ac_path_GREP_found && break 3
11568    done
11569  done
11570  done
11571IFS=$as_save_IFS
11572  if test -z "$ac_cv_path_GREP"; then
11573    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11574  fi
11575else
11576  ac_cv_path_GREP=$GREP
11577fi
11578
11579fi
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11581$as_echo "$ac_cv_path_GREP" >&6; }
11582 GREP="$ac_cv_path_GREP"
11583
11584
11585  else
11586    # The variable is set, but is it from the command line or the environment?
11587
11588    # Try to remove the string !GREP! from our list.
11589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11591      # If it failed, the variable was not from the command line. Ignore it,
11592      # but warn the user (except for BASH, which is always set by the calling BASH).
11593      if test "xGREP" != xBASH; then
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11595$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11596      fi
11597      # Try to locate tool using the code snippet
11598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11599$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11600if ${ac_cv_path_GREP+:} false; then :
11601  $as_echo_n "(cached) " >&6
11602else
11603  if test -z "$GREP"; then
11604  ac_path_GREP_found=false
11605  # Loop through the user's path and test for each of PROGNAME-LIST
11606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11607for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11608do
11609  IFS=$as_save_IFS
11610  test -z "$as_dir" && as_dir=.
11611    for ac_prog in grep ggrep; do
11612    for ac_exec_ext in '' $ac_executable_extensions; do
11613      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11614      as_fn_executable_p "$ac_path_GREP" || continue
11615# Check for GNU ac_path_GREP and select it if it is found.
11616  # Check for GNU $ac_path_GREP
11617case `"$ac_path_GREP" --version 2>&1` in
11618*GNU*)
11619  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11620*)
11621  ac_count=0
11622  $as_echo_n 0123456789 >"conftest.in"
11623  while :
11624  do
11625    cat "conftest.in" "conftest.in" >"conftest.tmp"
11626    mv "conftest.tmp" "conftest.in"
11627    cp "conftest.in" "conftest.nl"
11628    $as_echo 'GREP' >> "conftest.nl"
11629    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11630    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11631    as_fn_arith $ac_count + 1 && ac_count=$as_val
11632    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11633      # Best one so far, save it but keep looking for a better one
11634      ac_cv_path_GREP="$ac_path_GREP"
11635      ac_path_GREP_max=$ac_count
11636    fi
11637    # 10*(2^10) chars as input seems more than enough
11638    test $ac_count -gt 10 && break
11639  done
11640  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11641esac
11642
11643      $ac_path_GREP_found && break 3
11644    done
11645  done
11646  done
11647IFS=$as_save_IFS
11648  if test -z "$ac_cv_path_GREP"; then
11649    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11650  fi
11651else
11652  ac_cv_path_GREP=$GREP
11653fi
11654
11655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11657$as_echo "$ac_cv_path_GREP" >&6; }
11658 GREP="$ac_cv_path_GREP"
11659
11660
11661    else
11662      # If it succeeded, then it was overridden by the user. We will use it
11663      # for the tool.
11664
11665      # First remove it from the list of overridden variables, so we can test
11666      # for unknown variables in the end.
11667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11668
11669      # Check if the provided tool contains a complete path.
11670      tool_specified="$GREP"
11671      tool_basename="${tool_specified##*/}"
11672      if test "x$tool_basename" = "x$tool_specified"; then
11673        # A command without a complete path is provided, search $PATH.
11674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11675$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11676        # Extract the first word of "$tool_basename", so it can be a program name with args.
11677set dummy $tool_basename; ac_word=$2
11678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11679$as_echo_n "checking for $ac_word... " >&6; }
11680if ${ac_cv_path_GREP+:} false; then :
11681  $as_echo_n "(cached) " >&6
11682else
11683  case $GREP in
11684  [\\/]* | ?:[\\/]*)
11685  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11686  ;;
11687  *)
11688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689for as_dir in $PATH
11690do
11691  IFS=$as_save_IFS
11692  test -z "$as_dir" && as_dir=.
11693    for ac_exec_ext in '' $ac_executable_extensions; do
11694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11695    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11697    break 2
11698  fi
11699done
11700  done
11701IFS=$as_save_IFS
11702
11703  ;;
11704esac
11705fi
11706GREP=$ac_cv_path_GREP
11707if test -n "$GREP"; then
11708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11709$as_echo "$GREP" >&6; }
11710else
11711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
11713fi
11714
11715
11716        if test "x$GREP" = x; then
11717          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11718        fi
11719      else
11720        # Otherwise we believe it is a complete path. Use it as it is.
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11722$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11724$as_echo_n "checking for GREP... " >&6; }
11725        if test ! -x "$tool_specified"; then
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11727$as_echo "not found" >&6; }
11728          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11729        fi
11730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11731$as_echo "$tool_specified" >&6; }
11732      fi
11733    fi
11734  fi
11735
11736
11737  if test "x$GREP" = x; then
11738    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11739  fi
11740
11741
11742
11743
11744  # Publish this variable in the help.
11745
11746
11747  if test "x$EGREP" = x; then
11748    # The variable is not set by user, try to locate tool using the code snippet
11749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11750$as_echo_n "checking for egrep... " >&6; }
11751if ${ac_cv_path_EGREP+:} false; then :
11752  $as_echo_n "(cached) " >&6
11753else
11754  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11755   then ac_cv_path_EGREP="$GREP -E"
11756   else
11757     if test -z "$EGREP"; then
11758  ac_path_EGREP_found=false
11759  # Loop through the user's path and test for each of PROGNAME-LIST
11760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11762do
11763  IFS=$as_save_IFS
11764  test -z "$as_dir" && as_dir=.
11765    for ac_prog in egrep; do
11766    for ac_exec_ext in '' $ac_executable_extensions; do
11767      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11768      as_fn_executable_p "$ac_path_EGREP" || continue
11769# Check for GNU ac_path_EGREP and select it if it is found.
11770  # Check for GNU $ac_path_EGREP
11771case `"$ac_path_EGREP" --version 2>&1` in
11772*GNU*)
11773  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11774*)
11775  ac_count=0
11776  $as_echo_n 0123456789 >"conftest.in"
11777  while :
11778  do
11779    cat "conftest.in" "conftest.in" >"conftest.tmp"
11780    mv "conftest.tmp" "conftest.in"
11781    cp "conftest.in" "conftest.nl"
11782    $as_echo 'EGREP' >> "conftest.nl"
11783    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11784    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11785    as_fn_arith $ac_count + 1 && ac_count=$as_val
11786    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11787      # Best one so far, save it but keep looking for a better one
11788      ac_cv_path_EGREP="$ac_path_EGREP"
11789      ac_path_EGREP_max=$ac_count
11790    fi
11791    # 10*(2^10) chars as input seems more than enough
11792    test $ac_count -gt 10 && break
11793  done
11794  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11795esac
11796
11797      $ac_path_EGREP_found && break 3
11798    done
11799  done
11800  done
11801IFS=$as_save_IFS
11802  if test -z "$ac_cv_path_EGREP"; then
11803    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11804  fi
11805else
11806  ac_cv_path_EGREP=$EGREP
11807fi
11808
11809   fi
11810fi
11811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11812$as_echo "$ac_cv_path_EGREP" >&6; }
11813 EGREP="$ac_cv_path_EGREP"
11814
11815
11816  else
11817    # The variable is set, but is it from the command line or the environment?
11818
11819    # Try to remove the string !EGREP! from our list.
11820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11822      # If it failed, the variable was not from the command line. Ignore it,
11823      # but warn the user (except for BASH, which is always set by the calling BASH).
11824      if test "xEGREP" != xBASH; then
11825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11826$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11827      fi
11828      # Try to locate tool using the code snippet
11829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11830$as_echo_n "checking for egrep... " >&6; }
11831if ${ac_cv_path_EGREP+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11835   then ac_cv_path_EGREP="$GREP -E"
11836   else
11837     if test -z "$EGREP"; then
11838  ac_path_EGREP_found=false
11839  # Loop through the user's path and test for each of PROGNAME-LIST
11840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11841for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11842do
11843  IFS=$as_save_IFS
11844  test -z "$as_dir" && as_dir=.
11845    for ac_prog in egrep; do
11846    for ac_exec_ext in '' $ac_executable_extensions; do
11847      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11848      as_fn_executable_p "$ac_path_EGREP" || continue
11849# Check for GNU ac_path_EGREP and select it if it is found.
11850  # Check for GNU $ac_path_EGREP
11851case `"$ac_path_EGREP" --version 2>&1` in
11852*GNU*)
11853  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11854*)
11855  ac_count=0
11856  $as_echo_n 0123456789 >"conftest.in"
11857  while :
11858  do
11859    cat "conftest.in" "conftest.in" >"conftest.tmp"
11860    mv "conftest.tmp" "conftest.in"
11861    cp "conftest.in" "conftest.nl"
11862    $as_echo 'EGREP' >> "conftest.nl"
11863    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11864    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11865    as_fn_arith $ac_count + 1 && ac_count=$as_val
11866    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11867      # Best one so far, save it but keep looking for a better one
11868      ac_cv_path_EGREP="$ac_path_EGREP"
11869      ac_path_EGREP_max=$ac_count
11870    fi
11871    # 10*(2^10) chars as input seems more than enough
11872    test $ac_count -gt 10 && break
11873  done
11874  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11875esac
11876
11877      $ac_path_EGREP_found && break 3
11878    done
11879  done
11880  done
11881IFS=$as_save_IFS
11882  if test -z "$ac_cv_path_EGREP"; then
11883    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11884  fi
11885else
11886  ac_cv_path_EGREP=$EGREP
11887fi
11888
11889   fi
11890fi
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11892$as_echo "$ac_cv_path_EGREP" >&6; }
11893 EGREP="$ac_cv_path_EGREP"
11894
11895
11896    else
11897      # If it succeeded, then it was overridden by the user. We will use it
11898      # for the tool.
11899
11900      # First remove it from the list of overridden variables, so we can test
11901      # for unknown variables in the end.
11902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11903
11904      # Check if the provided tool contains a complete path.
11905      tool_specified="$EGREP"
11906      tool_basename="${tool_specified##*/}"
11907      if test "x$tool_basename" = "x$tool_specified"; then
11908        # A command without a complete path is provided, search $PATH.
11909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11910$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11911        # Extract the first word of "$tool_basename", so it can be a program name with args.
11912set dummy $tool_basename; ac_word=$2
11913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914$as_echo_n "checking for $ac_word... " >&6; }
11915if ${ac_cv_path_EGREP+:} false; then :
11916  $as_echo_n "(cached) " >&6
11917else
11918  case $EGREP in
11919  [\\/]* | ?:[\\/]*)
11920  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11921  ;;
11922  *)
11923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924for as_dir in $PATH
11925do
11926  IFS=$as_save_IFS
11927  test -z "$as_dir" && as_dir=.
11928    for ac_exec_ext in '' $ac_executable_extensions; do
11929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932    break 2
11933  fi
11934done
11935  done
11936IFS=$as_save_IFS
11937
11938  ;;
11939esac
11940fi
11941EGREP=$ac_cv_path_EGREP
11942if test -n "$EGREP"; then
11943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11944$as_echo "$EGREP" >&6; }
11945else
11946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947$as_echo "no" >&6; }
11948fi
11949
11950
11951        if test "x$EGREP" = x; then
11952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11953        fi
11954      else
11955        # Otherwise we believe it is a complete path. Use it as it is.
11956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11957$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11959$as_echo_n "checking for EGREP... " >&6; }
11960        if test ! -x "$tool_specified"; then
11961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11962$as_echo "not found" >&6; }
11963          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11964        fi
11965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11966$as_echo "$tool_specified" >&6; }
11967      fi
11968    fi
11969  fi
11970
11971
11972  if test "x$EGREP" = x; then
11973    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11974  fi
11975
11976
11977
11978
11979  # Publish this variable in the help.
11980
11981
11982  if test "x$FGREP" = x; then
11983    # The variable is not set by user, try to locate tool using the code snippet
11984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11985$as_echo_n "checking for fgrep... " >&6; }
11986if ${ac_cv_path_FGREP+:} false; then :
11987  $as_echo_n "(cached) " >&6
11988else
11989  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11990   then ac_cv_path_FGREP="$GREP -F"
11991   else
11992     if test -z "$FGREP"; then
11993  ac_path_FGREP_found=false
11994  # Loop through the user's path and test for each of PROGNAME-LIST
11995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11997do
11998  IFS=$as_save_IFS
11999  test -z "$as_dir" && as_dir=.
12000    for ac_prog in fgrep; do
12001    for ac_exec_ext in '' $ac_executable_extensions; do
12002      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12003      as_fn_executable_p "$ac_path_FGREP" || continue
12004# Check for GNU ac_path_FGREP and select it if it is found.
12005  # Check for GNU $ac_path_FGREP
12006case `"$ac_path_FGREP" --version 2>&1` in
12007*GNU*)
12008  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12009*)
12010  ac_count=0
12011  $as_echo_n 0123456789 >"conftest.in"
12012  while :
12013  do
12014    cat "conftest.in" "conftest.in" >"conftest.tmp"
12015    mv "conftest.tmp" "conftest.in"
12016    cp "conftest.in" "conftest.nl"
12017    $as_echo 'FGREP' >> "conftest.nl"
12018    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12019    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12020    as_fn_arith $ac_count + 1 && ac_count=$as_val
12021    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12022      # Best one so far, save it but keep looking for a better one
12023      ac_cv_path_FGREP="$ac_path_FGREP"
12024      ac_path_FGREP_max=$ac_count
12025    fi
12026    # 10*(2^10) chars as input seems more than enough
12027    test $ac_count -gt 10 && break
12028  done
12029  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12030esac
12031
12032      $ac_path_FGREP_found && break 3
12033    done
12034  done
12035  done
12036IFS=$as_save_IFS
12037  if test -z "$ac_cv_path_FGREP"; then
12038    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12039  fi
12040else
12041  ac_cv_path_FGREP=$FGREP
12042fi
12043
12044   fi
12045fi
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12047$as_echo "$ac_cv_path_FGREP" >&6; }
12048 FGREP="$ac_cv_path_FGREP"
12049
12050
12051  else
12052    # The variable is set, but is it from the command line or the environment?
12053
12054    # Try to remove the string !FGREP! from our list.
12055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12057      # If it failed, the variable was not from the command line. Ignore it,
12058      # but warn the user (except for BASH, which is always set by the calling BASH).
12059      if test "xFGREP" != xBASH; then
12060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12061$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12062      fi
12063      # Try to locate tool using the code snippet
12064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12065$as_echo_n "checking for fgrep... " >&6; }
12066if ${ac_cv_path_FGREP+:} false; then :
12067  $as_echo_n "(cached) " >&6
12068else
12069  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12070   then ac_cv_path_FGREP="$GREP -F"
12071   else
12072     if test -z "$FGREP"; then
12073  ac_path_FGREP_found=false
12074  # Loop through the user's path and test for each of PROGNAME-LIST
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_prog in fgrep; do
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12083      as_fn_executable_p "$ac_path_FGREP" || continue
12084# Check for GNU ac_path_FGREP and select it if it is found.
12085  # Check for GNU $ac_path_FGREP
12086case `"$ac_path_FGREP" --version 2>&1` in
12087*GNU*)
12088  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12089*)
12090  ac_count=0
12091  $as_echo_n 0123456789 >"conftest.in"
12092  while :
12093  do
12094    cat "conftest.in" "conftest.in" >"conftest.tmp"
12095    mv "conftest.tmp" "conftest.in"
12096    cp "conftest.in" "conftest.nl"
12097    $as_echo 'FGREP' >> "conftest.nl"
12098    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12099    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12100    as_fn_arith $ac_count + 1 && ac_count=$as_val
12101    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12102      # Best one so far, save it but keep looking for a better one
12103      ac_cv_path_FGREP="$ac_path_FGREP"
12104      ac_path_FGREP_max=$ac_count
12105    fi
12106    # 10*(2^10) chars as input seems more than enough
12107    test $ac_count -gt 10 && break
12108  done
12109  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12110esac
12111
12112      $ac_path_FGREP_found && break 3
12113    done
12114  done
12115  done
12116IFS=$as_save_IFS
12117  if test -z "$ac_cv_path_FGREP"; then
12118    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12119  fi
12120else
12121  ac_cv_path_FGREP=$FGREP
12122fi
12123
12124   fi
12125fi
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12127$as_echo "$ac_cv_path_FGREP" >&6; }
12128 FGREP="$ac_cv_path_FGREP"
12129
12130
12131    else
12132      # If it succeeded, then it was overridden by the user. We will use it
12133      # for the tool.
12134
12135      # First remove it from the list of overridden variables, so we can test
12136      # for unknown variables in the end.
12137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12138
12139      # Check if the provided tool contains a complete path.
12140      tool_specified="$FGREP"
12141      tool_basename="${tool_specified##*/}"
12142      if test "x$tool_basename" = "x$tool_specified"; then
12143        # A command without a complete path is provided, search $PATH.
12144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12145$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12146        # Extract the first word of "$tool_basename", so it can be a program name with args.
12147set dummy $tool_basename; ac_word=$2
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12149$as_echo_n "checking for $ac_word... " >&6; }
12150if ${ac_cv_path_FGREP+:} false; then :
12151  $as_echo_n "(cached) " >&6
12152else
12153  case $FGREP in
12154  [\\/]* | ?:[\\/]*)
12155  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12156  ;;
12157  *)
12158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159for as_dir in $PATH
12160do
12161  IFS=$as_save_IFS
12162  test -z "$as_dir" && as_dir=.
12163    for ac_exec_ext in '' $ac_executable_extensions; do
12164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12165    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12167    break 2
12168  fi
12169done
12170  done
12171IFS=$as_save_IFS
12172
12173  ;;
12174esac
12175fi
12176FGREP=$ac_cv_path_FGREP
12177if test -n "$FGREP"; then
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12179$as_echo "$FGREP" >&6; }
12180else
12181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
12183fi
12184
12185
12186        if test "x$FGREP" = x; then
12187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12188        fi
12189      else
12190        # Otherwise we believe it is a complete path. Use it as it is.
12191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12192$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12194$as_echo_n "checking for FGREP... " >&6; }
12195        if test ! -x "$tool_specified"; then
12196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12197$as_echo "not found" >&6; }
12198          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12199        fi
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12201$as_echo "$tool_specified" >&6; }
12202      fi
12203    fi
12204  fi
12205
12206
12207  if test "x$FGREP" = x; then
12208    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12209  fi
12210
12211
12212
12213
12214  # Publish this variable in the help.
12215
12216
12217  if test "x$SED" = x; then
12218    # The variable is not set by user, try to locate tool using the code snippet
12219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12220$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12221if ${ac_cv_path_SED+:} false; then :
12222  $as_echo_n "(cached) " >&6
12223else
12224            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12225     for ac_i in 1 2 3 4 5 6 7; do
12226       ac_script="$ac_script$as_nl$ac_script"
12227     done
12228     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12229     { ac_script=; unset ac_script;}
12230     if test -z "$SED"; then
12231  ac_path_SED_found=false
12232  # Loop through the user's path and test for each of PROGNAME-LIST
12233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234for as_dir in $PATH
12235do
12236  IFS=$as_save_IFS
12237  test -z "$as_dir" && as_dir=.
12238    for ac_prog in sed gsed; do
12239    for ac_exec_ext in '' $ac_executable_extensions; do
12240      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12241      as_fn_executable_p "$ac_path_SED" || continue
12242# Check for GNU ac_path_SED and select it if it is found.
12243  # Check for GNU $ac_path_SED
12244case `"$ac_path_SED" --version 2>&1` in
12245*GNU*)
12246  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12247*)
12248  ac_count=0
12249  $as_echo_n 0123456789 >"conftest.in"
12250  while :
12251  do
12252    cat "conftest.in" "conftest.in" >"conftest.tmp"
12253    mv "conftest.tmp" "conftest.in"
12254    cp "conftest.in" "conftest.nl"
12255    $as_echo '' >> "conftest.nl"
12256    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12257    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12258    as_fn_arith $ac_count + 1 && ac_count=$as_val
12259    if test $ac_count -gt ${ac_path_SED_max-0}; then
12260      # Best one so far, save it but keep looking for a better one
12261      ac_cv_path_SED="$ac_path_SED"
12262      ac_path_SED_max=$ac_count
12263    fi
12264    # 10*(2^10) chars as input seems more than enough
12265    test $ac_count -gt 10 && break
12266  done
12267  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12268esac
12269
12270      $ac_path_SED_found && break 3
12271    done
12272  done
12273  done
12274IFS=$as_save_IFS
12275  if test -z "$ac_cv_path_SED"; then
12276    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12277  fi
12278else
12279  ac_cv_path_SED=$SED
12280fi
12281
12282fi
12283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12284$as_echo "$ac_cv_path_SED" >&6; }
12285 SED="$ac_cv_path_SED"
12286  rm -f conftest.sed
12287
12288  else
12289    # The variable is set, but is it from the command line or the environment?
12290
12291    # Try to remove the string !SED! from our list.
12292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12294      # If it failed, the variable was not from the command line. Ignore it,
12295      # but warn the user (except for BASH, which is always set by the calling BASH).
12296      if test "xSED" != xBASH; then
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12298$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12299      fi
12300      # Try to locate tool using the code snippet
12301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12302$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12303if ${ac_cv_path_SED+:} false; then :
12304  $as_echo_n "(cached) " >&6
12305else
12306            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12307     for ac_i in 1 2 3 4 5 6 7; do
12308       ac_script="$ac_script$as_nl$ac_script"
12309     done
12310     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12311     { ac_script=; unset ac_script;}
12312     if test -z "$SED"; then
12313  ac_path_SED_found=false
12314  # Loop through the user's path and test for each of PROGNAME-LIST
12315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316for as_dir in $PATH
12317do
12318  IFS=$as_save_IFS
12319  test -z "$as_dir" && as_dir=.
12320    for ac_prog in sed gsed; do
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12323      as_fn_executable_p "$ac_path_SED" || continue
12324# Check for GNU ac_path_SED and select it if it is found.
12325  # Check for GNU $ac_path_SED
12326case `"$ac_path_SED" --version 2>&1` in
12327*GNU*)
12328  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12329*)
12330  ac_count=0
12331  $as_echo_n 0123456789 >"conftest.in"
12332  while :
12333  do
12334    cat "conftest.in" "conftest.in" >"conftest.tmp"
12335    mv "conftest.tmp" "conftest.in"
12336    cp "conftest.in" "conftest.nl"
12337    $as_echo '' >> "conftest.nl"
12338    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12339    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12340    as_fn_arith $ac_count + 1 && ac_count=$as_val
12341    if test $ac_count -gt ${ac_path_SED_max-0}; then
12342      # Best one so far, save it but keep looking for a better one
12343      ac_cv_path_SED="$ac_path_SED"
12344      ac_path_SED_max=$ac_count
12345    fi
12346    # 10*(2^10) chars as input seems more than enough
12347    test $ac_count -gt 10 && break
12348  done
12349  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12350esac
12351
12352      $ac_path_SED_found && break 3
12353    done
12354  done
12355  done
12356IFS=$as_save_IFS
12357  if test -z "$ac_cv_path_SED"; then
12358    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12359  fi
12360else
12361  ac_cv_path_SED=$SED
12362fi
12363
12364fi
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12366$as_echo "$ac_cv_path_SED" >&6; }
12367 SED="$ac_cv_path_SED"
12368  rm -f conftest.sed
12369
12370    else
12371      # If it succeeded, then it was overridden by the user. We will use it
12372      # for the tool.
12373
12374      # First remove it from the list of overridden variables, so we can test
12375      # for unknown variables in the end.
12376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12377
12378      # Check if the provided tool contains a complete path.
12379      tool_specified="$SED"
12380      tool_basename="${tool_specified##*/}"
12381      if test "x$tool_basename" = "x$tool_specified"; then
12382        # A command without a complete path is provided, search $PATH.
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12384$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12385        # Extract the first word of "$tool_basename", so it can be a program name with args.
12386set dummy $tool_basename; ac_word=$2
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12388$as_echo_n "checking for $ac_word... " >&6; }
12389if ${ac_cv_path_SED+:} false; then :
12390  $as_echo_n "(cached) " >&6
12391else
12392  case $SED in
12393  [\\/]* | ?:[\\/]*)
12394  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12395  ;;
12396  *)
12397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12398for as_dir in $PATH
12399do
12400  IFS=$as_save_IFS
12401  test -z "$as_dir" && as_dir=.
12402    for ac_exec_ext in '' $ac_executable_extensions; do
12403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12404    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12406    break 2
12407  fi
12408done
12409  done
12410IFS=$as_save_IFS
12411
12412  ;;
12413esac
12414fi
12415SED=$ac_cv_path_SED
12416if test -n "$SED"; then
12417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12418$as_echo "$SED" >&6; }
12419else
12420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421$as_echo "no" >&6; }
12422fi
12423
12424
12425        if test "x$SED" = x; then
12426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12427        fi
12428      else
12429        # Otherwise we believe it is a complete path. Use it as it is.
12430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12431$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12433$as_echo_n "checking for SED... " >&6; }
12434        if test ! -x "$tool_specified"; then
12435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12436$as_echo "not found" >&6; }
12437          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12438        fi
12439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12440$as_echo "$tool_specified" >&6; }
12441      fi
12442    fi
12443  fi
12444
12445
12446  if test "x$SED" = x; then
12447    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12448  fi
12449
12450
12451
12452  # Always force rm.
12453  RM="$RM -f"
12454
12455  # pwd behaves differently on various platforms and some don't support the -L flag.
12456  # Always use the bash builtin pwd to get uniform behavior.
12457  THEPWDCMD=pwd
12458
12459  # These are not required on all platforms
12460
12461
12462  # Publish this variable in the help.
12463
12464
12465  if test "x$CYGPATH" = x; then
12466    # The variable is not set by user, try to locate tool using the code snippet
12467    for ac_prog in cygpath
12468do
12469  # Extract the first word of "$ac_prog", so it can be a program name with args.
12470set dummy $ac_prog; ac_word=$2
12471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12472$as_echo_n "checking for $ac_word... " >&6; }
12473if ${ac_cv_path_CYGPATH+:} false; then :
12474  $as_echo_n "(cached) " >&6
12475else
12476  case $CYGPATH in
12477  [\\/]* | ?:[\\/]*)
12478  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12479  ;;
12480  *)
12481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12482for as_dir in $PATH
12483do
12484  IFS=$as_save_IFS
12485  test -z "$as_dir" && as_dir=.
12486    for ac_exec_ext in '' $ac_executable_extensions; do
12487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12488    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12490    break 2
12491  fi
12492done
12493  done
12494IFS=$as_save_IFS
12495
12496  ;;
12497esac
12498fi
12499CYGPATH=$ac_cv_path_CYGPATH
12500if test -n "$CYGPATH"; then
12501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12502$as_echo "$CYGPATH" >&6; }
12503else
12504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12505$as_echo "no" >&6; }
12506fi
12507
12508
12509  test -n "$CYGPATH" && break
12510done
12511
12512  else
12513    # The variable is set, but is it from the command line or the environment?
12514
12515    # Try to remove the string !CYGPATH! from our list.
12516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12518      # If it failed, the variable was not from the command line. Ignore it,
12519      # but warn the user (except for BASH, which is always set by the calling BASH).
12520      if test "xCYGPATH" != xBASH; then
12521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12522$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12523      fi
12524      # Try to locate tool using the code snippet
12525      for ac_prog in cygpath
12526do
12527  # Extract the first word of "$ac_prog", so it can be a program name with args.
12528set dummy $ac_prog; ac_word=$2
12529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12530$as_echo_n "checking for $ac_word... " >&6; }
12531if ${ac_cv_path_CYGPATH+:} false; then :
12532  $as_echo_n "(cached) " >&6
12533else
12534  case $CYGPATH in
12535  [\\/]* | ?:[\\/]*)
12536  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12537  ;;
12538  *)
12539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12540for as_dir in $PATH
12541do
12542  IFS=$as_save_IFS
12543  test -z "$as_dir" && as_dir=.
12544    for ac_exec_ext in '' $ac_executable_extensions; do
12545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12546    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12548    break 2
12549  fi
12550done
12551  done
12552IFS=$as_save_IFS
12553
12554  ;;
12555esac
12556fi
12557CYGPATH=$ac_cv_path_CYGPATH
12558if test -n "$CYGPATH"; then
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12560$as_echo "$CYGPATH" >&6; }
12561else
12562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563$as_echo "no" >&6; }
12564fi
12565
12566
12567  test -n "$CYGPATH" && break
12568done
12569
12570    else
12571      # If it succeeded, then it was overridden by the user. We will use it
12572      # for the tool.
12573
12574      # First remove it from the list of overridden variables, so we can test
12575      # for unknown variables in the end.
12576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12577
12578      # Check if the provided tool contains a complete path.
12579      tool_specified="$CYGPATH"
12580      tool_basename="${tool_specified##*/}"
12581      if test "x$tool_basename" = "x$tool_specified"; then
12582        # A command without a complete path is provided, search $PATH.
12583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12584$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12585        # Extract the first word of "$tool_basename", so it can be a program name with args.
12586set dummy $tool_basename; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_CYGPATH+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $CYGPATH in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615CYGPATH=$ac_cv_path_CYGPATH
12616if test -n "$CYGPATH"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12618$as_echo "$CYGPATH" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625        if test "x$CYGPATH" = x; then
12626          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12627        fi
12628      else
12629        # Otherwise we believe it is a complete path. Use it as it is.
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12631$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12633$as_echo_n "checking for CYGPATH... " >&6; }
12634        if test ! -x "$tool_specified"; then
12635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12636$as_echo "not found" >&6; }
12637          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12638        fi
12639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12640$as_echo "$tool_specified" >&6; }
12641      fi
12642    fi
12643  fi
12644
12645
12646
12647
12648  # Publish this variable in the help.
12649
12650
12651  if test "x$READLINK" = x; then
12652    # The variable is not set by user, try to locate tool using the code snippet
12653    for ac_prog in greadlink readlink
12654do
12655  # Extract the first word of "$ac_prog", so it can be a program name with args.
12656set dummy $ac_prog; ac_word=$2
12657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12658$as_echo_n "checking for $ac_word... " >&6; }
12659if ${ac_cv_path_READLINK+:} false; then :
12660  $as_echo_n "(cached) " >&6
12661else
12662  case $READLINK in
12663  [\\/]* | ?:[\\/]*)
12664  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12665  ;;
12666  *)
12667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12668for as_dir in $PATH
12669do
12670  IFS=$as_save_IFS
12671  test -z "$as_dir" && as_dir=.
12672    for ac_exec_ext in '' $ac_executable_extensions; do
12673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12674    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12676    break 2
12677  fi
12678done
12679  done
12680IFS=$as_save_IFS
12681
12682  ;;
12683esac
12684fi
12685READLINK=$ac_cv_path_READLINK
12686if test -n "$READLINK"; then
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12688$as_echo "$READLINK" >&6; }
12689else
12690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12691$as_echo "no" >&6; }
12692fi
12693
12694
12695  test -n "$READLINK" && break
12696done
12697
12698  else
12699    # The variable is set, but is it from the command line or the environment?
12700
12701    # Try to remove the string !READLINK! from our list.
12702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12704      # If it failed, the variable was not from the command line. Ignore it,
12705      # but warn the user (except for BASH, which is always set by the calling BASH).
12706      if test "xREADLINK" != xBASH; then
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12708$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12709      fi
12710      # Try to locate tool using the code snippet
12711      for ac_prog in greadlink readlink
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_READLINK+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $READLINK in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743READLINK=$ac_cv_path_READLINK
12744if test -n "$READLINK"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12746$as_echo "$READLINK" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$READLINK" && break
12754done
12755
12756    else
12757      # If it succeeded, then it was overridden by the user. We will use it
12758      # for the tool.
12759
12760      # First remove it from the list of overridden variables, so we can test
12761      # for unknown variables in the end.
12762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12763
12764      # Check if the provided tool contains a complete path.
12765      tool_specified="$READLINK"
12766      tool_basename="${tool_specified##*/}"
12767      if test "x$tool_basename" = "x$tool_specified"; then
12768        # A command without a complete path is provided, search $PATH.
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12770$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12771        # Extract the first word of "$tool_basename", so it can be a program name with args.
12772set dummy $tool_basename; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_READLINK+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $READLINK in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801READLINK=$ac_cv_path_READLINK
12802if test -n "$READLINK"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12804$as_echo "$READLINK" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811        if test "x$READLINK" = x; then
12812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12813        fi
12814      else
12815        # Otherwise we believe it is a complete path. Use it as it is.
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12817$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12819$as_echo_n "checking for READLINK... " >&6; }
12820        if test ! -x "$tool_specified"; then
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12822$as_echo "not found" >&6; }
12823          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12824        fi
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12826$as_echo "$tool_specified" >&6; }
12827      fi
12828    fi
12829  fi
12830
12831
12832
12833
12834  # Publish this variable in the help.
12835
12836
12837  if test "x$DF" = x; then
12838    # The variable is not set by user, try to locate tool using the code snippet
12839    for ac_prog in df
12840do
12841  # Extract the first word of "$ac_prog", so it can be a program name with args.
12842set dummy $ac_prog; ac_word=$2
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12844$as_echo_n "checking for $ac_word... " >&6; }
12845if ${ac_cv_path_DF+:} false; then :
12846  $as_echo_n "(cached) " >&6
12847else
12848  case $DF in
12849  [\\/]* | ?:[\\/]*)
12850  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12851  ;;
12852  *)
12853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854for as_dir in $PATH
12855do
12856  IFS=$as_save_IFS
12857  test -z "$as_dir" && as_dir=.
12858    for ac_exec_ext in '' $ac_executable_extensions; do
12859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12860    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12862    break 2
12863  fi
12864done
12865  done
12866IFS=$as_save_IFS
12867
12868  ;;
12869esac
12870fi
12871DF=$ac_cv_path_DF
12872if test -n "$DF"; then
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12874$as_echo "$DF" >&6; }
12875else
12876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12877$as_echo "no" >&6; }
12878fi
12879
12880
12881  test -n "$DF" && break
12882done
12883
12884  else
12885    # The variable is set, but is it from the command line or the environment?
12886
12887    # Try to remove the string !DF! from our list.
12888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12890      # If it failed, the variable was not from the command line. Ignore it,
12891      # but warn the user (except for BASH, which is always set by the calling BASH).
12892      if test "xDF" != xBASH; then
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12894$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12895      fi
12896      # Try to locate tool using the code snippet
12897      for ac_prog in df
12898do
12899  # Extract the first word of "$ac_prog", so it can be a program name with args.
12900set dummy $ac_prog; ac_word=$2
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902$as_echo_n "checking for $ac_word... " >&6; }
12903if ${ac_cv_path_DF+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  case $DF in
12907  [\\/]* | ?:[\\/]*)
12908  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12909  ;;
12910  *)
12911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912for as_dir in $PATH
12913do
12914  IFS=$as_save_IFS
12915  test -z "$as_dir" && as_dir=.
12916    for ac_exec_ext in '' $ac_executable_extensions; do
12917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920    break 2
12921  fi
12922done
12923  done
12924IFS=$as_save_IFS
12925
12926  ;;
12927esac
12928fi
12929DF=$ac_cv_path_DF
12930if test -n "$DF"; then
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12932$as_echo "$DF" >&6; }
12933else
12934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935$as_echo "no" >&6; }
12936fi
12937
12938
12939  test -n "$DF" && break
12940done
12941
12942    else
12943      # If it succeeded, then it was overridden by the user. We will use it
12944      # for the tool.
12945
12946      # First remove it from the list of overridden variables, so we can test
12947      # for unknown variables in the end.
12948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12949
12950      # Check if the provided tool contains a complete path.
12951      tool_specified="$DF"
12952      tool_basename="${tool_specified##*/}"
12953      if test "x$tool_basename" = "x$tool_specified"; then
12954        # A command without a complete path is provided, search $PATH.
12955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12956$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12957        # Extract the first word of "$tool_basename", so it can be a program name with args.
12958set dummy $tool_basename; ac_word=$2
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12960$as_echo_n "checking for $ac_word... " >&6; }
12961if ${ac_cv_path_DF+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  case $DF in
12965  [\\/]* | ?:[\\/]*)
12966  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12967  ;;
12968  *)
12969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970for as_dir in $PATH
12971do
12972  IFS=$as_save_IFS
12973  test -z "$as_dir" && as_dir=.
12974    for ac_exec_ext in '' $ac_executable_extensions; do
12975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12976    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12978    break 2
12979  fi
12980done
12981  done
12982IFS=$as_save_IFS
12983
12984  ;;
12985esac
12986fi
12987DF=$ac_cv_path_DF
12988if test -n "$DF"; then
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12990$as_echo "$DF" >&6; }
12991else
12992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993$as_echo "no" >&6; }
12994fi
12995
12996
12997        if test "x$DF" = x; then
12998          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12999        fi
13000      else
13001        # Otherwise we believe it is a complete path. Use it as it is.
13002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13003$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13005$as_echo_n "checking for DF... " >&6; }
13006        if test ! -x "$tool_specified"; then
13007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13008$as_echo "not found" >&6; }
13009          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13010        fi
13011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13012$as_echo "$tool_specified" >&6; }
13013      fi
13014    fi
13015  fi
13016
13017
13018
13019
13020  # Publish this variable in the help.
13021
13022
13023  if test "x$SETFILE" = x; then
13024    # The variable is not set by user, try to locate tool using the code snippet
13025    for ac_prog in SetFile
13026do
13027  # Extract the first word of "$ac_prog", so it can be a program name with args.
13028set dummy $ac_prog; ac_word=$2
13029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13030$as_echo_n "checking for $ac_word... " >&6; }
13031if ${ac_cv_path_SETFILE+:} false; then :
13032  $as_echo_n "(cached) " >&6
13033else
13034  case $SETFILE in
13035  [\\/]* | ?:[\\/]*)
13036  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13037  ;;
13038  *)
13039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13040for as_dir in $PATH
13041do
13042  IFS=$as_save_IFS
13043  test -z "$as_dir" && as_dir=.
13044    for ac_exec_ext in '' $ac_executable_extensions; do
13045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13046    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13048    break 2
13049  fi
13050done
13051  done
13052IFS=$as_save_IFS
13053
13054  ;;
13055esac
13056fi
13057SETFILE=$ac_cv_path_SETFILE
13058if test -n "$SETFILE"; then
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13060$as_echo "$SETFILE" >&6; }
13061else
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063$as_echo "no" >&6; }
13064fi
13065
13066
13067  test -n "$SETFILE" && break
13068done
13069
13070  else
13071    # The variable is set, but is it from the command line or the environment?
13072
13073    # Try to remove the string !SETFILE! from our list.
13074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13076      # If it failed, the variable was not from the command line. Ignore it,
13077      # but warn the user (except for BASH, which is always set by the calling BASH).
13078      if test "xSETFILE" != xBASH; then
13079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13080$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13081      fi
13082      # Try to locate tool using the code snippet
13083      for ac_prog in SetFile
13084do
13085  # Extract the first word of "$ac_prog", so it can be a program name with args.
13086set dummy $ac_prog; ac_word=$2
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13088$as_echo_n "checking for $ac_word... " >&6; }
13089if ${ac_cv_path_SETFILE+:} false; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092  case $SETFILE in
13093  [\\/]* | ?:[\\/]*)
13094  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13095  ;;
13096  *)
13097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13098for as_dir in $PATH
13099do
13100  IFS=$as_save_IFS
13101  test -z "$as_dir" && as_dir=.
13102    for ac_exec_ext in '' $ac_executable_extensions; do
13103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13104    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13106    break 2
13107  fi
13108done
13109  done
13110IFS=$as_save_IFS
13111
13112  ;;
13113esac
13114fi
13115SETFILE=$ac_cv_path_SETFILE
13116if test -n "$SETFILE"; then
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13118$as_echo "$SETFILE" >&6; }
13119else
13120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13121$as_echo "no" >&6; }
13122fi
13123
13124
13125  test -n "$SETFILE" && break
13126done
13127
13128    else
13129      # If it succeeded, then it was overridden by the user. We will use it
13130      # for the tool.
13131
13132      # First remove it from the list of overridden variables, so we can test
13133      # for unknown variables in the end.
13134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13135
13136      # Check if the provided tool contains a complete path.
13137      tool_specified="$SETFILE"
13138      tool_basename="${tool_specified##*/}"
13139      if test "x$tool_basename" = "x$tool_specified"; then
13140        # A command without a complete path is provided, search $PATH.
13141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13142$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13143        # Extract the first word of "$tool_basename", so it can be a program name with args.
13144set dummy $tool_basename; ac_word=$2
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13146$as_echo_n "checking for $ac_word... " >&6; }
13147if ${ac_cv_path_SETFILE+:} false; then :
13148  $as_echo_n "(cached) " >&6
13149else
13150  case $SETFILE in
13151  [\\/]* | ?:[\\/]*)
13152  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13153  ;;
13154  *)
13155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156for as_dir in $PATH
13157do
13158  IFS=$as_save_IFS
13159  test -z "$as_dir" && as_dir=.
13160    for ac_exec_ext in '' $ac_executable_extensions; do
13161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164    break 2
13165  fi
13166done
13167  done
13168IFS=$as_save_IFS
13169
13170  ;;
13171esac
13172fi
13173SETFILE=$ac_cv_path_SETFILE
13174if test -n "$SETFILE"; then
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13176$as_echo "$SETFILE" >&6; }
13177else
13178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13179$as_echo "no" >&6; }
13180fi
13181
13182
13183        if test "x$SETFILE" = x; then
13184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13185        fi
13186      else
13187        # Otherwise we believe it is a complete path. Use it as it is.
13188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13189$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13191$as_echo_n "checking for SETFILE... " >&6; }
13192        if test ! -x "$tool_specified"; then
13193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13194$as_echo "not found" >&6; }
13195          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13196        fi
13197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13198$as_echo "$tool_specified" >&6; }
13199      fi
13200    fi
13201  fi
13202
13203
13204
13205
13206  # Publish this variable in the help.
13207
13208
13209  if test "x$CPIO" = x; then
13210    # The variable is not set by user, try to locate tool using the code snippet
13211    for ac_prog in cpio bsdcpio
13212do
13213  # Extract the first word of "$ac_prog", so it can be a program name with args.
13214set dummy $ac_prog; ac_word=$2
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13216$as_echo_n "checking for $ac_word... " >&6; }
13217if ${ac_cv_path_CPIO+:} false; then :
13218  $as_echo_n "(cached) " >&6
13219else
13220  case $CPIO in
13221  [\\/]* | ?:[\\/]*)
13222  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13223  ;;
13224  *)
13225  as_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_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
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
13240  ;;
13241esac
13242fi
13243CPIO=$ac_cv_path_CPIO
13244if test -n "$CPIO"; then
13245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13246$as_echo "$CPIO" >&6; }
13247else
13248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13249$as_echo "no" >&6; }
13250fi
13251
13252
13253  test -n "$CPIO" && break
13254done
13255
13256  else
13257    # The variable is set, but is it from the command line or the environment?
13258
13259    # Try to remove the string !CPIO! from our list.
13260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13262      # If it failed, the variable was not from the command line. Ignore it,
13263      # but warn the user (except for BASH, which is always set by the calling BASH).
13264      if test "xCPIO" != xBASH; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13266$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13267      fi
13268      # Try to locate tool using the code snippet
13269      for ac_prog in cpio bsdcpio
13270do
13271  # Extract the first word of "$ac_prog", so it can be a program name with args.
13272set dummy $ac_prog; ac_word=$2
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13274$as_echo_n "checking for $ac_word... " >&6; }
13275if ${ac_cv_path_CPIO+:} false; then :
13276  $as_echo_n "(cached) " >&6
13277else
13278  case $CPIO in
13279  [\\/]* | ?:[\\/]*)
13280  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13281  ;;
13282  *)
13283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13284for as_dir in $PATH
13285do
13286  IFS=$as_save_IFS
13287  test -z "$as_dir" && as_dir=.
13288    for ac_exec_ext in '' $ac_executable_extensions; do
13289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13290    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13292    break 2
13293  fi
13294done
13295  done
13296IFS=$as_save_IFS
13297
13298  ;;
13299esac
13300fi
13301CPIO=$ac_cv_path_CPIO
13302if test -n "$CPIO"; then
13303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13304$as_echo "$CPIO" >&6; }
13305else
13306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
13308fi
13309
13310
13311  test -n "$CPIO" && break
13312done
13313
13314    else
13315      # If it succeeded, then it was overridden by the user. We will use it
13316      # for the tool.
13317
13318      # First remove it from the list of overridden variables, so we can test
13319      # for unknown variables in the end.
13320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13321
13322      # Check if the provided tool contains a complete path.
13323      tool_specified="$CPIO"
13324      tool_basename="${tool_specified##*/}"
13325      if test "x$tool_basename" = "x$tool_specified"; then
13326        # A command without a complete path is provided, search $PATH.
13327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13328$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13329        # Extract the first word of "$tool_basename", so it can be a program name with args.
13330set dummy $tool_basename; ac_word=$2
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13332$as_echo_n "checking for $ac_word... " >&6; }
13333if ${ac_cv_path_CPIO+:} false; then :
13334  $as_echo_n "(cached) " >&6
13335else
13336  case $CPIO in
13337  [\\/]* | ?:[\\/]*)
13338  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13339  ;;
13340  *)
13341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13342for as_dir in $PATH
13343do
13344  IFS=$as_save_IFS
13345  test -z "$as_dir" && as_dir=.
13346    for ac_exec_ext in '' $ac_executable_extensions; do
13347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13348    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13350    break 2
13351  fi
13352done
13353  done
13354IFS=$as_save_IFS
13355
13356  ;;
13357esac
13358fi
13359CPIO=$ac_cv_path_CPIO
13360if test -n "$CPIO"; then
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13362$as_echo "$CPIO" >&6; }
13363else
13364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365$as_echo "no" >&6; }
13366fi
13367
13368
13369        if test "x$CPIO" = x; then
13370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13371        fi
13372      else
13373        # Otherwise we believe it is a complete path. Use it as it is.
13374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13375$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13377$as_echo_n "checking for CPIO... " >&6; }
13378        if test ! -x "$tool_specified"; then
13379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13380$as_echo "not found" >&6; }
13381          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13382        fi
13383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13384$as_echo "$tool_specified" >&6; }
13385      fi
13386    fi
13387  fi
13388
13389
13390
13391
13392# Now we can determine OpenJDK build and target platforms. This is required to
13393# have early on.
13394# Make sure we can run config.sub.
13395$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13396  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13397
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13399$as_echo_n "checking build system type... " >&6; }
13400if ${ac_cv_build+:} false; then :
13401  $as_echo_n "(cached) " >&6
13402else
13403  ac_build_alias=$build_alias
13404test "x$ac_build_alias" = x &&
13405  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13406test "x$ac_build_alias" = x &&
13407  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13408ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13409  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13410
13411fi
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13413$as_echo "$ac_cv_build" >&6; }
13414case $ac_cv_build in
13415*-*-*) ;;
13416*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13417esac
13418build=$ac_cv_build
13419ac_save_IFS=$IFS; IFS='-'
13420set x $ac_cv_build
13421shift
13422build_cpu=$1
13423build_vendor=$2
13424shift; shift
13425# Remember, the first character of IFS is used to create $*,
13426# except with old shells:
13427build_os=$*
13428IFS=$ac_save_IFS
13429case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13430
13431
13432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13433$as_echo_n "checking host system type... " >&6; }
13434if ${ac_cv_host+:} false; then :
13435  $as_echo_n "(cached) " >&6
13436else
13437  if test "x$host_alias" = x; then
13438  ac_cv_host=$ac_cv_build
13439else
13440  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13441    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13442fi
13443
13444fi
13445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13446$as_echo "$ac_cv_host" >&6; }
13447case $ac_cv_host in
13448*-*-*) ;;
13449*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13450esac
13451host=$ac_cv_host
13452ac_save_IFS=$IFS; IFS='-'
13453set x $ac_cv_host
13454shift
13455host_cpu=$1
13456host_vendor=$2
13457shift; shift
13458# Remember, the first character of IFS is used to create $*,
13459# except with old shells:
13460host_os=$*
13461IFS=$ac_save_IFS
13462case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13463
13464
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13466$as_echo_n "checking target system type... " >&6; }
13467if ${ac_cv_target+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  if test "x$target_alias" = x; then
13471  ac_cv_target=$ac_cv_host
13472else
13473  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13474    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13475fi
13476
13477fi
13478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13479$as_echo "$ac_cv_target" >&6; }
13480case $ac_cv_target in
13481*-*-*) ;;
13482*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13483esac
13484target=$ac_cv_target
13485ac_save_IFS=$IFS; IFS='-'
13486set x $ac_cv_target
13487shift
13488target_cpu=$1
13489target_vendor=$2
13490shift; shift
13491# Remember, the first character of IFS is used to create $*,
13492# except with old shells:
13493target_os=$*
13494IFS=$ac_save_IFS
13495case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13496
13497
13498# The aliases save the names the user supplied, while $host etc.
13499# will get canonicalized.
13500test -n "$target_alias" &&
13501  test "$program_prefix$program_suffix$program_transform_name" = \
13502    NONENONEs,x,x, &&
13503  program_prefix=${target_alias}-
13504
13505  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13506  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13507  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13508  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13509  # to use the configure naming style.
13510
13511
13512
13513
13514
13515  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13516  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13517  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13518  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13519  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13520  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13521
13522
13523
13524  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13525
13526  case "$build_os" in
13527    *linux*)
13528      VAR_OS=linux
13529      VAR_OS_TYPE=unix
13530      ;;
13531    *solaris*)
13532      VAR_OS=solaris
13533      VAR_OS_TYPE=unix
13534      ;;
13535    *darwin*)
13536      VAR_OS=macosx
13537      VAR_OS_TYPE=unix
13538      ;;
13539    *bsd*)
13540      VAR_OS=bsd
13541      VAR_OS_TYPE=unix
13542      ;;
13543    *cygwin*)
13544      VAR_OS=windows
13545      VAR_OS_ENV=windows.cygwin
13546      ;;
13547    *mingw*)
13548      VAR_OS=windows
13549      VAR_OS_ENV=windows.msys
13550      ;;
13551    *aix*)
13552      VAR_OS=aix
13553      VAR_OS_TYPE=unix
13554      ;;
13555    *)
13556      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13557      ;;
13558  esac
13559
13560
13561  # First argument is the cpu name from the trip/quad
13562  case "$build_cpu" in
13563    x86_64)
13564      VAR_CPU=x86_64
13565      VAR_CPU_ARCH=x86
13566      VAR_CPU_BITS=64
13567      VAR_CPU_ENDIAN=little
13568      ;;
13569    i?86)
13570      VAR_CPU=x86
13571      VAR_CPU_ARCH=x86
13572      VAR_CPU_BITS=32
13573      VAR_CPU_ENDIAN=little
13574      ;;
13575    arm*)
13576      VAR_CPU=arm
13577      VAR_CPU_ARCH=arm
13578      VAR_CPU_BITS=32
13579      VAR_CPU_ENDIAN=little
13580      ;;
13581    aarch64)
13582      VAR_CPU=aarch64
13583      VAR_CPU_ARCH=aarch64
13584      VAR_CPU_BITS=64
13585      VAR_CPU_ENDIAN=little
13586      ;;
13587    powerpc)
13588      VAR_CPU=ppc
13589      VAR_CPU_ARCH=ppc
13590      VAR_CPU_BITS=32
13591      VAR_CPU_ENDIAN=big
13592      ;;
13593    powerpc64)
13594      VAR_CPU=ppc64
13595      VAR_CPU_ARCH=ppc
13596      VAR_CPU_BITS=64
13597      VAR_CPU_ENDIAN=big
13598      ;;
13599    powerpc64le)
13600      VAR_CPU=ppc64
13601      VAR_CPU_ARCH=ppc
13602      VAR_CPU_BITS=64
13603      VAR_CPU_ENDIAN=little
13604      ;;
13605    s390)
13606      VAR_CPU=s390
13607      VAR_CPU_ARCH=s390
13608      VAR_CPU_BITS=32
13609      VAR_CPU_ENDIAN=big
13610      ;;
13611    s390x)
13612      VAR_CPU=s390x
13613      VAR_CPU_ARCH=s390
13614      VAR_CPU_BITS=64
13615      VAR_CPU_ENDIAN=big
13616      ;;
13617    sparc)
13618      VAR_CPU=sparc
13619      VAR_CPU_ARCH=sparc
13620      VAR_CPU_BITS=32
13621      VAR_CPU_ENDIAN=big
13622      ;;
13623    sparcv9|sparc64)
13624      VAR_CPU=sparcv9
13625      VAR_CPU_ARCH=sparc
13626      VAR_CPU_BITS=64
13627      VAR_CPU_ENDIAN=big
13628      ;;
13629    *)
13630      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13631      ;;
13632  esac
13633
13634  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13635  OPENJDK_BUILD_OS="$VAR_OS"
13636  if test "x$VAR_OS_TYPE" != x; then
13637    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13638  else
13639    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13640  fi
13641  if test "x$VAR_OS_ENV" != x; then
13642    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13643  else
13644    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13645  fi
13646  OPENJDK_BUILD_CPU="$VAR_CPU"
13647  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13648  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13649  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13650
13651
13652
13653
13654
13655
13656
13657
13658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13659$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13661$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13662
13663  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13664
13665  case "$host_os" in
13666    *linux*)
13667      VAR_OS=linux
13668      VAR_OS_TYPE=unix
13669      ;;
13670    *solaris*)
13671      VAR_OS=solaris
13672      VAR_OS_TYPE=unix
13673      ;;
13674    *darwin*)
13675      VAR_OS=macosx
13676      VAR_OS_TYPE=unix
13677      ;;
13678    *bsd*)
13679      VAR_OS=bsd
13680      VAR_OS_TYPE=unix
13681      ;;
13682    *cygwin*)
13683      VAR_OS=windows
13684      VAR_OS_ENV=windows.cygwin
13685      ;;
13686    *mingw*)
13687      VAR_OS=windows
13688      VAR_OS_ENV=windows.msys
13689      ;;
13690    *aix*)
13691      VAR_OS=aix
13692      VAR_OS_TYPE=unix
13693      ;;
13694    *)
13695      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13696      ;;
13697  esac
13698
13699
13700  # First argument is the cpu name from the trip/quad
13701  case "$host_cpu" in
13702    x86_64)
13703      VAR_CPU=x86_64
13704      VAR_CPU_ARCH=x86
13705      VAR_CPU_BITS=64
13706      VAR_CPU_ENDIAN=little
13707      ;;
13708    i?86)
13709      VAR_CPU=x86
13710      VAR_CPU_ARCH=x86
13711      VAR_CPU_BITS=32
13712      VAR_CPU_ENDIAN=little
13713      ;;
13714    arm*)
13715      VAR_CPU=arm
13716      VAR_CPU_ARCH=arm
13717      VAR_CPU_BITS=32
13718      VAR_CPU_ENDIAN=little
13719      ;;
13720    aarch64)
13721      VAR_CPU=aarch64
13722      VAR_CPU_ARCH=aarch64
13723      VAR_CPU_BITS=64
13724      VAR_CPU_ENDIAN=little
13725      ;;
13726    powerpc)
13727      VAR_CPU=ppc
13728      VAR_CPU_ARCH=ppc
13729      VAR_CPU_BITS=32
13730      VAR_CPU_ENDIAN=big
13731      ;;
13732    powerpc64)
13733      VAR_CPU=ppc64
13734      VAR_CPU_ARCH=ppc
13735      VAR_CPU_BITS=64
13736      VAR_CPU_ENDIAN=big
13737      ;;
13738    powerpc64le)
13739      VAR_CPU=ppc64
13740      VAR_CPU_ARCH=ppc
13741      VAR_CPU_BITS=64
13742      VAR_CPU_ENDIAN=little
13743      ;;
13744    s390)
13745      VAR_CPU=s390
13746      VAR_CPU_ARCH=s390
13747      VAR_CPU_BITS=32
13748      VAR_CPU_ENDIAN=big
13749      ;;
13750    s390x)
13751      VAR_CPU=s390x
13752      VAR_CPU_ARCH=s390
13753      VAR_CPU_BITS=64
13754      VAR_CPU_ENDIAN=big
13755      ;;
13756    sparc)
13757      VAR_CPU=sparc
13758      VAR_CPU_ARCH=sparc
13759      VAR_CPU_BITS=32
13760      VAR_CPU_ENDIAN=big
13761      ;;
13762    sparcv9|sparc64)
13763      VAR_CPU=sparcv9
13764      VAR_CPU_ARCH=sparc
13765      VAR_CPU_BITS=64
13766      VAR_CPU_ENDIAN=big
13767      ;;
13768    *)
13769      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13770      ;;
13771  esac
13772
13773  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13774  OPENJDK_TARGET_OS="$VAR_OS"
13775  if test "x$VAR_OS_TYPE" != x; then
13776    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13777  else
13778    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13779  fi
13780  if test "x$VAR_OS_ENV" != x; then
13781    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13782  else
13783    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13784  fi
13785  OPENJDK_TARGET_CPU="$VAR_CPU"
13786  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13787  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13788  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13789
13790
13791
13792
13793
13794
13795
13796
13797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13798$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13800$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13801
13802
13803
13804# Check whether --with-target-bits was given.
13805if test "${with_target_bits+set}" = set; then :
13806  withval=$with_target_bits;
13807fi
13808
13809
13810  # We have three types of compiles:
13811  # native  == normal compilation, target system == build system
13812  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13813  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13814  #
13815  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13816    # We're doing a proper cross-compilation
13817    COMPILE_TYPE="cross"
13818  else
13819    COMPILE_TYPE="native"
13820  fi
13821
13822  if test "x$with_target_bits" != x; then
13823    if test "x$COMPILE_TYPE" = "xcross"; then
13824      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13825    fi
13826
13827    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13828      # A reduced build is requested
13829      COMPILE_TYPE="reduced"
13830      OPENJDK_TARGET_CPU_BITS=32
13831      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13832        OPENJDK_TARGET_CPU=x86
13833      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13834        OPENJDK_TARGET_CPU=sparc
13835      else
13836        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13837      fi
13838    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13839      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
13840    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13841      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13842$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13843    else
13844      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13845    fi
13846  fi
13847
13848
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13850$as_echo_n "checking compilation type... " >&6; }
13851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13852$as_echo "$COMPILE_TYPE" >&6; }
13853
13854
13855  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13856    REQUIRED_OS_NAME=SunOS
13857    REQUIRED_OS_VERSION=5.10
13858  fi
13859  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13860    REQUIRED_OS_NAME=Linux
13861    REQUIRED_OS_VERSION=2.6
13862  fi
13863  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13864    REQUIRED_OS_NAME=Windows
13865    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13866      REQUIRED_OS_VERSION=5.2
13867    else
13868      REQUIRED_OS_VERSION=5.1
13869    fi
13870  fi
13871  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13872    REQUIRED_OS_NAME=Darwin
13873    REQUIRED_OS_VERSION=11.2
13874  fi
13875
13876
13877
13878
13879
13880  # Also store the legacy naming of the cpu.
13881  # Ie i586 and amd64 instead of x86 and x86_64
13882  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13883  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13884    OPENJDK_TARGET_CPU_LEGACY="i586"
13885  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13886    # On all platforms except MacOSX replace x86_64 with amd64.
13887    OPENJDK_TARGET_CPU_LEGACY="amd64"
13888  fi
13889
13890
13891  # And the second legacy naming of the cpu.
13892  # Ie i386 and amd64 instead of x86 and x86_64.
13893  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13894  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13895    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13896  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13897    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13898  fi
13899
13900
13901  # This is the name of the cpu (but using i386 and amd64 instead of
13902  # x86 and x86_64, respectively), preceeded by a /, to be used when
13903  # locating libraries. On macosx, it's empty, though.
13904  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13905  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13906    OPENJDK_TARGET_CPU_LIBDIR=""
13907  fi
13908
13909
13910  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13911  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13912  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13913  OPENJDK_TARGET_CPU_ISADIR=""
13914  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13915    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13916      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13917    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13918      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13919    fi
13920  fi
13921
13922
13923  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13924  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13925  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13926    # On linux only, we replace x86 with i386.
13927    OPENJDK_TARGET_CPU_OSARCH="i386"
13928  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13929    # On all platforms except macosx, we replace x86_64 with amd64.
13930    OPENJDK_TARGET_CPU_OSARCH="amd64"
13931  fi
13932
13933
13934  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13935  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13936    OPENJDK_TARGET_CPU_JLI="i386"
13937  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13938    # On all platforms except macosx, we replace x86_64 with amd64.
13939    OPENJDK_TARGET_CPU_JLI="amd64"
13940  fi
13941  # Now setup the -D flags for building libjli.
13942  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13943  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13944    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13945      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13946    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13947      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13948    fi
13949  fi
13950
13951
13952  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13953      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13954  else
13955      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13956  fi
13957
13958
13959  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13960    A_LP64="LP64:="
13961    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13962    # unpack200.exe
13963    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13964      ADD_LP64="-D_LP64=1"
13965    fi
13966  fi
13967  LP64=$A_LP64
13968
13969
13970  if test "x$COMPILE_TYPE" = "xcross"; then
13971    # FIXME: ... or should this include reduced builds..?
13972    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13973  else
13974    DEFINE_CROSS_COMPILE_ARCH=""
13975  fi
13976
13977
13978  # ZERO_ARCHDEF is used to enable architecture-specific code
13979  case "${OPENJDK_TARGET_CPU}" in
13980    ppc)     ZERO_ARCHDEF=PPC32 ;;
13981    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13982    s390*)   ZERO_ARCHDEF=S390  ;;
13983    sparc*)  ZERO_ARCHDEF=SPARC ;;
13984    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13985    x86)     ZERO_ARCHDEF=IA32  ;;
13986    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13987  esac
13988
13989
13990
13991
13992# Continue setting up basic stuff. Most remaining code require fundamental tools.
13993
13994  # Save the current directory this script was started from
13995  CURDIR="$PWD"
13996
13997  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13998    PATH_SEP=";"
13999
14000  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14001  if test $SRC_ROOT_LENGTH -gt 100; then
14002    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14003  fi
14004
14005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14007$as_echo_n "checking cygwin release... " >&6; }
14008    CYGWIN_VERSION=`$UNAME -r`
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14010$as_echo "$CYGWIN_VERSION" >&6; }
14011    WINDOWS_ENV_VENDOR='cygwin'
14012    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14013
14014    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14015    if test "x$CYGWIN_VERSION_OK" = x; then
14016      { $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
14017$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;}
14018      as_fn_error $? "Cannot continue" "$LINENO" 5
14019    fi
14020    if test "x$CYGPATH" = x; then
14021      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14022    fi
14023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14024$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14025    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14026    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14027    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14028    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14030$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14031    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14032    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14033    if test "x$test_cygdrive_prefix" = x; then
14034      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14035    fi
14036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14038$as_echo_n "checking msys release... " >&6; }
14039    MSYS_VERSION=`$UNAME -r`
14040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14041$as_echo "$MSYS_VERSION" >&6; }
14042
14043    WINDOWS_ENV_VENDOR='msys'
14044    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14045
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14047$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14048    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14049    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14050
14051  windows_path="$MSYS_ROOT_PATH"
14052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14053    unix_path=`$CYGPATH -u "$windows_path"`
14054    MSYS_ROOT_PATH="$unix_path"
14055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14057    MSYS_ROOT_PATH="$unix_path"
14058  fi
14059
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14061$as_echo "$MSYS_ROOT_PATH" >&6; }
14062    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14063  else
14064    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14065  fi
14066
14067  # Test if windows or unix (cygwin/msys) find is first in path.
14068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14069$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14070  FIND_BINARY_OUTPUT=`find --version 2>&1`
14071  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14073$as_echo "unix style" >&6; }
14074  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14076$as_echo "Windows" >&6; }
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14078$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14079    { $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
14080$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14081    as_fn_error $? "Cannot continue" "$LINENO" 5
14082  else
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14084$as_echo "unknown" >&6; }
14085    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14086$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14087  fi
14088
14089  else
14090    PATH_SEP=":"
14091  fi
14092
14093
14094  # We get the top-level directory from the supporting wrappers.
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14096$as_echo_n "checking for top-level directory... " >&6; }
14097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14098$as_echo "$TOPDIR" >&6; }
14099
14100
14101  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14102
14103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14104
14105  # Input might be given as Windows format, start by converting to
14106  # unix format.
14107  path="$CURDIR"
14108  new_path=`$CYGPATH -u "$path"`
14109
14110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14113  # "foo.exe" is OK but "foo" is an error.
14114  #
14115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14116  # It is also a way to make sure we got the proper file name for the real test later on.
14117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14118  if test "x$test_shortpath" = x; then
14119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14120$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14121    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14122  fi
14123
14124  # Call helper function which possibly converts this using DOS-style short mode.
14125  # If so, the updated path is stored in $new_path.
14126
14127  input_path="$new_path"
14128  # Check if we need to convert this using DOS-style short mode. If the path
14129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14130  # take no chances and rewrite it.
14131  # Note: m4 eats our [], so we need to use [ and ] instead.
14132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14133  if test "x$has_forbidden_chars" != x; then
14134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14138      # Going to short mode and back again did indeed matter. Since short mode is
14139      # case insensitive, let's make it lowercase to improve readability.
14140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14141      # Now convert it back to Unix-stile (cygpath)
14142      input_path=`$CYGPATH -u "$shortmode_path"`
14143      new_path="$input_path"
14144    fi
14145  fi
14146
14147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14148  if test "x$test_cygdrive_prefix" = x; then
14149    # As a simple fix, exclude /usr/bin since it's not a real path.
14150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14152      # a path prefixed by /cygdrive for fixpath to work.
14153      new_path="$CYGWIN_ROOT_PATH$input_path"
14154    fi
14155  fi
14156
14157
14158  if test "x$path" != "x$new_path"; then
14159    CURDIR="$new_path"
14160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14161$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14162  fi
14163
14164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14165
14166  path="$CURDIR"
14167  has_colon=`$ECHO $path | $GREP ^.:`
14168  new_path="$path"
14169  if test "x$has_colon" = x; then
14170    # Not in mixed or Windows style, start by that.
14171    new_path=`cmd //c echo $path`
14172  fi
14173
14174
14175  input_path="$new_path"
14176  # Check if we need to convert this using DOS-style short mode. If the path
14177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14178  # take no chances and rewrite it.
14179  # Note: m4 eats our [], so we need to use [ and ] instead.
14180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14181  if test "x$has_forbidden_chars" != x; then
14182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14184  fi
14185
14186
14187  windows_path="$new_path"
14188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14189    unix_path=`$CYGPATH -u "$windows_path"`
14190    new_path="$unix_path"
14191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14193    new_path="$unix_path"
14194  fi
14195
14196  if test "x$path" != "x$new_path"; then
14197    CURDIR="$new_path"
14198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14199$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14200  fi
14201
14202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14204
14205  else
14206    # We're on a unix platform. Hooray! :)
14207    path="$CURDIR"
14208    has_space=`$ECHO "$path" | $GREP " "`
14209    if test "x$has_space" != x; then
14210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14211$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14212      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14213    fi
14214
14215    # Use eval to expand a potential ~
14216    eval path="$path"
14217    if test ! -f "$path" && test ! -d "$path"; then
14218      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14219    fi
14220
14221    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14222  fi
14223
14224
14225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14226
14227  # Input might be given as Windows format, start by converting to
14228  # unix format.
14229  path="$TOPDIR"
14230  new_path=`$CYGPATH -u "$path"`
14231
14232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14235  # "foo.exe" is OK but "foo" is an error.
14236  #
14237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14238  # It is also a way to make sure we got the proper file name for the real test later on.
14239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14240  if test "x$test_shortpath" = x; then
14241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14242$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14243    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14244  fi
14245
14246  # Call helper function which possibly converts this using DOS-style short mode.
14247  # If so, the updated path is stored in $new_path.
14248
14249  input_path="$new_path"
14250  # Check if we need to convert this using DOS-style short mode. If the path
14251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14252  # take no chances and rewrite it.
14253  # Note: m4 eats our [], so we need to use [ and ] instead.
14254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14255  if test "x$has_forbidden_chars" != x; then
14256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14260      # Going to short mode and back again did indeed matter. Since short mode is
14261      # case insensitive, let's make it lowercase to improve readability.
14262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14263      # Now convert it back to Unix-stile (cygpath)
14264      input_path=`$CYGPATH -u "$shortmode_path"`
14265      new_path="$input_path"
14266    fi
14267  fi
14268
14269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14270  if test "x$test_cygdrive_prefix" = x; then
14271    # As a simple fix, exclude /usr/bin since it's not a real path.
14272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14274      # a path prefixed by /cygdrive for fixpath to work.
14275      new_path="$CYGWIN_ROOT_PATH$input_path"
14276    fi
14277  fi
14278
14279
14280  if test "x$path" != "x$new_path"; then
14281    TOPDIR="$new_path"
14282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14283$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14284  fi
14285
14286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14287
14288  path="$TOPDIR"
14289  has_colon=`$ECHO $path | $GREP ^.:`
14290  new_path="$path"
14291  if test "x$has_colon" = x; then
14292    # Not in mixed or Windows style, start by that.
14293    new_path=`cmd //c echo $path`
14294  fi
14295
14296
14297  input_path="$new_path"
14298  # Check if we need to convert this using DOS-style short mode. If the path
14299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14300  # take no chances and rewrite it.
14301  # Note: m4 eats our [], so we need to use [ and ] instead.
14302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14303  if test "x$has_forbidden_chars" != x; then
14304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306  fi
14307
14308
14309  windows_path="$new_path"
14310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14311    unix_path=`$CYGPATH -u "$windows_path"`
14312    new_path="$unix_path"
14313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14315    new_path="$unix_path"
14316  fi
14317
14318  if test "x$path" != "x$new_path"; then
14319    TOPDIR="$new_path"
14320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14321$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14322  fi
14323
14324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14326
14327  else
14328    # We're on a unix platform. Hooray! :)
14329    path="$TOPDIR"
14330    has_space=`$ECHO "$path" | $GREP " "`
14331    if test "x$has_space" != x; then
14332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14333$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14335    fi
14336
14337    # Use eval to expand a potential ~
14338    eval path="$path"
14339    if test ! -f "$path" && test ! -d "$path"; then
14340      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14341    fi
14342
14343    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14344  fi
14345
14346  # SRC_ROOT is a traditional alias for TOPDIR.
14347  SRC_ROOT=$TOPDIR
14348
14349  # Locate the directory of this script.
14350  AUTOCONF_DIR=$TOPDIR/common/autoconf
14351
14352
14353  # Setup default logging of stdout and stderr to build.log in the output root.
14354  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14355  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14356  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14357
14358
14359
14360
14361
14362# Check if it's a pure open build or if custom sources are to be used.
14363
14364  # Check whether --enable-openjdk-only was given.
14365if test "${enable_openjdk_only+set}" = set; then :
14366  enableval=$enable_openjdk_only;
14367else
14368  enable_openjdk_only="no"
14369fi
14370
14371
14372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14373$as_echo_n "checking for presence of closed sources... " >&6; }
14374  if test -d "$SRC_ROOT/jdk/src/closed"; then
14375    CLOSED_SOURCE_PRESENT=yes
14376  else
14377    CLOSED_SOURCE_PRESENT=no
14378  fi
14379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14380$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14381
14382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14383$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14384  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14386$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14387
14388  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14389    OPENJDK=true
14390    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14391      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14392$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14393    fi
14394  else
14395    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14396      OPENJDK=true
14397    else
14398      OPENJDK=false
14399    fi
14400  fi
14401
14402  if test "x$OPENJDK" = "xtrue"; then
14403    SET_OPENJDK="OPENJDK=true"
14404  fi
14405
14406
14407
14408  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14409  # the IncludeCustomExtension macro.
14410
14411
14412# Check whether --with-custom-make-dir was given.
14413if test "${with_custom_make_dir+set}" = set; then :
14414  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
14415$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14416fi
14417
14418
14419
14420
14421# These are needed to be able to create a configuration name (and thus the output directory)
14422
14423  ###############################################################################
14424  #
14425  # Check which variant of the JDK that we want to build.
14426  # Currently we have:
14427  #    normal:   standard edition
14428  # but the custom make system may add other variants
14429  #
14430  # Effectively the JDK variant gives a name to a specific set of
14431  # modules to compile into the JDK. In the future, these modules
14432  # might even be Jigsaw modules.
14433  #
14434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14435$as_echo_n "checking which variant of the JDK to build... " >&6; }
14436
14437# Check whether --with-jdk-variant was given.
14438if test "${with_jdk_variant+set}" = set; then :
14439  withval=$with_jdk_variant;
14440fi
14441
14442
14443  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14444    JDK_VARIANT="normal"
14445  else
14446    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14447  fi
14448
14449
14450
14451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14452$as_echo "$JDK_VARIANT" >&6; }
14453
14454
14455###############################################################################
14456#
14457# Check which interpreter of the JVM we want to build.
14458# Currently we have:
14459#    template: Template interpreter (the default)
14460#    cpp     : C++ interpreter
14461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14462$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14463
14464# Check whether --with-jvm-interpreter was given.
14465if test "${with_jvm_interpreter+set}" = set; then :
14466  withval=$with_jvm_interpreter;
14467fi
14468
14469
14470if test "x$with_jvm_interpreter" = x; then
14471     with_jvm_interpreter="template"
14472fi
14473
14474JVM_INTERPRETER="$with_jvm_interpreter"
14475
14476if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14477   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14478fi
14479
14480
14481
14482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14483$as_echo "$with_jvm_interpreter" >&6; }
14484
14485
14486
14487  ###############################################################################
14488  #
14489  # Check which variants of the JVM that we want to build.
14490  # Currently we have:
14491  #    server: normal interpreter and a tiered C1/C2 compiler
14492  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14493  #    minimal1: reduced form of client with optional VM services and features stripped out
14494  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14495  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14496  #    zero: no machine code interpreter, no compiler
14497  #    zeroshark: zero interpreter and shark/llvm compiler backend
14498#    core: interpreter only, no compiler (only works on some platforms)
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14500$as_echo_n "checking which variants of the JVM to build... " >&6; }
14501
14502# Check whether --with-jvm-variants was given.
14503if test "${with_jvm_variants+set}" = set; then :
14504  withval=$with_jvm_variants;
14505fi
14506
14507
14508  if test "x$with_jvm_variants" = x; then
14509    with_jvm_variants="server"
14510  fi
14511
14512  JVM_VARIANTS=",$with_jvm_variants,"
14513  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14514
14515  if test "x$TEST_VARIANTS" != "x,"; then
14516     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14517  fi
14518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14519$as_echo "$with_jvm_variants" >&6; }
14520
14521  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14522  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14523  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14524  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14525  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14526  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14527  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14528
14529  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14530    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14531      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14532    fi
14533  fi
14534  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14535    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14536      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14537    fi
14538  fi
14539  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14540    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14541      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14542    fi
14543  fi
14544
14545  # Replace the commas with AND for use in the build directory name.
14546  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14547  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14548  if test "x$COUNT_VARIANTS" != "x,1"; then
14549    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14550  else
14551    BUILDING_MULTIPLE_JVM_VARIANTS=no
14552  fi
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563  INCLUDE_SA=true
14564  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14565    INCLUDE_SA=false
14566  fi
14567  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14568    INCLUDE_SA=false
14569  fi
14570  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14571    INCLUDE_SA=false
14572  fi
14573  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14574    INCLUDE_SA=false
14575  fi
14576
14577
14578  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14579    MACOSX_UNIVERSAL="true"
14580  fi
14581
14582
14583
14584
14585  ###############################################################################
14586  #
14587  # Set the debug level
14588  #    release: no debug information, all optimizations, no asserts.
14589  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14590  #    fastdebug: debug information (-g), all optimizations, all asserts
14591  #    slowdebug: debug information (-g), no optimizations, all asserts
14592  #
14593  DEBUG_LEVEL="release"
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14595$as_echo_n "checking which debug level to use... " >&6; }
14596  # Check whether --enable-debug was given.
14597if test "${enable_debug+set}" = set; then :
14598  enableval=$enable_debug;
14599        ENABLE_DEBUG="${enableval}"
14600        DEBUG_LEVEL="fastdebug"
14601
14602else
14603  ENABLE_DEBUG="no"
14604fi
14605
14606
14607
14608# Check whether --with-debug-level was given.
14609if test "${with_debug_level+set}" = set; then :
14610  withval=$with_debug_level;
14611        DEBUG_LEVEL="${withval}"
14612        if test "x$ENABLE_DEBUG" = xyes; then
14613          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14614        fi
14615
14616fi
14617
14618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14619$as_echo "$DEBUG_LEVEL" >&6; }
14620
14621  if test "x$DEBUG_LEVEL" != xrelease && \
14622      test "x$DEBUG_LEVEL" != xoptimized && \
14623      test "x$DEBUG_LEVEL" != xfastdebug && \
14624      test "x$DEBUG_LEVEL" != xslowdebug; then
14625    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14626  fi
14627
14628
14629  ###############################################################################
14630  #
14631  # Setup legacy vars/targets and new vars to deal with different debug levels.
14632  #
14633
14634  case $DEBUG_LEVEL in
14635    release )
14636      VARIANT="OPT"
14637      FASTDEBUG="false"
14638      DEBUG_CLASSFILES="false"
14639      BUILD_VARIANT_RELEASE=""
14640      HOTSPOT_DEBUG_LEVEL="product"
14641      HOTSPOT_EXPORT="product"
14642      ;;
14643    fastdebug )
14644      VARIANT="DBG"
14645      FASTDEBUG="true"
14646      DEBUG_CLASSFILES="true"
14647      BUILD_VARIANT_RELEASE="-fastdebug"
14648      HOTSPOT_DEBUG_LEVEL="fastdebug"
14649      HOTSPOT_EXPORT="fastdebug"
14650      ;;
14651    slowdebug )
14652      VARIANT="DBG"
14653      FASTDEBUG="false"
14654      DEBUG_CLASSFILES="true"
14655      BUILD_VARIANT_RELEASE="-debug"
14656      HOTSPOT_DEBUG_LEVEL="debug"
14657      HOTSPOT_EXPORT="debug"
14658      ;;
14659    optimized )
14660      VARIANT="OPT"
14661      FASTDEBUG="false"
14662      DEBUG_CLASSFILES="false"
14663      BUILD_VARIANT_RELEASE="-optimized"
14664      HOTSPOT_DEBUG_LEVEL="optimized"
14665      HOTSPOT_EXPORT="optimized"
14666      ;;
14667  esac
14668
14669  # The debug level 'optimized' is a little special because it is currently only
14670  # applicable to the HotSpot build where it means to build a completely
14671  # optimized version of the VM without any debugging code (like for the
14672  # 'release' debug level which is called 'product' in the HotSpot build) but
14673  # with the exception that it can contain additional code which is otherwise
14674  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14675  # test new and/or experimental features which are not intended for customer
14676  # shipment. Because these new features need to be tested and benchmarked in
14677  # real world scenarios, we want to build the containing JDK at the 'release'
14678  # debug level.
14679  if test "x$DEBUG_LEVEL" = xoptimized; then
14680    DEBUG_LEVEL="release"
14681  fi
14682
14683  #####
14684  # Generate the legacy makefile targets for hotspot.
14685  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14686  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14687  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14688  # But until then ...
14689  HOTSPOT_TARGET=""
14690
14691  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14692    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14693  fi
14694
14695  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14696    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14697  fi
14698
14699  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14700    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14701  fi
14702
14703  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14704    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14705  fi
14706
14707  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14708    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14709  fi
14710
14711  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14712    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14713  fi
14714
14715  if test "x$JVM_VARIANT_CORE" = xtrue; then
14716    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14717  fi
14718
14719  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14720
14721  # On Macosx universal binaries are produced, but they only contain
14722  # 64 bit intel. This invalidates control of which jvms are built
14723  # from configure, but only server is valid anyway. Fix this
14724  # when hotspot makefiles are rewritten.
14725  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14726    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14727  fi
14728
14729  #####
14730
14731
14732
14733
14734
14735
14736
14737
14738# With basic setup done, call the custom early hook.
14739
14740
14741# Check if we have devkits, extra paths or sysroot set.
14742
14743
14744# Check whether --with-devkit was given.
14745if test "${with_devkit+set}" = set; then :
14746  withval=$with_devkit;
14747
14748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14749
14750  # Input might be given as Windows format, start by converting to
14751  # unix format.
14752  path="$with_devkit"
14753  new_path=`$CYGPATH -u "$path"`
14754
14755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14758  # "foo.exe" is OK but "foo" is an error.
14759  #
14760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14761  # It is also a way to make sure we got the proper file name for the real test later on.
14762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14763  if test "x$test_shortpath" = x; then
14764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14765$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14766    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14767  fi
14768
14769  # Call helper function which possibly converts this using DOS-style short mode.
14770  # If so, the updated path is stored in $new_path.
14771
14772  input_path="$new_path"
14773  # Check if we need to convert this using DOS-style short mode. If the path
14774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14775  # take no chances and rewrite it.
14776  # Note: m4 eats our [], so we need to use [ and ] instead.
14777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14778  if test "x$has_forbidden_chars" != x; then
14779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14783      # Going to short mode and back again did indeed matter. Since short mode is
14784      # case insensitive, let's make it lowercase to improve readability.
14785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14786      # Now convert it back to Unix-stile (cygpath)
14787      input_path=`$CYGPATH -u "$shortmode_path"`
14788      new_path="$input_path"
14789    fi
14790  fi
14791
14792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14793  if test "x$test_cygdrive_prefix" = x; then
14794    # As a simple fix, exclude /usr/bin since it's not a real path.
14795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14797      # a path prefixed by /cygdrive for fixpath to work.
14798      new_path="$CYGWIN_ROOT_PATH$input_path"
14799    fi
14800  fi
14801
14802
14803  if test "x$path" != "x$new_path"; then
14804    with_devkit="$new_path"
14805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14806$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14807  fi
14808
14809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14810
14811  path="$with_devkit"
14812  has_colon=`$ECHO $path | $GREP ^.:`
14813  new_path="$path"
14814  if test "x$has_colon" = x; then
14815    # Not in mixed or Windows style, start by that.
14816    new_path=`cmd //c echo $path`
14817  fi
14818
14819
14820  input_path="$new_path"
14821  # Check if we need to convert this using DOS-style short mode. If the path
14822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14823  # take no chances and rewrite it.
14824  # Note: m4 eats our [], so we need to use [ and ] instead.
14825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14826  if test "x$has_forbidden_chars" != x; then
14827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14829  fi
14830
14831
14832  windows_path="$new_path"
14833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14834    unix_path=`$CYGPATH -u "$windows_path"`
14835    new_path="$unix_path"
14836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14838    new_path="$unix_path"
14839  fi
14840
14841  if test "x$path" != "x$new_path"; then
14842    with_devkit="$new_path"
14843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14844$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14845  fi
14846
14847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14849
14850  else
14851    # We're on a unix platform. Hooray! :)
14852    path="$with_devkit"
14853    has_space=`$ECHO "$path" | $GREP " "`
14854    if test "x$has_space" != x; then
14855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14856$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14858    fi
14859
14860    # Use eval to expand a potential ~
14861    eval path="$path"
14862    if test ! -f "$path" && test ! -d "$path"; then
14863      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14864    fi
14865
14866    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14867  fi
14868
14869        DEVKIT_ROOT="$with_devkit"
14870        # Check for a meta data info file in the root of the devkit
14871        if test -f "$DEVKIT_ROOT/devkit.info"; then
14872          # This potentially sets the following:
14873          # DEVKIT_NAME: A descriptive name of the devkit
14874          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14875          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14876          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14877          . $DEVKIT_ROOT/devkit.info
14878        fi
14879
14880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14881$as_echo_n "checking for devkit... " >&6; }
14882        if test "x$DEVKIT_NAME" != x; then
14883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14884$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14885        else
14886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14887$as_echo "$DEVKIT_ROOT" >&6; }
14888        fi
14889
14890        if test "x$DEVKIT_EXTRA_PATH" != x; then
14891
14892  if test "x$DEVKIT_EXTRA_PATH" != x; then
14893    if test "x$EXTRA_PATH" = x; then
14894      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14895    else
14896      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14897    fi
14898  fi
14899
14900        fi
14901
14902        # Fallback default of just /bin if DEVKIT_PATH is not defined
14903        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14904          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14905        fi
14906
14907  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14908    if test "x$TOOLCHAIN_PATH" = x; then
14909      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14910    else
14911      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14912    fi
14913  fi
14914
14915
14916        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14917        # places for backwards compatiblity.
14918        if test "x$DEVKIT_SYSROOT" != x; then
14919          SYSROOT="$DEVKIT_SYSROOT"
14920        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14921          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14922        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14923          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14924        fi
14925
14926
14927fi
14928
14929
14930  # You can force the sysroot if the sysroot encoded into the compiler tools
14931  # is not correct.
14932
14933# Check whether --with-sys-root was given.
14934if test "${with_sys_root+set}" = set; then :
14935  withval=$with_sys_root; SYSROOT=$with_sys_root
14936
14937fi
14938
14939
14940
14941# Check whether --with-sysroot was given.
14942if test "${with_sysroot+set}" = set; then :
14943  withval=$with_sysroot; SYSROOT=$with_sysroot
14944
14945fi
14946
14947
14948
14949# Check whether --with-tools-dir was given.
14950if test "${with_tools_dir+set}" = set; then :
14951  withval=$with_tools_dir;
14952  if test "x$with_tools_dir" != x; then
14953    if test "x$TOOLCHAIN_PATH" = x; then
14954      TOOLCHAIN_PATH="$with_tools_dir"
14955    else
14956      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14957    fi
14958  fi
14959
14960
14961fi
14962
14963
14964
14965# Check whether --with-toolchain-path was given.
14966if test "${with_toolchain_path+set}" = set; then :
14967  withval=$with_toolchain_path;
14968  if test "x$with_toolchain_path" != x; then
14969    if test "x$TOOLCHAIN_PATH" = x; then
14970      TOOLCHAIN_PATH="$with_toolchain_path"
14971    else
14972      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14973    fi
14974  fi
14975
14976
14977fi
14978
14979
14980
14981# Check whether --with-extra-path was given.
14982if test "${with_extra_path+set}" = set; then :
14983  withval=$with_extra_path;
14984  if test "x$with_extra_path" != x; then
14985    if test "x$EXTRA_PATH" = x; then
14986      EXTRA_PATH="$with_extra_path"
14987    else
14988      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14989    fi
14990  fi
14991
14992
14993fi
14994
14995
14996  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14997    # detect if Xcode is installed by running xcodebuild -version
14998    # if no Xcode installed, xcodebuild exits with 1
14999    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15000    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15001      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15002      # fall back on the stub binary in /usr/bin/xcodebuild
15003      # Extract the first word of "xcodebuild", so it can be a program name with args.
15004set dummy xcodebuild; ac_word=$2
15005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15006$as_echo_n "checking for $ac_word... " >&6; }
15007if ${ac_cv_path_XCODEBUILD+:} false; then :
15008  $as_echo_n "(cached) " >&6
15009else
15010  case $XCODEBUILD in
15011  [\\/]* | ?:[\\/]*)
15012  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15013  ;;
15014  *)
15015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15016for as_dir in $TOOLCHAIN_PATH
15017do
15018  IFS=$as_save_IFS
15019  test -z "$as_dir" && as_dir=.
15020    for ac_exec_ext in '' $ac_executable_extensions; do
15021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15022    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15024    break 2
15025  fi
15026done
15027  done
15028IFS=$as_save_IFS
15029
15030  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15031  ;;
15032esac
15033fi
15034XCODEBUILD=$ac_cv_path_XCODEBUILD
15035if test -n "$XCODEBUILD"; then
15036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15037$as_echo "$XCODEBUILD" >&6; }
15038else
15039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15040$as_echo "no" >&6; }
15041fi
15042
15043
15044    else
15045      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15046      # when only the command line tools are installed there are no SDKs, so headers
15047      # are copied into the system frameworks
15048      XCODEBUILD=
15049
15050    fi
15051
15052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15053$as_echo_n "checking for sdk name... " >&6; }
15054
15055# Check whether --with-sdk-name was given.
15056if test "${with_sdk_name+set}" = set; then :
15057  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15058
15059fi
15060
15061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15062$as_echo "$SDKNAME" >&6; }
15063
15064    # if toolchain path is specified then don't rely on system headers, they may not compile
15065    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15066    test -z "$TOOLCHAIN_PATH" && \
15067      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15068
15069    if test -z "$SYSROOT"; then
15070      if test -n "$XCODEBUILD"; then
15071        # if we don't have system headers, use default SDK name (last resort)
15072        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15073          SDKNAME=${SDKNAME:-macosx}
15074        fi
15075
15076        if test -n "$SDKNAME"; then
15077          # Call xcodebuild to determine SYSROOT
15078          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15079        fi
15080      else
15081        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15082          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
15083        fi
15084      fi
15085    else
15086      # warn user if --with-sdk-name was also set
15087      if test -n "$with_sdk_name"; then
15088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15089$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15090      fi
15091    fi
15092
15093    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15094      # If no system framework headers, then SYSROOT must be set, or we won't build
15095      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
15096    fi
15097
15098    # Perform a basic sanity test
15099    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15100      if test -z "$SYSROOT"; then
15101        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
15102      else
15103        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15104      fi
15105    fi
15106
15107    # set SDKROOT too, Xcode tools will pick it up
15108    SDKROOT=$SYSROOT
15109
15110  fi
15111
15112  # Prepend the extra path to the global path
15113
15114  if test "x$EXTRA_PATH" != x; then
15115    if test "x$PATH" = x; then
15116      PATH="$EXTRA_PATH"
15117    else
15118      PATH="$EXTRA_PATH:$PATH"
15119    fi
15120  fi
15121
15122
15123  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15124    # Add extra search paths on solaris for utilities like ar and as etc...
15125    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15126  fi
15127
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15129$as_echo_n "checking for sysroot... " >&6; }
15130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15131$as_echo "$SYSROOT" >&6; }
15132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15133$as_echo_n "checking for toolchain path... " >&6; }
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15135$as_echo "$TOOLCHAIN_PATH" >&6; }
15136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15137$as_echo_n "checking for extra path... " >&6; }
15138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15139$as_echo "$EXTRA_PATH" >&6; }
15140
15141
15142# To properly create a configuration name, we need to have the OpenJDK target
15143# and options (variants and debug level) parsed.
15144
15145
15146
15147# Check whether --with-conf-name was given.
15148if test "${with_conf_name+set}" = set; then :
15149  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15150fi
15151
15152
15153  # Test from where we are running configure, in or outside of src root.
15154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15155$as_echo_n "checking where to store configuration... " >&6; }
15156  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15157      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15158      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15159    # We are running configure from the src root.
15160    # Create a default ./build/target-variant-debuglevel output root.
15161    if test "x${CONF_NAME}" = x; then
15162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15163$as_echo "in default location" >&6; }
15164      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15165    else
15166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15167$as_echo "in build directory with custom name" >&6; }
15168    fi
15169    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15170    $MKDIR -p "$OUTPUT_ROOT"
15171    if test ! -d "$OUTPUT_ROOT"; then
15172      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15173    fi
15174  else
15175    # We are running configure from outside of the src dir.
15176    # Then use the current directory as output dir!
15177    # If configuration is situated in normal build directory, just use the build
15178    # directory name as configuration name, otherwise use the complete path.
15179    if test "x${CONF_NAME}" = x; then
15180      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15181    fi
15182    OUTPUT_ROOT="$CURDIR"
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15184$as_echo "in current directory" >&6; }
15185
15186    # WARNING: This might be a bad thing to do. You need to be sure you want to
15187    # have a configuration in this directory. Do some sanity checks!
15188
15189    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15190      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15191      # other files
15192      files_present=`$LS $OUTPUT_ROOT`
15193      # Configure has already touched config.log and confdefs.h in the current dir when this check
15194      # is performed.
15195      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15196      | $TR -d '\n'`
15197      if test "x$filtered_files" != x; then
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15199$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15200        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15201$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15202        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15203$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15204        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15205$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15207$as_echo "$as_me: seriously mess up just about everything." >&6;}
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15209$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15210        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15211$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15212        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15213      fi
15214    fi
15215  fi
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15217$as_echo_n "checking what configuration name to use... " >&6; }
15218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15219$as_echo "$CONF_NAME" >&6; }
15220
15221
15222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15223
15224  # Input might be given as Windows format, start by converting to
15225  # unix format.
15226  path="$OUTPUT_ROOT"
15227  new_path=`$CYGPATH -u "$path"`
15228
15229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15232  # "foo.exe" is OK but "foo" is an error.
15233  #
15234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15235  # It is also a way to make sure we got the proper file name for the real test later on.
15236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15237  if test "x$test_shortpath" = x; then
15238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15239$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15240    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15241  fi
15242
15243  # Call helper function which possibly converts this using DOS-style short mode.
15244  # If so, the updated path is stored in $new_path.
15245
15246  input_path="$new_path"
15247  # Check if we need to convert this using DOS-style short mode. If the path
15248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15249  # take no chances and rewrite it.
15250  # Note: m4 eats our [], so we need to use [ and ] instead.
15251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15252  if test "x$has_forbidden_chars" != x; then
15253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15257      # Going to short mode and back again did indeed matter. Since short mode is
15258      # case insensitive, let's make it lowercase to improve readability.
15259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15260      # Now convert it back to Unix-stile (cygpath)
15261      input_path=`$CYGPATH -u "$shortmode_path"`
15262      new_path="$input_path"
15263    fi
15264  fi
15265
15266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15267  if test "x$test_cygdrive_prefix" = x; then
15268    # As a simple fix, exclude /usr/bin since it's not a real path.
15269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15271      # a path prefixed by /cygdrive for fixpath to work.
15272      new_path="$CYGWIN_ROOT_PATH$input_path"
15273    fi
15274  fi
15275
15276
15277  if test "x$path" != "x$new_path"; then
15278    OUTPUT_ROOT="$new_path"
15279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15280$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15281  fi
15282
15283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15284
15285  path="$OUTPUT_ROOT"
15286  has_colon=`$ECHO $path | $GREP ^.:`
15287  new_path="$path"
15288  if test "x$has_colon" = x; then
15289    # Not in mixed or Windows style, start by that.
15290    new_path=`cmd //c echo $path`
15291  fi
15292
15293
15294  input_path="$new_path"
15295  # Check if we need to convert this using DOS-style short mode. If the path
15296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15297  # take no chances and rewrite it.
15298  # Note: m4 eats our [], so we need to use [ and ] instead.
15299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15300  if test "x$has_forbidden_chars" != x; then
15301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15303  fi
15304
15305
15306  windows_path="$new_path"
15307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15308    unix_path=`$CYGPATH -u "$windows_path"`
15309    new_path="$unix_path"
15310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15312    new_path="$unix_path"
15313  fi
15314
15315  if test "x$path" != "x$new_path"; then
15316    OUTPUT_ROOT="$new_path"
15317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15318$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15319  fi
15320
15321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15323
15324  else
15325    # We're on a unix platform. Hooray! :)
15326    path="$OUTPUT_ROOT"
15327    has_space=`$ECHO "$path" | $GREP " "`
15328    if test "x$has_space" != x; then
15329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15330$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15331      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15332    fi
15333
15334    # Use eval to expand a potential ~
15335    eval path="$path"
15336    if test ! -f "$path" && test ! -d "$path"; then
15337      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15338    fi
15339
15340    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15341  fi
15342
15343
15344  SPEC=$OUTPUT_ROOT/spec.gmk
15345
15346  CONF_NAME=$CONF_NAME
15347
15348  OUTPUT_ROOT=$OUTPUT_ROOT
15349
15350
15351  # The spec.gmk file contains all variables for the make system.
15352  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15353
15354  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15355  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15356
15357  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15358  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15359
15360  # The compare.sh is used to compare the build output to other builds.
15361  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15362
15363  # The generated Makefile knows where the spec.gmk is and where the source is.
15364  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15365  # which will look for generated configurations
15366  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15367
15368
15369
15370# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15371
15372  for ac_prog in apt-get yum port pkgutil pkgadd
15373do
15374  # Extract the first word of "$ac_prog", so it can be a program name with args.
15375set dummy $ac_prog; ac_word=$2
15376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15377$as_echo_n "checking for $ac_word... " >&6; }
15378if ${ac_cv_prog_PKGHANDLER+:} false; then :
15379  $as_echo_n "(cached) " >&6
15380else
15381  if test -n "$PKGHANDLER"; then
15382  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15383else
15384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15385for as_dir in $PATH
15386do
15387  IFS=$as_save_IFS
15388  test -z "$as_dir" && as_dir=.
15389    for ac_exec_ext in '' $ac_executable_extensions; do
15390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15391    ac_cv_prog_PKGHANDLER="$ac_prog"
15392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15393    break 2
15394  fi
15395done
15396  done
15397IFS=$as_save_IFS
15398
15399fi
15400fi
15401PKGHANDLER=$ac_cv_prog_PKGHANDLER
15402if test -n "$PKGHANDLER"; then
15403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15404$as_echo "$PKGHANDLER" >&6; }
15405else
15406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15407$as_echo "no" >&6; }
15408fi
15409
15410
15411  test -n "$PKGHANDLER" && break
15412done
15413
15414
15415
15416# Setup tools that requires more complex handling, or that is not needed by the configure script.
15417
15418
15419  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15420  if test "x$MAKE" != x; then
15421    # User has supplied a make, test it.
15422    if test ! -f "$MAKE"; then
15423      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15424    fi
15425
15426  MAKE_CANDIDATE=""$MAKE""
15427  DESCRIPTION="user supplied MAKE=$MAKE"
15428  if test "x$MAKE_CANDIDATE" != x; then
15429    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15430$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15431    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15432    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15433    if test "x$IS_GNU_MAKE" = x; then
15434      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15435$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15436    else
15437      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15438      if test "x$IS_MODERN_MAKE" = x; then
15439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15440$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15441      else
15442        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15443          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15444            MAKE_EXPECTED_ENV='cygwin'
15445          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15446            MAKE_EXPECTED_ENV='msys'
15447          else
15448            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15449          fi
15450          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15451          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15452        else
15453          # Not relevant for non-Windows
15454          IS_MAKE_CORRECT_ENV=true
15455        fi
15456        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15457          { $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
15458$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;}
15459        else
15460          FOUND_MAKE=$MAKE_CANDIDATE
15461
15462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15463
15464  # First separate the path from the arguments. This will split at the first
15465  # space.
15466  complete="$FOUND_MAKE"
15467  path="${complete%% *}"
15468  tmp="$complete EOL"
15469  arguments="${tmp#* }"
15470
15471  # Input might be given as Windows format, start by converting to
15472  # unix format.
15473  new_path=`$CYGPATH -u "$path"`
15474
15475  # Now try to locate executable using which
15476  new_path=`$WHICH "$new_path" 2> /dev/null`
15477  # bat and cmd files are not always considered executable in cygwin causing which
15478  # to not find them
15479  if test "x$new_path" = x \
15480      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15481      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15482    new_path=`$CYGPATH -u "$path"`
15483  fi
15484  if test "x$new_path" = x; then
15485    # Oops. Which didn't find the executable.
15486    # The splitting of arguments from the executable at a space might have been incorrect,
15487    # since paths with space are more likely in Windows. Give it another try with the whole
15488    # argument.
15489    path="$complete"
15490    arguments="EOL"
15491    new_path=`$CYGPATH -u "$path"`
15492    new_path=`$WHICH "$new_path" 2> /dev/null`
15493    # bat and cmd files are not always considered executable in cygwin causing which
15494    # to not find them
15495    if test "x$new_path" = x \
15496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15498      new_path=`$CYGPATH -u "$path"`
15499    fi
15500    if test "x$new_path" = x; then
15501      # It's still not found. Now this is an unrecoverable error.
15502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15503$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15504      has_space=`$ECHO "$complete" | $GREP " "`
15505      if test "x$has_space" != x; then
15506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15508      fi
15509      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15510    fi
15511  fi
15512
15513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15516  # "foo.exe" is OK but "foo" is an error.
15517  #
15518  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15519  # It is also a way to make sure we got the proper file name for the real test later on.
15520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15521  if test "x$test_shortpath" = x; then
15522    # Short path failed, file does not exist as specified.
15523    # Try adding .exe or .cmd
15524    if test -f "${new_path}.exe"; then
15525      input_to_shortpath="${new_path}.exe"
15526    elif test -f "${new_path}.cmd"; then
15527      input_to_shortpath="${new_path}.cmd"
15528    else
15529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15530$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15533      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15534    fi
15535  else
15536    input_to_shortpath="$new_path"
15537  fi
15538
15539  # Call helper function which possibly converts this using DOS-style short mode.
15540  # If so, the updated path is stored in $new_path.
15541  new_path="$input_to_shortpath"
15542
15543  input_path="$input_to_shortpath"
15544  # Check if we need to convert this using DOS-style short mode. If the path
15545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15546  # take no chances and rewrite it.
15547  # Note: m4 eats our [], so we need to use [ and ] instead.
15548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15549  if test "x$has_forbidden_chars" != x; then
15550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15554      # Going to short mode and back again did indeed matter. Since short mode is
15555      # case insensitive, let's make it lowercase to improve readability.
15556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15557      # Now convert it back to Unix-stile (cygpath)
15558      input_path=`$CYGPATH -u "$shortmode_path"`
15559      new_path="$input_path"
15560    fi
15561  fi
15562
15563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15564  if test "x$test_cygdrive_prefix" = x; then
15565    # As a simple fix, exclude /usr/bin since it's not a real path.
15566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15568      # a path prefixed by /cygdrive for fixpath to work.
15569      new_path="$CYGWIN_ROOT_PATH$input_path"
15570    fi
15571  fi
15572
15573  # remove trailing .exe if any
15574  new_path="${new_path/%.exe/}"
15575
15576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15577
15578  # First separate the path from the arguments. This will split at the first
15579  # space.
15580  complete="$FOUND_MAKE"
15581  path="${complete%% *}"
15582  tmp="$complete EOL"
15583  arguments="${tmp#* }"
15584
15585  # Input might be given as Windows format, start by converting to
15586  # unix format.
15587  new_path="$path"
15588
15589  windows_path="$new_path"
15590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15591    unix_path=`$CYGPATH -u "$windows_path"`
15592    new_path="$unix_path"
15593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15595    new_path="$unix_path"
15596  fi
15597
15598
15599  # Now try to locate executable using which
15600  new_path=`$WHICH "$new_path" 2> /dev/null`
15601
15602  if test "x$new_path" = x; then
15603    # Oops. Which didn't find the executable.
15604    # The splitting of arguments from the executable at a space might have been incorrect,
15605    # since paths with space are more likely in Windows. Give it another try with the whole
15606    # argument.
15607    path="$complete"
15608    arguments="EOL"
15609    new_path="$path"
15610
15611  windows_path="$new_path"
15612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15613    unix_path=`$CYGPATH -u "$windows_path"`
15614    new_path="$unix_path"
15615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15617    new_path="$unix_path"
15618  fi
15619
15620
15621    new_path=`$WHICH "$new_path" 2> /dev/null`
15622    # bat and cmd files are not always considered executable in MSYS causing which
15623    # to not find them
15624    if test "x$new_path" = x \
15625        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15626        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15627      new_path="$path"
15628
15629  windows_path="$new_path"
15630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15631    unix_path=`$CYGPATH -u "$windows_path"`
15632    new_path="$unix_path"
15633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15635    new_path="$unix_path"
15636  fi
15637
15638    fi
15639
15640    if test "x$new_path" = x; then
15641      # It's still not found. Now this is an unrecoverable error.
15642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15643$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15644      has_space=`$ECHO "$complete" | $GREP " "`
15645      if test "x$has_space" != x; then
15646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15648      fi
15649      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15650    fi
15651  fi
15652
15653  # Now new_path has a complete unix path to the binary
15654  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15655    # Keep paths in /bin as-is, but remove trailing .exe if any
15656    new_path="${new_path/%.exe/}"
15657    # Do not save /bin paths to all_fixpath_prefixes!
15658  else
15659    # Not in mixed or Windows style, start by that.
15660    new_path=`cmd //c echo $new_path`
15661
15662  input_path="$new_path"
15663  # Check if we need to convert this using DOS-style short mode. If the path
15664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15665  # take no chances and rewrite it.
15666  # Note: m4 eats our [], so we need to use [ and ] instead.
15667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15668  if test "x$has_forbidden_chars" != x; then
15669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15671  fi
15672
15673    # Output is in $new_path
15674
15675  windows_path="$new_path"
15676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15677    unix_path=`$CYGPATH -u "$windows_path"`
15678    new_path="$unix_path"
15679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15681    new_path="$unix_path"
15682  fi
15683
15684    # remove trailing .exe if any
15685    new_path="${new_path/%.exe/}"
15686
15687    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15688    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15689  fi
15690
15691  else
15692    # We're on a unix platform. Hooray! :)
15693    # First separate the path from the arguments. This will split at the first
15694    # space.
15695    complete="$FOUND_MAKE"
15696    path="${complete%% *}"
15697    tmp="$complete EOL"
15698    arguments="${tmp#* }"
15699
15700    # Cannot rely on the command "which" here since it doesn't always work.
15701    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15702    if test -z "$is_absolute_path"; then
15703      # Path to executable is not absolute. Find it.
15704      IFS_save="$IFS"
15705      IFS=:
15706      for p in $PATH; do
15707        if test -f "$p/$path" && test -x "$p/$path"; then
15708          new_path="$p/$path"
15709          break
15710        fi
15711      done
15712      IFS="$IFS_save"
15713    else
15714      # This is an absolute path, we can use it without further modifications.
15715      new_path="$path"
15716    fi
15717
15718    if test "x$new_path" = x; then
15719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15720$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15721      has_space=`$ECHO "$complete" | $GREP " "`
15722      if test "x$has_space" != x; then
15723        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15724$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15725      fi
15726      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15727    fi
15728  fi
15729
15730  # Now join together the path and the arguments once again
15731  if test "x$arguments" != xEOL; then
15732    new_complete="$new_path ${arguments% *}"
15733  else
15734    new_complete="$new_path"
15735  fi
15736
15737  if test "x$complete" != "x$new_complete"; then
15738    FOUND_MAKE="$new_complete"
15739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15740$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15741  fi
15742
15743        fi
15744      fi
15745    fi
15746  fi
15747
15748    if test "x$FOUND_MAKE" = x; then
15749      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15750    fi
15751  else
15752    # Try our hardest to locate a correct version of GNU make
15753    for ac_prog in gmake
15754do
15755  # Extract the first word of "$ac_prog", so it can be a program name with args.
15756set dummy $ac_prog; ac_word=$2
15757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15758$as_echo_n "checking for $ac_word... " >&6; }
15759if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15760  $as_echo_n "(cached) " >&6
15761else
15762  case $CHECK_GMAKE in
15763  [\\/]* | ?:[\\/]*)
15764  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15765  ;;
15766  *)
15767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15768for as_dir in $PATH
15769do
15770  IFS=$as_save_IFS
15771  test -z "$as_dir" && as_dir=.
15772    for ac_exec_ext in '' $ac_executable_extensions; do
15773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15774    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15776    break 2
15777  fi
15778done
15779  done
15780IFS=$as_save_IFS
15781
15782  ;;
15783esac
15784fi
15785CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15786if test -n "$CHECK_GMAKE"; then
15787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15788$as_echo "$CHECK_GMAKE" >&6; }
15789else
15790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15791$as_echo "no" >&6; }
15792fi
15793
15794
15795  test -n "$CHECK_GMAKE" && break
15796done
15797
15798
15799  MAKE_CANDIDATE=""$CHECK_GMAKE""
15800  DESCRIPTION="gmake in PATH"
15801  if test "x$MAKE_CANDIDATE" != x; then
15802    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15803$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15804    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15805    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15806    if test "x$IS_GNU_MAKE" = x; then
15807      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15808$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15809    else
15810      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15811      if test "x$IS_MODERN_MAKE" = x; then
15812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15813$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15814      else
15815        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15816          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15817            MAKE_EXPECTED_ENV='cygwin'
15818          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15819            MAKE_EXPECTED_ENV='msys'
15820          else
15821            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15822          fi
15823          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15824          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15825        else
15826          # Not relevant for non-Windows
15827          IS_MAKE_CORRECT_ENV=true
15828        fi
15829        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15830          { $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
15831$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;}
15832        else
15833          FOUND_MAKE=$MAKE_CANDIDATE
15834
15835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836
15837  # First separate the path from the arguments. This will split at the first
15838  # space.
15839  complete="$FOUND_MAKE"
15840  path="${complete%% *}"
15841  tmp="$complete EOL"
15842  arguments="${tmp#* }"
15843
15844  # Input might be given as Windows format, start by converting to
15845  # unix format.
15846  new_path=`$CYGPATH -u "$path"`
15847
15848  # Now try to locate executable using which
15849  new_path=`$WHICH "$new_path" 2> /dev/null`
15850  # bat and cmd files are not always considered executable in cygwin causing which
15851  # to not find them
15852  if test "x$new_path" = x \
15853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15855    new_path=`$CYGPATH -u "$path"`
15856  fi
15857  if test "x$new_path" = x; then
15858    # Oops. Which didn't find the executable.
15859    # The splitting of arguments from the executable at a space might have been incorrect,
15860    # since paths with space are more likely in Windows. Give it another try with the whole
15861    # argument.
15862    path="$complete"
15863    arguments="EOL"
15864    new_path=`$CYGPATH -u "$path"`
15865    new_path=`$WHICH "$new_path" 2> /dev/null`
15866    # bat and cmd files are not always considered executable in cygwin causing which
15867    # to not find them
15868    if test "x$new_path" = x \
15869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15871      new_path=`$CYGPATH -u "$path"`
15872    fi
15873    if test "x$new_path" = x; then
15874      # It's still not found. Now this is an unrecoverable error.
15875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15877      has_space=`$ECHO "$complete" | $GREP " "`
15878      if test "x$has_space" != x; then
15879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15881      fi
15882      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15883    fi
15884  fi
15885
15886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15889  # "foo.exe" is OK but "foo" is an error.
15890  #
15891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15892  # It is also a way to make sure we got the proper file name for the real test later on.
15893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15894  if test "x$test_shortpath" = x; then
15895    # Short path failed, file does not exist as specified.
15896    # Try adding .exe or .cmd
15897    if test -f "${new_path}.exe"; then
15898      input_to_shortpath="${new_path}.exe"
15899    elif test -f "${new_path}.cmd"; then
15900      input_to_shortpath="${new_path}.cmd"
15901    else
15902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15903$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15906      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15907    fi
15908  else
15909    input_to_shortpath="$new_path"
15910  fi
15911
15912  # Call helper function which possibly converts this using DOS-style short mode.
15913  # If so, the updated path is stored in $new_path.
15914  new_path="$input_to_shortpath"
15915
15916  input_path="$input_to_shortpath"
15917  # Check if we need to convert this using DOS-style short mode. If the path
15918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15919  # take no chances and rewrite it.
15920  # Note: m4 eats our [], so we need to use [ and ] instead.
15921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15922  if test "x$has_forbidden_chars" != x; then
15923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15927      # Going to short mode and back again did indeed matter. Since short mode is
15928      # case insensitive, let's make it lowercase to improve readability.
15929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15930      # Now convert it back to Unix-stile (cygpath)
15931      input_path=`$CYGPATH -u "$shortmode_path"`
15932      new_path="$input_path"
15933    fi
15934  fi
15935
15936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15937  if test "x$test_cygdrive_prefix" = x; then
15938    # As a simple fix, exclude /usr/bin since it's not a real path.
15939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15941      # a path prefixed by /cygdrive for fixpath to work.
15942      new_path="$CYGWIN_ROOT_PATH$input_path"
15943    fi
15944  fi
15945
15946  # remove trailing .exe if any
15947  new_path="${new_path/%.exe/}"
15948
15949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15950
15951  # First separate the path from the arguments. This will split at the first
15952  # space.
15953  complete="$FOUND_MAKE"
15954  path="${complete%% *}"
15955  tmp="$complete EOL"
15956  arguments="${tmp#* }"
15957
15958  # Input might be given as Windows format, start by converting to
15959  # unix format.
15960  new_path="$path"
15961
15962  windows_path="$new_path"
15963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15964    unix_path=`$CYGPATH -u "$windows_path"`
15965    new_path="$unix_path"
15966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15968    new_path="$unix_path"
15969  fi
15970
15971
15972  # Now try to locate executable using which
15973  new_path=`$WHICH "$new_path" 2> /dev/null`
15974
15975  if test "x$new_path" = x; then
15976    # Oops. Which didn't find the executable.
15977    # The splitting of arguments from the executable at a space might have been incorrect,
15978    # since paths with space are more likely in Windows. Give it another try with the whole
15979    # argument.
15980    path="$complete"
15981    arguments="EOL"
15982    new_path="$path"
15983
15984  windows_path="$new_path"
15985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15986    unix_path=`$CYGPATH -u "$windows_path"`
15987    new_path="$unix_path"
15988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15990    new_path="$unix_path"
15991  fi
15992
15993
15994    new_path=`$WHICH "$new_path" 2> /dev/null`
15995    # bat and cmd files are not always considered executable in MSYS causing which
15996    # to not find them
15997    if test "x$new_path" = x \
15998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16000      new_path="$path"
16001
16002  windows_path="$new_path"
16003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16004    unix_path=`$CYGPATH -u "$windows_path"`
16005    new_path="$unix_path"
16006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16008    new_path="$unix_path"
16009  fi
16010
16011    fi
16012
16013    if test "x$new_path" = x; then
16014      # It's still not found. Now this is an unrecoverable error.
16015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16016$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16017      has_space=`$ECHO "$complete" | $GREP " "`
16018      if test "x$has_space" != x; then
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16021      fi
16022      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16023    fi
16024  fi
16025
16026  # Now new_path has a complete unix path to the binary
16027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16028    # Keep paths in /bin as-is, but remove trailing .exe if any
16029    new_path="${new_path/%.exe/}"
16030    # Do not save /bin paths to all_fixpath_prefixes!
16031  else
16032    # Not in mixed or Windows style, start by that.
16033    new_path=`cmd //c echo $new_path`
16034
16035  input_path="$new_path"
16036  # Check if we need to convert this using DOS-style short mode. If the path
16037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16038  # take no chances and rewrite it.
16039  # Note: m4 eats our [], so we need to use [ and ] instead.
16040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16041  if test "x$has_forbidden_chars" != x; then
16042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16044  fi
16045
16046    # Output is in $new_path
16047
16048  windows_path="$new_path"
16049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16050    unix_path=`$CYGPATH -u "$windows_path"`
16051    new_path="$unix_path"
16052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16054    new_path="$unix_path"
16055  fi
16056
16057    # remove trailing .exe if any
16058    new_path="${new_path/%.exe/}"
16059
16060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16062  fi
16063
16064  else
16065    # We're on a unix platform. Hooray! :)
16066    # First separate the path from the arguments. This will split at the first
16067    # space.
16068    complete="$FOUND_MAKE"
16069    path="${complete%% *}"
16070    tmp="$complete EOL"
16071    arguments="${tmp#* }"
16072
16073    # Cannot rely on the command "which" here since it doesn't always work.
16074    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16075    if test -z "$is_absolute_path"; then
16076      # Path to executable is not absolute. Find it.
16077      IFS_save="$IFS"
16078      IFS=:
16079      for p in $PATH; do
16080        if test -f "$p/$path" && test -x "$p/$path"; then
16081          new_path="$p/$path"
16082          break
16083        fi
16084      done
16085      IFS="$IFS_save"
16086    else
16087      # This is an absolute path, we can use it without further modifications.
16088      new_path="$path"
16089    fi
16090
16091    if test "x$new_path" = x; then
16092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16094      has_space=`$ECHO "$complete" | $GREP " "`
16095      if test "x$has_space" != x; then
16096        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16098      fi
16099      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16100    fi
16101  fi
16102
16103  # Now join together the path and the arguments once again
16104  if test "x$arguments" != xEOL; then
16105    new_complete="$new_path ${arguments% *}"
16106  else
16107    new_complete="$new_path"
16108  fi
16109
16110  if test "x$complete" != "x$new_complete"; then
16111    FOUND_MAKE="$new_complete"
16112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16113$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16114  fi
16115
16116        fi
16117      fi
16118    fi
16119  fi
16120
16121
16122    if test "x$FOUND_MAKE" = x; then
16123      for ac_prog in make
16124do
16125  # Extract the first word of "$ac_prog", so it can be a program name with args.
16126set dummy $ac_prog; ac_word=$2
16127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16128$as_echo_n "checking for $ac_word... " >&6; }
16129if ${ac_cv_path_CHECK_MAKE+:} false; then :
16130  $as_echo_n "(cached) " >&6
16131else
16132  case $CHECK_MAKE in
16133  [\\/]* | ?:[\\/]*)
16134  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16135  ;;
16136  *)
16137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16138for as_dir in $PATH
16139do
16140  IFS=$as_save_IFS
16141  test -z "$as_dir" && as_dir=.
16142    for ac_exec_ext in '' $ac_executable_extensions; do
16143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16144    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16146    break 2
16147  fi
16148done
16149  done
16150IFS=$as_save_IFS
16151
16152  ;;
16153esac
16154fi
16155CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16156if test -n "$CHECK_MAKE"; then
16157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16158$as_echo "$CHECK_MAKE" >&6; }
16159else
16160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16161$as_echo "no" >&6; }
16162fi
16163
16164
16165  test -n "$CHECK_MAKE" && break
16166done
16167
16168
16169  MAKE_CANDIDATE=""$CHECK_MAKE""
16170  DESCRIPTION="make in PATH"
16171  if test "x$MAKE_CANDIDATE" != x; then
16172    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16173$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16174    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16175    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16176    if test "x$IS_GNU_MAKE" = x; then
16177      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16178$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16179    else
16180      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16181      if test "x$IS_MODERN_MAKE" = x; then
16182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16183$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16184      else
16185        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16186          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16187            MAKE_EXPECTED_ENV='cygwin'
16188          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16189            MAKE_EXPECTED_ENV='msys'
16190          else
16191            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16192          fi
16193          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16194          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16195        else
16196          # Not relevant for non-Windows
16197          IS_MAKE_CORRECT_ENV=true
16198        fi
16199        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16200          { $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
16201$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;}
16202        else
16203          FOUND_MAKE=$MAKE_CANDIDATE
16204
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206
16207  # First separate the path from the arguments. This will split at the first
16208  # space.
16209  complete="$FOUND_MAKE"
16210  path="${complete%% *}"
16211  tmp="$complete EOL"
16212  arguments="${tmp#* }"
16213
16214  # Input might be given as Windows format, start by converting to
16215  # unix format.
16216  new_path=`$CYGPATH -u "$path"`
16217
16218  # Now try to locate executable using which
16219  new_path=`$WHICH "$new_path" 2> /dev/null`
16220  # bat and cmd files are not always considered executable in cygwin causing which
16221  # to not find them
16222  if test "x$new_path" = x \
16223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16225    new_path=`$CYGPATH -u "$path"`
16226  fi
16227  if test "x$new_path" = x; then
16228    # Oops. Which didn't find the executable.
16229    # The splitting of arguments from the executable at a space might have been incorrect,
16230    # since paths with space are more likely in Windows. Give it another try with the whole
16231    # argument.
16232    path="$complete"
16233    arguments="EOL"
16234    new_path=`$CYGPATH -u "$path"`
16235    new_path=`$WHICH "$new_path" 2> /dev/null`
16236    # bat and cmd files are not always considered executable in cygwin causing which
16237    # to not find them
16238    if test "x$new_path" = x \
16239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16241      new_path=`$CYGPATH -u "$path"`
16242    fi
16243    if test "x$new_path" = x; then
16244      # It's still not found. Now this is an unrecoverable error.
16245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16247      has_space=`$ECHO "$complete" | $GREP " "`
16248      if test "x$has_space" != x; then
16249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16251      fi
16252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16253    fi
16254  fi
16255
16256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16259  # "foo.exe" is OK but "foo" is an error.
16260  #
16261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16262  # It is also a way to make sure we got the proper file name for the real test later on.
16263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16264  if test "x$test_shortpath" = x; then
16265    # Short path failed, file does not exist as specified.
16266    # Try adding .exe or .cmd
16267    if test -f "${new_path}.exe"; then
16268      input_to_shortpath="${new_path}.exe"
16269    elif test -f "${new_path}.cmd"; then
16270      input_to_shortpath="${new_path}.cmd"
16271    else
16272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16276      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16277    fi
16278  else
16279    input_to_shortpath="$new_path"
16280  fi
16281
16282  # Call helper function which possibly converts this using DOS-style short mode.
16283  # If so, the updated path is stored in $new_path.
16284  new_path="$input_to_shortpath"
16285
16286  input_path="$input_to_shortpath"
16287  # Check if we need to convert this using DOS-style short mode. If the path
16288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16289  # take no chances and rewrite it.
16290  # Note: m4 eats our [], so we need to use [ and ] instead.
16291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16292  if test "x$has_forbidden_chars" != x; then
16293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16297      # Going to short mode and back again did indeed matter. Since short mode is
16298      # case insensitive, let's make it lowercase to improve readability.
16299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16300      # Now convert it back to Unix-stile (cygpath)
16301      input_path=`$CYGPATH -u "$shortmode_path"`
16302      new_path="$input_path"
16303    fi
16304  fi
16305
16306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16307  if test "x$test_cygdrive_prefix" = x; then
16308    # As a simple fix, exclude /usr/bin since it's not a real path.
16309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16311      # a path prefixed by /cygdrive for fixpath to work.
16312      new_path="$CYGWIN_ROOT_PATH$input_path"
16313    fi
16314  fi
16315
16316  # remove trailing .exe if any
16317  new_path="${new_path/%.exe/}"
16318
16319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16320
16321  # First separate the path from the arguments. This will split at the first
16322  # space.
16323  complete="$FOUND_MAKE"
16324  path="${complete%% *}"
16325  tmp="$complete EOL"
16326  arguments="${tmp#* }"
16327
16328  # Input might be given as Windows format, start by converting to
16329  # unix format.
16330  new_path="$path"
16331
16332  windows_path="$new_path"
16333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16334    unix_path=`$CYGPATH -u "$windows_path"`
16335    new_path="$unix_path"
16336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16338    new_path="$unix_path"
16339  fi
16340
16341
16342  # Now try to locate executable using which
16343  new_path=`$WHICH "$new_path" 2> /dev/null`
16344
16345  if test "x$new_path" = x; then
16346    # Oops. Which didn't find the executable.
16347    # The splitting of arguments from the executable at a space might have been incorrect,
16348    # since paths with space are more likely in Windows. Give it another try with the whole
16349    # argument.
16350    path="$complete"
16351    arguments="EOL"
16352    new_path="$path"
16353
16354  windows_path="$new_path"
16355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16356    unix_path=`$CYGPATH -u "$windows_path"`
16357    new_path="$unix_path"
16358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16360    new_path="$unix_path"
16361  fi
16362
16363
16364    new_path=`$WHICH "$new_path" 2> /dev/null`
16365    # bat and cmd files are not always considered executable in MSYS causing which
16366    # to not find them
16367    if test "x$new_path" = x \
16368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16370      new_path="$path"
16371
16372  windows_path="$new_path"
16373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16374    unix_path=`$CYGPATH -u "$windows_path"`
16375    new_path="$unix_path"
16376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16378    new_path="$unix_path"
16379  fi
16380
16381    fi
16382
16383    if test "x$new_path" = x; then
16384      # It's still not found. Now this is an unrecoverable error.
16385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16386$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16387      has_space=`$ECHO "$complete" | $GREP " "`
16388      if test "x$has_space" != x; then
16389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16391      fi
16392      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16393    fi
16394  fi
16395
16396  # Now new_path has a complete unix path to the binary
16397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16398    # Keep paths in /bin as-is, but remove trailing .exe if any
16399    new_path="${new_path/%.exe/}"
16400    # Do not save /bin paths to all_fixpath_prefixes!
16401  else
16402    # Not in mixed or Windows style, start by that.
16403    new_path=`cmd //c echo $new_path`
16404
16405  input_path="$new_path"
16406  # Check if we need to convert this using DOS-style short mode. If the path
16407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16408  # take no chances and rewrite it.
16409  # Note: m4 eats our [], so we need to use [ and ] instead.
16410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16411  if test "x$has_forbidden_chars" != x; then
16412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16414  fi
16415
16416    # Output is in $new_path
16417
16418  windows_path="$new_path"
16419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16420    unix_path=`$CYGPATH -u "$windows_path"`
16421    new_path="$unix_path"
16422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16424    new_path="$unix_path"
16425  fi
16426
16427    # remove trailing .exe if any
16428    new_path="${new_path/%.exe/}"
16429
16430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16432  fi
16433
16434  else
16435    # We're on a unix platform. Hooray! :)
16436    # First separate the path from the arguments. This will split at the first
16437    # space.
16438    complete="$FOUND_MAKE"
16439    path="${complete%% *}"
16440    tmp="$complete EOL"
16441    arguments="${tmp#* }"
16442
16443    # Cannot rely on the command "which" here since it doesn't always work.
16444    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16445    if test -z "$is_absolute_path"; then
16446      # Path to executable is not absolute. Find it.
16447      IFS_save="$IFS"
16448      IFS=:
16449      for p in $PATH; do
16450        if test -f "$p/$path" && test -x "$p/$path"; then
16451          new_path="$p/$path"
16452          break
16453        fi
16454      done
16455      IFS="$IFS_save"
16456    else
16457      # This is an absolute path, we can use it without further modifications.
16458      new_path="$path"
16459    fi
16460
16461    if test "x$new_path" = x; then
16462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16464      has_space=`$ECHO "$complete" | $GREP " "`
16465      if test "x$has_space" != x; then
16466        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16468      fi
16469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16470    fi
16471  fi
16472
16473  # Now join together the path and the arguments once again
16474  if test "x$arguments" != xEOL; then
16475    new_complete="$new_path ${arguments% *}"
16476  else
16477    new_complete="$new_path"
16478  fi
16479
16480  if test "x$complete" != "x$new_complete"; then
16481    FOUND_MAKE="$new_complete"
16482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16483$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16484  fi
16485
16486        fi
16487      fi
16488    fi
16489  fi
16490
16491    fi
16492
16493    if test "x$FOUND_MAKE" = x; then
16494      if test "x$TOOLCHAIN_PATH" != x; then
16495        # We have a toolchain path, check that as well before giving up.
16496        OLD_PATH=$PATH
16497        PATH=$TOOLCHAIN_PATH:$PATH
16498        for ac_prog in gmake
16499do
16500  # Extract the first word of "$ac_prog", so it can be a program name with args.
16501set dummy $ac_prog; ac_word=$2
16502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16503$as_echo_n "checking for $ac_word... " >&6; }
16504if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16505  $as_echo_n "(cached) " >&6
16506else
16507  case $CHECK_TOOLSDIR_GMAKE in
16508  [\\/]* | ?:[\\/]*)
16509  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16510  ;;
16511  *)
16512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16513for as_dir in $PATH
16514do
16515  IFS=$as_save_IFS
16516  test -z "$as_dir" && as_dir=.
16517    for ac_exec_ext in '' $ac_executable_extensions; do
16518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16519    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16521    break 2
16522  fi
16523done
16524  done
16525IFS=$as_save_IFS
16526
16527  ;;
16528esac
16529fi
16530CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16531if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16533$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16534else
16535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16536$as_echo "no" >&6; }
16537fi
16538
16539
16540  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16541done
16542
16543
16544  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16545  DESCRIPTION="gmake in tools-dir"
16546  if test "x$MAKE_CANDIDATE" != x; then
16547    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16548$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16549    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16550    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16551    if test "x$IS_GNU_MAKE" = x; then
16552      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16553$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16554    else
16555      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16556      if test "x$IS_MODERN_MAKE" = x; then
16557        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16558$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16559      else
16560        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16561          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16562            MAKE_EXPECTED_ENV='cygwin'
16563          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16564            MAKE_EXPECTED_ENV='msys'
16565          else
16566            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16567          fi
16568          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16569          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16570        else
16571          # Not relevant for non-Windows
16572          IS_MAKE_CORRECT_ENV=true
16573        fi
16574        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16575          { $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
16576$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;}
16577        else
16578          FOUND_MAKE=$MAKE_CANDIDATE
16579
16580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16581
16582  # First separate the path from the arguments. This will split at the first
16583  # space.
16584  complete="$FOUND_MAKE"
16585  path="${complete%% *}"
16586  tmp="$complete EOL"
16587  arguments="${tmp#* }"
16588
16589  # Input might be given as Windows format, start by converting to
16590  # unix format.
16591  new_path=`$CYGPATH -u "$path"`
16592
16593  # Now try to locate executable using which
16594  new_path=`$WHICH "$new_path" 2> /dev/null`
16595  # bat and cmd files are not always considered executable in cygwin causing which
16596  # to not find them
16597  if test "x$new_path" = x \
16598      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16599      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16600    new_path=`$CYGPATH -u "$path"`
16601  fi
16602  if test "x$new_path" = x; then
16603    # Oops. Which didn't find the executable.
16604    # The splitting of arguments from the executable at a space might have been incorrect,
16605    # since paths with space are more likely in Windows. Give it another try with the whole
16606    # argument.
16607    path="$complete"
16608    arguments="EOL"
16609    new_path=`$CYGPATH -u "$path"`
16610    new_path=`$WHICH "$new_path" 2> /dev/null`
16611    # bat and cmd files are not always considered executable in cygwin causing which
16612    # to not find them
16613    if test "x$new_path" = x \
16614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16616      new_path=`$CYGPATH -u "$path"`
16617    fi
16618    if test "x$new_path" = x; then
16619      # It's still not found. Now this is an unrecoverable error.
16620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16621$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16622      has_space=`$ECHO "$complete" | $GREP " "`
16623      if test "x$has_space" != x; then
16624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16626      fi
16627      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16628    fi
16629  fi
16630
16631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16634  # "foo.exe" is OK but "foo" is an error.
16635  #
16636  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16637  # It is also a way to make sure we got the proper file name for the real test later on.
16638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16639  if test "x$test_shortpath" = x; then
16640    # Short path failed, file does not exist as specified.
16641    # Try adding .exe or .cmd
16642    if test -f "${new_path}.exe"; then
16643      input_to_shortpath="${new_path}.exe"
16644    elif test -f "${new_path}.cmd"; then
16645      input_to_shortpath="${new_path}.cmd"
16646    else
16647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16652    fi
16653  else
16654    input_to_shortpath="$new_path"
16655  fi
16656
16657  # Call helper function which possibly converts this using DOS-style short mode.
16658  # If so, the updated path is stored in $new_path.
16659  new_path="$input_to_shortpath"
16660
16661  input_path="$input_to_shortpath"
16662  # Check if we need to convert this using DOS-style short mode. If the path
16663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16664  # take no chances and rewrite it.
16665  # Note: m4 eats our [], so we need to use [ and ] instead.
16666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16667  if test "x$has_forbidden_chars" != x; then
16668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16672      # Going to short mode and back again did indeed matter. Since short mode is
16673      # case insensitive, let's make it lowercase to improve readability.
16674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16675      # Now convert it back to Unix-stile (cygpath)
16676      input_path=`$CYGPATH -u "$shortmode_path"`
16677      new_path="$input_path"
16678    fi
16679  fi
16680
16681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16682  if test "x$test_cygdrive_prefix" = x; then
16683    # As a simple fix, exclude /usr/bin since it's not a real path.
16684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16686      # a path prefixed by /cygdrive for fixpath to work.
16687      new_path="$CYGWIN_ROOT_PATH$input_path"
16688    fi
16689  fi
16690
16691  # remove trailing .exe if any
16692  new_path="${new_path/%.exe/}"
16693
16694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16695
16696  # First separate the path from the arguments. This will split at the first
16697  # space.
16698  complete="$FOUND_MAKE"
16699  path="${complete%% *}"
16700  tmp="$complete EOL"
16701  arguments="${tmp#* }"
16702
16703  # Input might be given as Windows format, start by converting to
16704  # unix format.
16705  new_path="$path"
16706
16707  windows_path="$new_path"
16708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16709    unix_path=`$CYGPATH -u "$windows_path"`
16710    new_path="$unix_path"
16711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16713    new_path="$unix_path"
16714  fi
16715
16716
16717  # Now try to locate executable using which
16718  new_path=`$WHICH "$new_path" 2> /dev/null`
16719
16720  if test "x$new_path" = x; then
16721    # Oops. Which didn't find the executable.
16722    # The splitting of arguments from the executable at a space might have been incorrect,
16723    # since paths with space are more likely in Windows. Give it another try with the whole
16724    # argument.
16725    path="$complete"
16726    arguments="EOL"
16727    new_path="$path"
16728
16729  windows_path="$new_path"
16730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16731    unix_path=`$CYGPATH -u "$windows_path"`
16732    new_path="$unix_path"
16733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16735    new_path="$unix_path"
16736  fi
16737
16738
16739    new_path=`$WHICH "$new_path" 2> /dev/null`
16740    # bat and cmd files are not always considered executable in MSYS causing which
16741    # to not find them
16742    if test "x$new_path" = x \
16743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16745      new_path="$path"
16746
16747  windows_path="$new_path"
16748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16749    unix_path=`$CYGPATH -u "$windows_path"`
16750    new_path="$unix_path"
16751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16753    new_path="$unix_path"
16754  fi
16755
16756    fi
16757
16758    if test "x$new_path" = x; then
16759      # It's still not found. Now this is an unrecoverable error.
16760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16761$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16762      has_space=`$ECHO "$complete" | $GREP " "`
16763      if test "x$has_space" != x; then
16764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16766      fi
16767      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16768    fi
16769  fi
16770
16771  # Now new_path has a complete unix path to the binary
16772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16773    # Keep paths in /bin as-is, but remove trailing .exe if any
16774    new_path="${new_path/%.exe/}"
16775    # Do not save /bin paths to all_fixpath_prefixes!
16776  else
16777    # Not in mixed or Windows style, start by that.
16778    new_path=`cmd //c echo $new_path`
16779
16780  input_path="$new_path"
16781  # Check if we need to convert this using DOS-style short mode. If the path
16782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16783  # take no chances and rewrite it.
16784  # Note: m4 eats our [], so we need to use [ and ] instead.
16785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16786  if test "x$has_forbidden_chars" != x; then
16787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16789  fi
16790
16791    # Output is in $new_path
16792
16793  windows_path="$new_path"
16794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16795    unix_path=`$CYGPATH -u "$windows_path"`
16796    new_path="$unix_path"
16797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16799    new_path="$unix_path"
16800  fi
16801
16802    # remove trailing .exe if any
16803    new_path="${new_path/%.exe/}"
16804
16805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16807  fi
16808
16809  else
16810    # We're on a unix platform. Hooray! :)
16811    # First separate the path from the arguments. This will split at the first
16812    # space.
16813    complete="$FOUND_MAKE"
16814    path="${complete%% *}"
16815    tmp="$complete EOL"
16816    arguments="${tmp#* }"
16817
16818    # Cannot rely on the command "which" here since it doesn't always work.
16819    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16820    if test -z "$is_absolute_path"; then
16821      # Path to executable is not absolute. Find it.
16822      IFS_save="$IFS"
16823      IFS=:
16824      for p in $PATH; do
16825        if test -f "$p/$path" && test -x "$p/$path"; then
16826          new_path="$p/$path"
16827          break
16828        fi
16829      done
16830      IFS="$IFS_save"
16831    else
16832      # This is an absolute path, we can use it without further modifications.
16833      new_path="$path"
16834    fi
16835
16836    if test "x$new_path" = x; then
16837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16838$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16839      has_space=`$ECHO "$complete" | $GREP " "`
16840      if test "x$has_space" != x; then
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16842$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16843      fi
16844      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16845    fi
16846  fi
16847
16848  # Now join together the path and the arguments once again
16849  if test "x$arguments" != xEOL; then
16850    new_complete="$new_path ${arguments% *}"
16851  else
16852    new_complete="$new_path"
16853  fi
16854
16855  if test "x$complete" != "x$new_complete"; then
16856    FOUND_MAKE="$new_complete"
16857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16858$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16859  fi
16860
16861        fi
16862      fi
16863    fi
16864  fi
16865
16866        if test "x$FOUND_MAKE" = x; then
16867          for ac_prog in make
16868do
16869  # Extract the first word of "$ac_prog", so it can be a program name with args.
16870set dummy $ac_prog; ac_word=$2
16871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16872$as_echo_n "checking for $ac_word... " >&6; }
16873if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16874  $as_echo_n "(cached) " >&6
16875else
16876  case $CHECK_TOOLSDIR_MAKE in
16877  [\\/]* | ?:[\\/]*)
16878  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16879  ;;
16880  *)
16881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16882for as_dir in $PATH
16883do
16884  IFS=$as_save_IFS
16885  test -z "$as_dir" && as_dir=.
16886    for ac_exec_ext in '' $ac_executable_extensions; do
16887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16888    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16890    break 2
16891  fi
16892done
16893  done
16894IFS=$as_save_IFS
16895
16896  ;;
16897esac
16898fi
16899CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16900if test -n "$CHECK_TOOLSDIR_MAKE"; then
16901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16902$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16903else
16904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16905$as_echo "no" >&6; }
16906fi
16907
16908
16909  test -n "$CHECK_TOOLSDIR_MAKE" && break
16910done
16911
16912
16913  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16914  DESCRIPTION="make in tools-dir"
16915  if test "x$MAKE_CANDIDATE" != x; then
16916    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16917$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16918    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16919    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16920    if test "x$IS_GNU_MAKE" = x; then
16921      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16922$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16923    else
16924      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16925      if test "x$IS_MODERN_MAKE" = x; then
16926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16927$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16928      else
16929        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16930          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16931            MAKE_EXPECTED_ENV='cygwin'
16932          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16933            MAKE_EXPECTED_ENV='msys'
16934          else
16935            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16936          fi
16937          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16938          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16939        else
16940          # Not relevant for non-Windows
16941          IS_MAKE_CORRECT_ENV=true
16942        fi
16943        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16944          { $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
16945$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;}
16946        else
16947          FOUND_MAKE=$MAKE_CANDIDATE
16948
16949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16950
16951  # First separate the path from the arguments. This will split at the first
16952  # space.
16953  complete="$FOUND_MAKE"
16954  path="${complete%% *}"
16955  tmp="$complete EOL"
16956  arguments="${tmp#* }"
16957
16958  # Input might be given as Windows format, start by converting to
16959  # unix format.
16960  new_path=`$CYGPATH -u "$path"`
16961
16962  # Now try to locate executable using which
16963  new_path=`$WHICH "$new_path" 2> /dev/null`
16964  # bat and cmd files are not always considered executable in cygwin causing which
16965  # to not find them
16966  if test "x$new_path" = x \
16967      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16968      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16969    new_path=`$CYGPATH -u "$path"`
16970  fi
16971  if test "x$new_path" = x; then
16972    # Oops. Which didn't find the executable.
16973    # The splitting of arguments from the executable at a space might have been incorrect,
16974    # since paths with space are more likely in Windows. Give it another try with the whole
16975    # argument.
16976    path="$complete"
16977    arguments="EOL"
16978    new_path=`$CYGPATH -u "$path"`
16979    new_path=`$WHICH "$new_path" 2> /dev/null`
16980    # bat and cmd files are not always considered executable in cygwin causing which
16981    # to not find them
16982    if test "x$new_path" = x \
16983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16985      new_path=`$CYGPATH -u "$path"`
16986    fi
16987    if test "x$new_path" = x; then
16988      # It's still not found. Now this is an unrecoverable error.
16989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16990$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16991      has_space=`$ECHO "$complete" | $GREP " "`
16992      if test "x$has_space" != x; then
16993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16995      fi
16996      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16997    fi
16998  fi
16999
17000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17003  # "foo.exe" is OK but "foo" is an error.
17004  #
17005  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17006  # It is also a way to make sure we got the proper file name for the real test later on.
17007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17008  if test "x$test_shortpath" = x; then
17009    # Short path failed, file does not exist as specified.
17010    # Try adding .exe or .cmd
17011    if test -f "${new_path}.exe"; then
17012      input_to_shortpath="${new_path}.exe"
17013    elif test -f "${new_path}.cmd"; then
17014      input_to_shortpath="${new_path}.cmd"
17015    else
17016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17017$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17018      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17019$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17020      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17021    fi
17022  else
17023    input_to_shortpath="$new_path"
17024  fi
17025
17026  # Call helper function which possibly converts this using DOS-style short mode.
17027  # If so, the updated path is stored in $new_path.
17028  new_path="$input_to_shortpath"
17029
17030  input_path="$input_to_shortpath"
17031  # Check if we need to convert this using DOS-style short mode. If the path
17032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17033  # take no chances and rewrite it.
17034  # Note: m4 eats our [], so we need to use [ and ] instead.
17035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17036  if test "x$has_forbidden_chars" != x; then
17037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17041      # Going to short mode and back again did indeed matter. Since short mode is
17042      # case insensitive, let's make it lowercase to improve readability.
17043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17044      # Now convert it back to Unix-stile (cygpath)
17045      input_path=`$CYGPATH -u "$shortmode_path"`
17046      new_path="$input_path"
17047    fi
17048  fi
17049
17050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17051  if test "x$test_cygdrive_prefix" = x; then
17052    # As a simple fix, exclude /usr/bin since it's not a real path.
17053    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17055      # a path prefixed by /cygdrive for fixpath to work.
17056      new_path="$CYGWIN_ROOT_PATH$input_path"
17057    fi
17058  fi
17059
17060  # remove trailing .exe if any
17061  new_path="${new_path/%.exe/}"
17062
17063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17064
17065  # First separate the path from the arguments. This will split at the first
17066  # space.
17067  complete="$FOUND_MAKE"
17068  path="${complete%% *}"
17069  tmp="$complete EOL"
17070  arguments="${tmp#* }"
17071
17072  # Input might be given as Windows format, start by converting to
17073  # unix format.
17074  new_path="$path"
17075
17076  windows_path="$new_path"
17077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17078    unix_path=`$CYGPATH -u "$windows_path"`
17079    new_path="$unix_path"
17080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17082    new_path="$unix_path"
17083  fi
17084
17085
17086  # Now try to locate executable using which
17087  new_path=`$WHICH "$new_path" 2> /dev/null`
17088
17089  if test "x$new_path" = x; then
17090    # Oops. Which didn't find the executable.
17091    # The splitting of arguments from the executable at a space might have been incorrect,
17092    # since paths with space are more likely in Windows. Give it another try with the whole
17093    # argument.
17094    path="$complete"
17095    arguments="EOL"
17096    new_path="$path"
17097
17098  windows_path="$new_path"
17099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17100    unix_path=`$CYGPATH -u "$windows_path"`
17101    new_path="$unix_path"
17102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17104    new_path="$unix_path"
17105  fi
17106
17107
17108    new_path=`$WHICH "$new_path" 2> /dev/null`
17109    # bat and cmd files are not always considered executable in MSYS causing which
17110    # to not find them
17111    if test "x$new_path" = x \
17112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17114      new_path="$path"
17115
17116  windows_path="$new_path"
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    unix_path=`$CYGPATH -u "$windows_path"`
17119    new_path="$unix_path"
17120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17122    new_path="$unix_path"
17123  fi
17124
17125    fi
17126
17127    if test "x$new_path" = x; then
17128      # It's still not found. Now this is an unrecoverable error.
17129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17130$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17131      has_space=`$ECHO "$complete" | $GREP " "`
17132      if test "x$has_space" != x; then
17133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17135      fi
17136      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17137    fi
17138  fi
17139
17140  # Now new_path has a complete unix path to the binary
17141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17142    # Keep paths in /bin as-is, but remove trailing .exe if any
17143    new_path="${new_path/%.exe/}"
17144    # Do not save /bin paths to all_fixpath_prefixes!
17145  else
17146    # Not in mixed or Windows style, start by that.
17147    new_path=`cmd //c echo $new_path`
17148
17149  input_path="$new_path"
17150  # Check if we need to convert this using DOS-style short mode. If the path
17151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17152  # take no chances and rewrite it.
17153  # Note: m4 eats our [], so we need to use [ and ] instead.
17154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17155  if test "x$has_forbidden_chars" != x; then
17156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17158  fi
17159
17160    # Output is in $new_path
17161
17162  windows_path="$new_path"
17163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17164    unix_path=`$CYGPATH -u "$windows_path"`
17165    new_path="$unix_path"
17166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17168    new_path="$unix_path"
17169  fi
17170
17171    # remove trailing .exe if any
17172    new_path="${new_path/%.exe/}"
17173
17174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17176  fi
17177
17178  else
17179    # We're on a unix platform. Hooray! :)
17180    # First separate the path from the arguments. This will split at the first
17181    # space.
17182    complete="$FOUND_MAKE"
17183    path="${complete%% *}"
17184    tmp="$complete EOL"
17185    arguments="${tmp#* }"
17186
17187    # Cannot rely on the command "which" here since it doesn't always work.
17188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17189    if test -z "$is_absolute_path"; then
17190      # Path to executable is not absolute. Find it.
17191      IFS_save="$IFS"
17192      IFS=:
17193      for p in $PATH; do
17194        if test -f "$p/$path" && test -x "$p/$path"; then
17195          new_path="$p/$path"
17196          break
17197        fi
17198      done
17199      IFS="$IFS_save"
17200    else
17201      # This is an absolute path, we can use it without further modifications.
17202      new_path="$path"
17203    fi
17204
17205    if test "x$new_path" = x; then
17206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17208      has_space=`$ECHO "$complete" | $GREP " "`
17209      if test "x$has_space" != x; then
17210        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17212      fi
17213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17214    fi
17215  fi
17216
17217  # Now join together the path and the arguments once again
17218  if test "x$arguments" != xEOL; then
17219    new_complete="$new_path ${arguments% *}"
17220  else
17221    new_complete="$new_path"
17222  fi
17223
17224  if test "x$complete" != "x$new_complete"; then
17225    FOUND_MAKE="$new_complete"
17226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17227$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17228  fi
17229
17230        fi
17231      fi
17232    fi
17233  fi
17234
17235        fi
17236        PATH=$OLD_PATH
17237      fi
17238    fi
17239
17240    if test "x$FOUND_MAKE" = x; then
17241      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17242    fi
17243  fi
17244
17245  MAKE=$FOUND_MAKE
17246
17247  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17248$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17249
17250
17251  # Check if make supports the output sync option and if so, setup using it.
17252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17253$as_echo_n "checking if make --output-sync is supported... " >&6; }
17254  if $MAKE --version -O > /dev/null 2>&1; then
17255    OUTPUT_SYNC_SUPPORTED=true
17256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17257$as_echo "yes" >&6; }
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17259$as_echo_n "checking for output-sync value... " >&6; }
17260
17261# Check whether --with-output-sync was given.
17262if test "${with_output_sync+set}" = set; then :
17263  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17264fi
17265
17266    if test "x$OUTPUT_SYNC" = "x"; then
17267      OUTPUT_SYNC=none
17268    fi
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17270$as_echo "$OUTPUT_SYNC" >&6; }
17271    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17272      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17273    fi
17274  else
17275    OUTPUT_SYNC_SUPPORTED=false
17276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17277$as_echo "no" >&6; }
17278  fi
17279
17280
17281
17282
17283
17284
17285  # Test if find supports -delete
17286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17287$as_echo_n "checking if find supports -delete... " >&6; }
17288  FIND_DELETE="-delete"
17289
17290  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17291
17292  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17293
17294  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17295  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17296    # No, it does not.
17297    rm $DELETEDIR/TestIfFindSupportsDelete
17298    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17299      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17300      FIND_DELETE="-print | xargs rm"
17301    else
17302      FIND_DELETE="-exec rm \{\} \+"
17303    fi
17304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17305$as_echo "no" >&6; }
17306  else
17307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17308$as_echo "yes" >&6; }
17309  fi
17310  rmdir $DELETEDIR
17311
17312
17313
17314  # These tools might not be installed by default,
17315  # need hint on how to install them.
17316
17317
17318
17319  # Publish this variable in the help.
17320
17321
17322  if test "x$UNZIP" = x; then
17323    # The variable is not set by user, try to locate tool using the code snippet
17324    for ac_prog in unzip
17325do
17326  # Extract the first word of "$ac_prog", so it can be a program name with args.
17327set dummy $ac_prog; ac_word=$2
17328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17329$as_echo_n "checking for $ac_word... " >&6; }
17330if ${ac_cv_path_UNZIP+:} false; then :
17331  $as_echo_n "(cached) " >&6
17332else
17333  case $UNZIP in
17334  [\\/]* | ?:[\\/]*)
17335  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17336  ;;
17337  *)
17338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17339for as_dir in $PATH
17340do
17341  IFS=$as_save_IFS
17342  test -z "$as_dir" && as_dir=.
17343    for ac_exec_ext in '' $ac_executable_extensions; do
17344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17345    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17347    break 2
17348  fi
17349done
17350  done
17351IFS=$as_save_IFS
17352
17353  ;;
17354esac
17355fi
17356UNZIP=$ac_cv_path_UNZIP
17357if test -n "$UNZIP"; then
17358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17359$as_echo "$UNZIP" >&6; }
17360else
17361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17362$as_echo "no" >&6; }
17363fi
17364
17365
17366  test -n "$UNZIP" && break
17367done
17368
17369  else
17370    # The variable is set, but is it from the command line or the environment?
17371
17372    # Try to remove the string !UNZIP! from our list.
17373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17375      # If it failed, the variable was not from the command line. Ignore it,
17376      # but warn the user (except for BASH, which is always set by the calling BASH).
17377      if test "xUNZIP" != xBASH; then
17378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17379$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17380      fi
17381      # Try to locate tool using the code snippet
17382      for ac_prog in unzip
17383do
17384  # Extract the first word of "$ac_prog", so it can be a program name with args.
17385set dummy $ac_prog; ac_word=$2
17386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17387$as_echo_n "checking for $ac_word... " >&6; }
17388if ${ac_cv_path_UNZIP+:} false; then :
17389  $as_echo_n "(cached) " >&6
17390else
17391  case $UNZIP in
17392  [\\/]* | ?:[\\/]*)
17393  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17394  ;;
17395  *)
17396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17397for as_dir in $PATH
17398do
17399  IFS=$as_save_IFS
17400  test -z "$as_dir" && as_dir=.
17401    for ac_exec_ext in '' $ac_executable_extensions; do
17402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17403    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17405    break 2
17406  fi
17407done
17408  done
17409IFS=$as_save_IFS
17410
17411  ;;
17412esac
17413fi
17414UNZIP=$ac_cv_path_UNZIP
17415if test -n "$UNZIP"; then
17416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17417$as_echo "$UNZIP" >&6; }
17418else
17419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17420$as_echo "no" >&6; }
17421fi
17422
17423
17424  test -n "$UNZIP" && break
17425done
17426
17427    else
17428      # If it succeeded, then it was overridden by the user. We will use it
17429      # for the tool.
17430
17431      # First remove it from the list of overridden variables, so we can test
17432      # for unknown variables in the end.
17433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17434
17435      # Check if the provided tool contains a complete path.
17436      tool_specified="$UNZIP"
17437      tool_basename="${tool_specified##*/}"
17438      if test "x$tool_basename" = "x$tool_specified"; then
17439        # A command without a complete path is provided, search $PATH.
17440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17441$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17442        # Extract the first word of "$tool_basename", so it can be a program name with args.
17443set dummy $tool_basename; ac_word=$2
17444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17445$as_echo_n "checking for $ac_word... " >&6; }
17446if ${ac_cv_path_UNZIP+:} false; then :
17447  $as_echo_n "(cached) " >&6
17448else
17449  case $UNZIP in
17450  [\\/]* | ?:[\\/]*)
17451  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17452  ;;
17453  *)
17454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17455for as_dir in $PATH
17456do
17457  IFS=$as_save_IFS
17458  test -z "$as_dir" && as_dir=.
17459    for ac_exec_ext in '' $ac_executable_extensions; do
17460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17461    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17463    break 2
17464  fi
17465done
17466  done
17467IFS=$as_save_IFS
17468
17469  ;;
17470esac
17471fi
17472UNZIP=$ac_cv_path_UNZIP
17473if test -n "$UNZIP"; then
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17475$as_echo "$UNZIP" >&6; }
17476else
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17478$as_echo "no" >&6; }
17479fi
17480
17481
17482        if test "x$UNZIP" = x; then
17483          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17484        fi
17485      else
17486        # Otherwise we believe it is a complete path. Use it as it is.
17487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17488$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17489        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17490$as_echo_n "checking for UNZIP... " >&6; }
17491        if test ! -x "$tool_specified"; then
17492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17493$as_echo "not found" >&6; }
17494          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17495        fi
17496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17497$as_echo "$tool_specified" >&6; }
17498      fi
17499    fi
17500  fi
17501
17502
17503
17504  if test "x$UNZIP" = x; then
17505    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17506  fi
17507
17508
17509
17510
17511
17512  # Publish this variable in the help.
17513
17514
17515  if test "x$ZIP" = x; then
17516    # The variable is not set by user, try to locate tool using the code snippet
17517    for ac_prog in zip
17518do
17519  # Extract the first word of "$ac_prog", so it can be a program name with args.
17520set dummy $ac_prog; ac_word=$2
17521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17522$as_echo_n "checking for $ac_word... " >&6; }
17523if ${ac_cv_path_ZIP+:} false; then :
17524  $as_echo_n "(cached) " >&6
17525else
17526  case $ZIP in
17527  [\\/]* | ?:[\\/]*)
17528  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17529  ;;
17530  *)
17531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17532for as_dir in $PATH
17533do
17534  IFS=$as_save_IFS
17535  test -z "$as_dir" && as_dir=.
17536    for ac_exec_ext in '' $ac_executable_extensions; do
17537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17538    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17540    break 2
17541  fi
17542done
17543  done
17544IFS=$as_save_IFS
17545
17546  ;;
17547esac
17548fi
17549ZIP=$ac_cv_path_ZIP
17550if test -n "$ZIP"; then
17551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17552$as_echo "$ZIP" >&6; }
17553else
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17555$as_echo "no" >&6; }
17556fi
17557
17558
17559  test -n "$ZIP" && break
17560done
17561
17562  else
17563    # The variable is set, but is it from the command line or the environment?
17564
17565    # Try to remove the string !ZIP! from our list.
17566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17568      # If it failed, the variable was not from the command line. Ignore it,
17569      # but warn the user (except for BASH, which is always set by the calling BASH).
17570      if test "xZIP" != xBASH; then
17571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17572$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17573      fi
17574      # Try to locate tool using the code snippet
17575      for ac_prog in zip
17576do
17577  # Extract the first word of "$ac_prog", so it can be a program name with args.
17578set dummy $ac_prog; ac_word=$2
17579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17580$as_echo_n "checking for $ac_word... " >&6; }
17581if ${ac_cv_path_ZIP+:} false; then :
17582  $as_echo_n "(cached) " >&6
17583else
17584  case $ZIP in
17585  [\\/]* | ?:[\\/]*)
17586  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17587  ;;
17588  *)
17589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17590for as_dir in $PATH
17591do
17592  IFS=$as_save_IFS
17593  test -z "$as_dir" && as_dir=.
17594    for ac_exec_ext in '' $ac_executable_extensions; do
17595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17596    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17598    break 2
17599  fi
17600done
17601  done
17602IFS=$as_save_IFS
17603
17604  ;;
17605esac
17606fi
17607ZIP=$ac_cv_path_ZIP
17608if test -n "$ZIP"; then
17609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17610$as_echo "$ZIP" >&6; }
17611else
17612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17613$as_echo "no" >&6; }
17614fi
17615
17616
17617  test -n "$ZIP" && break
17618done
17619
17620    else
17621      # If it succeeded, then it was overridden by the user. We will use it
17622      # for the tool.
17623
17624      # First remove it from the list of overridden variables, so we can test
17625      # for unknown variables in the end.
17626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17627
17628      # Check if the provided tool contains a complete path.
17629      tool_specified="$ZIP"
17630      tool_basename="${tool_specified##*/}"
17631      if test "x$tool_basename" = "x$tool_specified"; then
17632        # A command without a complete path is provided, search $PATH.
17633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17634$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17635        # Extract the first word of "$tool_basename", so it can be a program name with args.
17636set dummy $tool_basename; ac_word=$2
17637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17638$as_echo_n "checking for $ac_word... " >&6; }
17639if ${ac_cv_path_ZIP+:} false; then :
17640  $as_echo_n "(cached) " >&6
17641else
17642  case $ZIP in
17643  [\\/]* | ?:[\\/]*)
17644  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17645  ;;
17646  *)
17647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17648for as_dir in $PATH
17649do
17650  IFS=$as_save_IFS
17651  test -z "$as_dir" && as_dir=.
17652    for ac_exec_ext in '' $ac_executable_extensions; do
17653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17654    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17656    break 2
17657  fi
17658done
17659  done
17660IFS=$as_save_IFS
17661
17662  ;;
17663esac
17664fi
17665ZIP=$ac_cv_path_ZIP
17666if test -n "$ZIP"; then
17667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17668$as_echo "$ZIP" >&6; }
17669else
17670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17671$as_echo "no" >&6; }
17672fi
17673
17674
17675        if test "x$ZIP" = x; then
17676          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17677        fi
17678      else
17679        # Otherwise we believe it is a complete path. Use it as it is.
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17681$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17683$as_echo_n "checking for ZIP... " >&6; }
17684        if test ! -x "$tool_specified"; then
17685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17686$as_echo "not found" >&6; }
17687          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17688        fi
17689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17690$as_echo "$tool_specified" >&6; }
17691      fi
17692    fi
17693  fi
17694
17695
17696
17697  if test "x$ZIP" = x; then
17698    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17699  fi
17700
17701
17702
17703  # Non-required basic tools
17704
17705
17706
17707  # Publish this variable in the help.
17708
17709
17710  if test "x$LDD" = x; then
17711    # The variable is not set by user, try to locate tool using the code snippet
17712    for ac_prog in ldd
17713do
17714  # Extract the first word of "$ac_prog", so it can be a program name with args.
17715set dummy $ac_prog; ac_word=$2
17716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17717$as_echo_n "checking for $ac_word... " >&6; }
17718if ${ac_cv_path_LDD+:} false; then :
17719  $as_echo_n "(cached) " >&6
17720else
17721  case $LDD in
17722  [\\/]* | ?:[\\/]*)
17723  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17724  ;;
17725  *)
17726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17727for as_dir in $PATH
17728do
17729  IFS=$as_save_IFS
17730  test -z "$as_dir" && as_dir=.
17731    for ac_exec_ext in '' $ac_executable_extensions; do
17732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17733    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17735    break 2
17736  fi
17737done
17738  done
17739IFS=$as_save_IFS
17740
17741  ;;
17742esac
17743fi
17744LDD=$ac_cv_path_LDD
17745if test -n "$LDD"; then
17746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17747$as_echo "$LDD" >&6; }
17748else
17749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17750$as_echo "no" >&6; }
17751fi
17752
17753
17754  test -n "$LDD" && break
17755done
17756
17757  else
17758    # The variable is set, but is it from the command line or the environment?
17759
17760    # Try to remove the string !LDD! from our list.
17761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17763      # If it failed, the variable was not from the command line. Ignore it,
17764      # but warn the user (except for BASH, which is always set by the calling BASH).
17765      if test "xLDD" != xBASH; then
17766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17767$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17768      fi
17769      # Try to locate tool using the code snippet
17770      for ac_prog in ldd
17771do
17772  # Extract the first word of "$ac_prog", so it can be a program name with args.
17773set dummy $ac_prog; ac_word=$2
17774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17775$as_echo_n "checking for $ac_word... " >&6; }
17776if ${ac_cv_path_LDD+:} false; then :
17777  $as_echo_n "(cached) " >&6
17778else
17779  case $LDD in
17780  [\\/]* | ?:[\\/]*)
17781  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17782  ;;
17783  *)
17784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17785for as_dir in $PATH
17786do
17787  IFS=$as_save_IFS
17788  test -z "$as_dir" && as_dir=.
17789    for ac_exec_ext in '' $ac_executable_extensions; do
17790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17791    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17793    break 2
17794  fi
17795done
17796  done
17797IFS=$as_save_IFS
17798
17799  ;;
17800esac
17801fi
17802LDD=$ac_cv_path_LDD
17803if test -n "$LDD"; then
17804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17805$as_echo "$LDD" >&6; }
17806else
17807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17808$as_echo "no" >&6; }
17809fi
17810
17811
17812  test -n "$LDD" && break
17813done
17814
17815    else
17816      # If it succeeded, then it was overridden by the user. We will use it
17817      # for the tool.
17818
17819      # First remove it from the list of overridden variables, so we can test
17820      # for unknown variables in the end.
17821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17822
17823      # Check if the provided tool contains a complete path.
17824      tool_specified="$LDD"
17825      tool_basename="${tool_specified##*/}"
17826      if test "x$tool_basename" = "x$tool_specified"; then
17827        # A command without a complete path is provided, search $PATH.
17828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17829$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17830        # Extract the first word of "$tool_basename", so it can be a program name with args.
17831set dummy $tool_basename; ac_word=$2
17832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17833$as_echo_n "checking for $ac_word... " >&6; }
17834if ${ac_cv_path_LDD+:} false; then :
17835  $as_echo_n "(cached) " >&6
17836else
17837  case $LDD in
17838  [\\/]* | ?:[\\/]*)
17839  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17840  ;;
17841  *)
17842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17843for as_dir in $PATH
17844do
17845  IFS=$as_save_IFS
17846  test -z "$as_dir" && as_dir=.
17847    for ac_exec_ext in '' $ac_executable_extensions; do
17848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17849    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17851    break 2
17852  fi
17853done
17854  done
17855IFS=$as_save_IFS
17856
17857  ;;
17858esac
17859fi
17860LDD=$ac_cv_path_LDD
17861if test -n "$LDD"; then
17862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17863$as_echo "$LDD" >&6; }
17864else
17865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17866$as_echo "no" >&6; }
17867fi
17868
17869
17870        if test "x$LDD" = x; then
17871          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17872        fi
17873      else
17874        # Otherwise we believe it is a complete path. Use it as it is.
17875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17876$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17877        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17878$as_echo_n "checking for LDD... " >&6; }
17879        if test ! -x "$tool_specified"; then
17880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17881$as_echo "not found" >&6; }
17882          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17883        fi
17884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17885$as_echo "$tool_specified" >&6; }
17886      fi
17887    fi
17888  fi
17889
17890
17891  if test "x$LDD" = "x"; then
17892    # List shared lib dependencies is used for
17893    # debug output and checking for forbidden dependencies.
17894    # We can build without it.
17895    LDD="true"
17896  fi
17897
17898
17899  # Publish this variable in the help.
17900
17901
17902  if test "x$OTOOL" = x; then
17903    # The variable is not set by user, try to locate tool using the code snippet
17904    for ac_prog in otool
17905do
17906  # Extract the first word of "$ac_prog", so it can be a program name with args.
17907set dummy $ac_prog; ac_word=$2
17908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17909$as_echo_n "checking for $ac_word... " >&6; }
17910if ${ac_cv_path_OTOOL+:} false; then :
17911  $as_echo_n "(cached) " >&6
17912else
17913  case $OTOOL in
17914  [\\/]* | ?:[\\/]*)
17915  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17916  ;;
17917  *)
17918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17919for as_dir in $PATH
17920do
17921  IFS=$as_save_IFS
17922  test -z "$as_dir" && as_dir=.
17923    for ac_exec_ext in '' $ac_executable_extensions; do
17924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17925    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17927    break 2
17928  fi
17929done
17930  done
17931IFS=$as_save_IFS
17932
17933  ;;
17934esac
17935fi
17936OTOOL=$ac_cv_path_OTOOL
17937if test -n "$OTOOL"; then
17938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17939$as_echo "$OTOOL" >&6; }
17940else
17941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17942$as_echo "no" >&6; }
17943fi
17944
17945
17946  test -n "$OTOOL" && break
17947done
17948
17949  else
17950    # The variable is set, but is it from the command line or the environment?
17951
17952    # Try to remove the string !OTOOL! from our list.
17953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17955      # If it failed, the variable was not from the command line. Ignore it,
17956      # but warn the user (except for BASH, which is always set by the calling BASH).
17957      if test "xOTOOL" != xBASH; then
17958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17959$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17960      fi
17961      # Try to locate tool using the code snippet
17962      for ac_prog in otool
17963do
17964  # Extract the first word of "$ac_prog", so it can be a program name with args.
17965set dummy $ac_prog; ac_word=$2
17966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17967$as_echo_n "checking for $ac_word... " >&6; }
17968if ${ac_cv_path_OTOOL+:} false; then :
17969  $as_echo_n "(cached) " >&6
17970else
17971  case $OTOOL in
17972  [\\/]* | ?:[\\/]*)
17973  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17974  ;;
17975  *)
17976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17977for as_dir in $PATH
17978do
17979  IFS=$as_save_IFS
17980  test -z "$as_dir" && as_dir=.
17981    for ac_exec_ext in '' $ac_executable_extensions; do
17982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17983    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17985    break 2
17986  fi
17987done
17988  done
17989IFS=$as_save_IFS
17990
17991  ;;
17992esac
17993fi
17994OTOOL=$ac_cv_path_OTOOL
17995if test -n "$OTOOL"; then
17996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17997$as_echo "$OTOOL" >&6; }
17998else
17999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18000$as_echo "no" >&6; }
18001fi
18002
18003
18004  test -n "$OTOOL" && break
18005done
18006
18007    else
18008      # If it succeeded, then it was overridden by the user. We will use it
18009      # for the tool.
18010
18011      # First remove it from the list of overridden variables, so we can test
18012      # for unknown variables in the end.
18013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18014
18015      # Check if the provided tool contains a complete path.
18016      tool_specified="$OTOOL"
18017      tool_basename="${tool_specified##*/}"
18018      if test "x$tool_basename" = "x$tool_specified"; then
18019        # A command without a complete path is provided, search $PATH.
18020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18021$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18022        # Extract the first word of "$tool_basename", so it can be a program name with args.
18023set dummy $tool_basename; ac_word=$2
18024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18025$as_echo_n "checking for $ac_word... " >&6; }
18026if ${ac_cv_path_OTOOL+:} false; then :
18027  $as_echo_n "(cached) " >&6
18028else
18029  case $OTOOL in
18030  [\\/]* | ?:[\\/]*)
18031  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18032  ;;
18033  *)
18034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18035for as_dir in $PATH
18036do
18037  IFS=$as_save_IFS
18038  test -z "$as_dir" && as_dir=.
18039    for ac_exec_ext in '' $ac_executable_extensions; do
18040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18041    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18043    break 2
18044  fi
18045done
18046  done
18047IFS=$as_save_IFS
18048
18049  ;;
18050esac
18051fi
18052OTOOL=$ac_cv_path_OTOOL
18053if test -n "$OTOOL"; then
18054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18055$as_echo "$OTOOL" >&6; }
18056else
18057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18058$as_echo "no" >&6; }
18059fi
18060
18061
18062        if test "x$OTOOL" = x; then
18063          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18064        fi
18065      else
18066        # Otherwise we believe it is a complete path. Use it as it is.
18067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18068$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18070$as_echo_n "checking for OTOOL... " >&6; }
18071        if test ! -x "$tool_specified"; then
18072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18073$as_echo "not found" >&6; }
18074          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18075        fi
18076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18077$as_echo "$tool_specified" >&6; }
18078      fi
18079    fi
18080  fi
18081
18082
18083  if test "x$OTOOL" = "x"; then
18084    OTOOL="true"
18085  fi
18086
18087
18088  # Publish this variable in the help.
18089
18090
18091  if test "x$READELF" = x; then
18092    # The variable is not set by user, try to locate tool using the code snippet
18093    for ac_prog in greadelf readelf
18094do
18095  # Extract the first word of "$ac_prog", so it can be a program name with args.
18096set dummy $ac_prog; ac_word=$2
18097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18098$as_echo_n "checking for $ac_word... " >&6; }
18099if ${ac_cv_path_READELF+:} false; then :
18100  $as_echo_n "(cached) " >&6
18101else
18102  case $READELF in
18103  [\\/]* | ?:[\\/]*)
18104  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18105  ;;
18106  *)
18107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18108for as_dir in $PATH
18109do
18110  IFS=$as_save_IFS
18111  test -z "$as_dir" && as_dir=.
18112    for ac_exec_ext in '' $ac_executable_extensions; do
18113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18114    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18116    break 2
18117  fi
18118done
18119  done
18120IFS=$as_save_IFS
18121
18122  ;;
18123esac
18124fi
18125READELF=$ac_cv_path_READELF
18126if test -n "$READELF"; then
18127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18128$as_echo "$READELF" >&6; }
18129else
18130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18131$as_echo "no" >&6; }
18132fi
18133
18134
18135  test -n "$READELF" && break
18136done
18137
18138  else
18139    # The variable is set, but is it from the command line or the environment?
18140
18141    # Try to remove the string !READELF! from our list.
18142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18144      # If it failed, the variable was not from the command line. Ignore it,
18145      # but warn the user (except for BASH, which is always set by the calling BASH).
18146      if test "xREADELF" != xBASH; then
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18148$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18149      fi
18150      # Try to locate tool using the code snippet
18151      for ac_prog in greadelf readelf
18152do
18153  # Extract the first word of "$ac_prog", so it can be a program name with args.
18154set dummy $ac_prog; ac_word=$2
18155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18156$as_echo_n "checking for $ac_word... " >&6; }
18157if ${ac_cv_path_READELF+:} false; then :
18158  $as_echo_n "(cached) " >&6
18159else
18160  case $READELF in
18161  [\\/]* | ?:[\\/]*)
18162  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18163  ;;
18164  *)
18165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18166for as_dir in $PATH
18167do
18168  IFS=$as_save_IFS
18169  test -z "$as_dir" && as_dir=.
18170    for ac_exec_ext in '' $ac_executable_extensions; do
18171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18172    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18174    break 2
18175  fi
18176done
18177  done
18178IFS=$as_save_IFS
18179
18180  ;;
18181esac
18182fi
18183READELF=$ac_cv_path_READELF
18184if test -n "$READELF"; then
18185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18186$as_echo "$READELF" >&6; }
18187else
18188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18189$as_echo "no" >&6; }
18190fi
18191
18192
18193  test -n "$READELF" && break
18194done
18195
18196    else
18197      # If it succeeded, then it was overridden by the user. We will use it
18198      # for the tool.
18199
18200      # First remove it from the list of overridden variables, so we can test
18201      # for unknown variables in the end.
18202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18203
18204      # Check if the provided tool contains a complete path.
18205      tool_specified="$READELF"
18206      tool_basename="${tool_specified##*/}"
18207      if test "x$tool_basename" = "x$tool_specified"; then
18208        # A command without a complete path is provided, search $PATH.
18209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18210$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18211        # Extract the first word of "$tool_basename", so it can be a program name with args.
18212set dummy $tool_basename; ac_word=$2
18213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18214$as_echo_n "checking for $ac_word... " >&6; }
18215if ${ac_cv_path_READELF+:} false; then :
18216  $as_echo_n "(cached) " >&6
18217else
18218  case $READELF in
18219  [\\/]* | ?:[\\/]*)
18220  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18221  ;;
18222  *)
18223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18224for as_dir in $PATH
18225do
18226  IFS=$as_save_IFS
18227  test -z "$as_dir" && as_dir=.
18228    for ac_exec_ext in '' $ac_executable_extensions; do
18229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18230    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18232    break 2
18233  fi
18234done
18235  done
18236IFS=$as_save_IFS
18237
18238  ;;
18239esac
18240fi
18241READELF=$ac_cv_path_READELF
18242if test -n "$READELF"; then
18243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18244$as_echo "$READELF" >&6; }
18245else
18246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18247$as_echo "no" >&6; }
18248fi
18249
18250
18251        if test "x$READELF" = x; then
18252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18253        fi
18254      else
18255        # Otherwise we believe it is a complete path. Use it as it is.
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18257$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18259$as_echo_n "checking for READELF... " >&6; }
18260        if test ! -x "$tool_specified"; then
18261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18262$as_echo "not found" >&6; }
18263          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18264        fi
18265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18266$as_echo "$tool_specified" >&6; }
18267      fi
18268    fi
18269  fi
18270
18271
18272
18273
18274  # Publish this variable in the help.
18275
18276
18277  if test "x$HG" = x; then
18278    # The variable is not set by user, try to locate tool using the code snippet
18279    for ac_prog in hg
18280do
18281  # Extract the first word of "$ac_prog", so it can be a program name with args.
18282set dummy $ac_prog; ac_word=$2
18283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18284$as_echo_n "checking for $ac_word... " >&6; }
18285if ${ac_cv_path_HG+:} false; then :
18286  $as_echo_n "(cached) " >&6
18287else
18288  case $HG in
18289  [\\/]* | ?:[\\/]*)
18290  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18291  ;;
18292  *)
18293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18294for as_dir in $PATH
18295do
18296  IFS=$as_save_IFS
18297  test -z "$as_dir" && as_dir=.
18298    for ac_exec_ext in '' $ac_executable_extensions; do
18299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18300    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18302    break 2
18303  fi
18304done
18305  done
18306IFS=$as_save_IFS
18307
18308  ;;
18309esac
18310fi
18311HG=$ac_cv_path_HG
18312if test -n "$HG"; then
18313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18314$as_echo "$HG" >&6; }
18315else
18316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18317$as_echo "no" >&6; }
18318fi
18319
18320
18321  test -n "$HG" && break
18322done
18323
18324  else
18325    # The variable is set, but is it from the command line or the environment?
18326
18327    # Try to remove the string !HG! from our list.
18328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18330      # If it failed, the variable was not from the command line. Ignore it,
18331      # but warn the user (except for BASH, which is always set by the calling BASH).
18332      if test "xHG" != xBASH; then
18333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18334$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18335      fi
18336      # Try to locate tool using the code snippet
18337      for ac_prog in hg
18338do
18339  # Extract the first word of "$ac_prog", so it can be a program name with args.
18340set dummy $ac_prog; ac_word=$2
18341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18342$as_echo_n "checking for $ac_word... " >&6; }
18343if ${ac_cv_path_HG+:} false; then :
18344  $as_echo_n "(cached) " >&6
18345else
18346  case $HG in
18347  [\\/]* | ?:[\\/]*)
18348  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18349  ;;
18350  *)
18351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18352for as_dir in $PATH
18353do
18354  IFS=$as_save_IFS
18355  test -z "$as_dir" && as_dir=.
18356    for ac_exec_ext in '' $ac_executable_extensions; do
18357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18358    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18360    break 2
18361  fi
18362done
18363  done
18364IFS=$as_save_IFS
18365
18366  ;;
18367esac
18368fi
18369HG=$ac_cv_path_HG
18370if test -n "$HG"; then
18371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18372$as_echo "$HG" >&6; }
18373else
18374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18375$as_echo "no" >&6; }
18376fi
18377
18378
18379  test -n "$HG" && break
18380done
18381
18382    else
18383      # If it succeeded, then it was overridden by the user. We will use it
18384      # for the tool.
18385
18386      # First remove it from the list of overridden variables, so we can test
18387      # for unknown variables in the end.
18388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18389
18390      # Check if the provided tool contains a complete path.
18391      tool_specified="$HG"
18392      tool_basename="${tool_specified##*/}"
18393      if test "x$tool_basename" = "x$tool_specified"; then
18394        # A command without a complete path is provided, search $PATH.
18395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18396$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18397        # Extract the first word of "$tool_basename", so it can be a program name with args.
18398set dummy $tool_basename; ac_word=$2
18399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18400$as_echo_n "checking for $ac_word... " >&6; }
18401if ${ac_cv_path_HG+:} false; then :
18402  $as_echo_n "(cached) " >&6
18403else
18404  case $HG in
18405  [\\/]* | ?:[\\/]*)
18406  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18407  ;;
18408  *)
18409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18410for as_dir in $PATH
18411do
18412  IFS=$as_save_IFS
18413  test -z "$as_dir" && as_dir=.
18414    for ac_exec_ext in '' $ac_executable_extensions; do
18415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18416    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18418    break 2
18419  fi
18420done
18421  done
18422IFS=$as_save_IFS
18423
18424  ;;
18425esac
18426fi
18427HG=$ac_cv_path_HG
18428if test -n "$HG"; then
18429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18430$as_echo "$HG" >&6; }
18431else
18432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433$as_echo "no" >&6; }
18434fi
18435
18436
18437        if test "x$HG" = x; then
18438          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18439        fi
18440      else
18441        # Otherwise we believe it is a complete path. Use it as it is.
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18443$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18445$as_echo_n "checking for HG... " >&6; }
18446        if test ! -x "$tool_specified"; then
18447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18448$as_echo "not found" >&6; }
18449          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18450        fi
18451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18452$as_echo "$tool_specified" >&6; }
18453      fi
18454    fi
18455  fi
18456
18457
18458
18459
18460  # Publish this variable in the help.
18461
18462
18463  if test "x$STAT" = x; then
18464    # The variable is not set by user, try to locate tool using the code snippet
18465    for ac_prog in stat
18466do
18467  # Extract the first word of "$ac_prog", so it can be a program name with args.
18468set dummy $ac_prog; ac_word=$2
18469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18470$as_echo_n "checking for $ac_word... " >&6; }
18471if ${ac_cv_path_STAT+:} false; then :
18472  $as_echo_n "(cached) " >&6
18473else
18474  case $STAT in
18475  [\\/]* | ?:[\\/]*)
18476  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18477  ;;
18478  *)
18479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18480for as_dir in $PATH
18481do
18482  IFS=$as_save_IFS
18483  test -z "$as_dir" && as_dir=.
18484    for ac_exec_ext in '' $ac_executable_extensions; do
18485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18486    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18488    break 2
18489  fi
18490done
18491  done
18492IFS=$as_save_IFS
18493
18494  ;;
18495esac
18496fi
18497STAT=$ac_cv_path_STAT
18498if test -n "$STAT"; then
18499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18500$as_echo "$STAT" >&6; }
18501else
18502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18503$as_echo "no" >&6; }
18504fi
18505
18506
18507  test -n "$STAT" && break
18508done
18509
18510  else
18511    # The variable is set, but is it from the command line or the environment?
18512
18513    # Try to remove the string !STAT! from our list.
18514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18516      # If it failed, the variable was not from the command line. Ignore it,
18517      # but warn the user (except for BASH, which is always set by the calling BASH).
18518      if test "xSTAT" != xBASH; then
18519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18520$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18521      fi
18522      # Try to locate tool using the code snippet
18523      for ac_prog in stat
18524do
18525  # Extract the first word of "$ac_prog", so it can be a program name with args.
18526set dummy $ac_prog; ac_word=$2
18527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18528$as_echo_n "checking for $ac_word... " >&6; }
18529if ${ac_cv_path_STAT+:} false; then :
18530  $as_echo_n "(cached) " >&6
18531else
18532  case $STAT in
18533  [\\/]* | ?:[\\/]*)
18534  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18535  ;;
18536  *)
18537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18538for as_dir in $PATH
18539do
18540  IFS=$as_save_IFS
18541  test -z "$as_dir" && as_dir=.
18542    for ac_exec_ext in '' $ac_executable_extensions; do
18543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18544    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18546    break 2
18547  fi
18548done
18549  done
18550IFS=$as_save_IFS
18551
18552  ;;
18553esac
18554fi
18555STAT=$ac_cv_path_STAT
18556if test -n "$STAT"; then
18557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18558$as_echo "$STAT" >&6; }
18559else
18560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18561$as_echo "no" >&6; }
18562fi
18563
18564
18565  test -n "$STAT" && break
18566done
18567
18568    else
18569      # If it succeeded, then it was overridden by the user. We will use it
18570      # for the tool.
18571
18572      # First remove it from the list of overridden variables, so we can test
18573      # for unknown variables in the end.
18574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18575
18576      # Check if the provided tool contains a complete path.
18577      tool_specified="$STAT"
18578      tool_basename="${tool_specified##*/}"
18579      if test "x$tool_basename" = "x$tool_specified"; then
18580        # A command without a complete path is provided, search $PATH.
18581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18582$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18583        # Extract the first word of "$tool_basename", so it can be a program name with args.
18584set dummy $tool_basename; ac_word=$2
18585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18586$as_echo_n "checking for $ac_word... " >&6; }
18587if ${ac_cv_path_STAT+:} false; then :
18588  $as_echo_n "(cached) " >&6
18589else
18590  case $STAT in
18591  [\\/]* | ?:[\\/]*)
18592  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18593  ;;
18594  *)
18595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596for as_dir in $PATH
18597do
18598  IFS=$as_save_IFS
18599  test -z "$as_dir" && as_dir=.
18600    for ac_exec_ext in '' $ac_executable_extensions; do
18601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18602    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604    break 2
18605  fi
18606done
18607  done
18608IFS=$as_save_IFS
18609
18610  ;;
18611esac
18612fi
18613STAT=$ac_cv_path_STAT
18614if test -n "$STAT"; then
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18616$as_echo "$STAT" >&6; }
18617else
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619$as_echo "no" >&6; }
18620fi
18621
18622
18623        if test "x$STAT" = x; then
18624          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18625        fi
18626      else
18627        # Otherwise we believe it is a complete path. Use it as it is.
18628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18629$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18631$as_echo_n "checking for STAT... " >&6; }
18632        if test ! -x "$tool_specified"; then
18633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18634$as_echo "not found" >&6; }
18635          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18636        fi
18637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18638$as_echo "$tool_specified" >&6; }
18639      fi
18640    fi
18641  fi
18642
18643
18644
18645
18646  # Publish this variable in the help.
18647
18648
18649  if test "x$TIME" = x; then
18650    # The variable is not set by user, try to locate tool using the code snippet
18651    for ac_prog in time
18652do
18653  # Extract the first word of "$ac_prog", so it can be a program name with args.
18654set dummy $ac_prog; ac_word=$2
18655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18656$as_echo_n "checking for $ac_word... " >&6; }
18657if ${ac_cv_path_TIME+:} false; then :
18658  $as_echo_n "(cached) " >&6
18659else
18660  case $TIME in
18661  [\\/]* | ?:[\\/]*)
18662  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18663  ;;
18664  *)
18665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18666for as_dir in $PATH
18667do
18668  IFS=$as_save_IFS
18669  test -z "$as_dir" && as_dir=.
18670    for ac_exec_ext in '' $ac_executable_extensions; do
18671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18672    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18674    break 2
18675  fi
18676done
18677  done
18678IFS=$as_save_IFS
18679
18680  ;;
18681esac
18682fi
18683TIME=$ac_cv_path_TIME
18684if test -n "$TIME"; then
18685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18686$as_echo "$TIME" >&6; }
18687else
18688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18689$as_echo "no" >&6; }
18690fi
18691
18692
18693  test -n "$TIME" && break
18694done
18695
18696  else
18697    # The variable is set, but is it from the command line or the environment?
18698
18699    # Try to remove the string !TIME! from our list.
18700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18702      # If it failed, the variable was not from the command line. Ignore it,
18703      # but warn the user (except for BASH, which is always set by the calling BASH).
18704      if test "xTIME" != xBASH; then
18705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18706$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18707      fi
18708      # Try to locate tool using the code snippet
18709      for ac_prog in time
18710do
18711  # Extract the first word of "$ac_prog", so it can be a program name with args.
18712set dummy $ac_prog; ac_word=$2
18713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18714$as_echo_n "checking for $ac_word... " >&6; }
18715if ${ac_cv_path_TIME+:} false; then :
18716  $as_echo_n "(cached) " >&6
18717else
18718  case $TIME in
18719  [\\/]* | ?:[\\/]*)
18720  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18721  ;;
18722  *)
18723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18724for as_dir in $PATH
18725do
18726  IFS=$as_save_IFS
18727  test -z "$as_dir" && as_dir=.
18728    for ac_exec_ext in '' $ac_executable_extensions; do
18729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18730    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18732    break 2
18733  fi
18734done
18735  done
18736IFS=$as_save_IFS
18737
18738  ;;
18739esac
18740fi
18741TIME=$ac_cv_path_TIME
18742if test -n "$TIME"; then
18743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18744$as_echo "$TIME" >&6; }
18745else
18746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18747$as_echo "no" >&6; }
18748fi
18749
18750
18751  test -n "$TIME" && break
18752done
18753
18754    else
18755      # If it succeeded, then it was overridden by the user. We will use it
18756      # for the tool.
18757
18758      # First remove it from the list of overridden variables, so we can test
18759      # for unknown variables in the end.
18760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18761
18762      # Check if the provided tool contains a complete path.
18763      tool_specified="$TIME"
18764      tool_basename="${tool_specified##*/}"
18765      if test "x$tool_basename" = "x$tool_specified"; then
18766        # A command without a complete path is provided, search $PATH.
18767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18768$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18769        # Extract the first word of "$tool_basename", so it can be a program name with args.
18770set dummy $tool_basename; ac_word=$2
18771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18772$as_echo_n "checking for $ac_word... " >&6; }
18773if ${ac_cv_path_TIME+:} false; then :
18774  $as_echo_n "(cached) " >&6
18775else
18776  case $TIME in
18777  [\\/]* | ?:[\\/]*)
18778  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18779  ;;
18780  *)
18781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18782for as_dir in $PATH
18783do
18784  IFS=$as_save_IFS
18785  test -z "$as_dir" && as_dir=.
18786    for ac_exec_ext in '' $ac_executable_extensions; do
18787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18788    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18790    break 2
18791  fi
18792done
18793  done
18794IFS=$as_save_IFS
18795
18796  ;;
18797esac
18798fi
18799TIME=$ac_cv_path_TIME
18800if test -n "$TIME"; then
18801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18802$as_echo "$TIME" >&6; }
18803else
18804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18805$as_echo "no" >&6; }
18806fi
18807
18808
18809        if test "x$TIME" = x; then
18810          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18811        fi
18812      else
18813        # Otherwise we believe it is a complete path. Use it as it is.
18814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18815$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18817$as_echo_n "checking for TIME... " >&6; }
18818        if test ! -x "$tool_specified"; then
18819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18820$as_echo "not found" >&6; }
18821          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18822        fi
18823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18824$as_echo "$tool_specified" >&6; }
18825      fi
18826    fi
18827  fi
18828
18829
18830  # Check if it's GNU time
18831  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18832  if test "x$IS_GNU_TIME" != x; then
18833    IS_GNU_TIME=yes
18834  else
18835    IS_GNU_TIME=no
18836  fi
18837
18838
18839  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18840
18841
18842
18843  # Publish this variable in the help.
18844
18845
18846  if test "x$COMM" = x; then
18847    # The variable is not set by user, try to locate tool using the code snippet
18848    for ac_prog in comm
18849do
18850  # Extract the first word of "$ac_prog", so it can be a program name with args.
18851set dummy $ac_prog; ac_word=$2
18852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18853$as_echo_n "checking for $ac_word... " >&6; }
18854if ${ac_cv_path_COMM+:} false; then :
18855  $as_echo_n "(cached) " >&6
18856else
18857  case $COMM in
18858  [\\/]* | ?:[\\/]*)
18859  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18860  ;;
18861  *)
18862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18863for as_dir in $PATH
18864do
18865  IFS=$as_save_IFS
18866  test -z "$as_dir" && as_dir=.
18867    for ac_exec_ext in '' $ac_executable_extensions; do
18868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18869    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18871    break 2
18872  fi
18873done
18874  done
18875IFS=$as_save_IFS
18876
18877  ;;
18878esac
18879fi
18880COMM=$ac_cv_path_COMM
18881if test -n "$COMM"; then
18882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18883$as_echo "$COMM" >&6; }
18884else
18885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18886$as_echo "no" >&6; }
18887fi
18888
18889
18890  test -n "$COMM" && break
18891done
18892
18893  else
18894    # The variable is set, but is it from the command line or the environment?
18895
18896    # Try to remove the string !COMM! from our list.
18897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18899      # If it failed, the variable was not from the command line. Ignore it,
18900      # but warn the user (except for BASH, which is always set by the calling BASH).
18901      if test "xCOMM" != xBASH; then
18902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18903$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18904      fi
18905      # Try to locate tool using the code snippet
18906      for ac_prog in comm
18907do
18908  # Extract the first word of "$ac_prog", so it can be a program name with args.
18909set dummy $ac_prog; ac_word=$2
18910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18911$as_echo_n "checking for $ac_word... " >&6; }
18912if ${ac_cv_path_COMM+:} false; then :
18913  $as_echo_n "(cached) " >&6
18914else
18915  case $COMM in
18916  [\\/]* | ?:[\\/]*)
18917  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18918  ;;
18919  *)
18920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18921for as_dir in $PATH
18922do
18923  IFS=$as_save_IFS
18924  test -z "$as_dir" && as_dir=.
18925    for ac_exec_ext in '' $ac_executable_extensions; do
18926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18927    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18929    break 2
18930  fi
18931done
18932  done
18933IFS=$as_save_IFS
18934
18935  ;;
18936esac
18937fi
18938COMM=$ac_cv_path_COMM
18939if test -n "$COMM"; then
18940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18941$as_echo "$COMM" >&6; }
18942else
18943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18944$as_echo "no" >&6; }
18945fi
18946
18947
18948  test -n "$COMM" && break
18949done
18950
18951    else
18952      # If it succeeded, then it was overridden by the user. We will use it
18953      # for the tool.
18954
18955      # First remove it from the list of overridden variables, so we can test
18956      # for unknown variables in the end.
18957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18958
18959      # Check if the provided tool contains a complete path.
18960      tool_specified="$COMM"
18961      tool_basename="${tool_specified##*/}"
18962      if test "x$tool_basename" = "x$tool_specified"; then
18963        # A command without a complete path is provided, search $PATH.
18964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18965$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18966        # Extract the first word of "$tool_basename", so it can be a program name with args.
18967set dummy $tool_basename; ac_word=$2
18968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18969$as_echo_n "checking for $ac_word... " >&6; }
18970if ${ac_cv_path_COMM+:} false; then :
18971  $as_echo_n "(cached) " >&6
18972else
18973  case $COMM in
18974  [\\/]* | ?:[\\/]*)
18975  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18976  ;;
18977  *)
18978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18979for as_dir in $PATH
18980do
18981  IFS=$as_save_IFS
18982  test -z "$as_dir" && as_dir=.
18983    for ac_exec_ext in '' $ac_executable_extensions; do
18984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18985    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18987    break 2
18988  fi
18989done
18990  done
18991IFS=$as_save_IFS
18992
18993  ;;
18994esac
18995fi
18996COMM=$ac_cv_path_COMM
18997if test -n "$COMM"; then
18998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18999$as_echo "$COMM" >&6; }
19000else
19001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19002$as_echo "no" >&6; }
19003fi
19004
19005
19006        if test "x$COMM" = x; then
19007          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19008        fi
19009      else
19010        # Otherwise we believe it is a complete path. Use it as it is.
19011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19012$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19014$as_echo_n "checking for COMM... " >&6; }
19015        if test ! -x "$tool_specified"; then
19016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19017$as_echo "not found" >&6; }
19018          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19019        fi
19020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19021$as_echo "$tool_specified" >&6; }
19022      fi
19023    fi
19024  fi
19025
19026
19027
19028  if test "x$COMM" = x; then
19029    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19030  fi
19031
19032
19033  fi
19034
19035  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19036
19037
19038
19039  # Publish this variable in the help.
19040
19041
19042  if test "x$DSYMUTIL" = x; then
19043    # The variable is not set by user, try to locate tool using the code snippet
19044    for ac_prog in dsymutil
19045do
19046  # Extract the first word of "$ac_prog", so it can be a program name with args.
19047set dummy $ac_prog; ac_word=$2
19048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19049$as_echo_n "checking for $ac_word... " >&6; }
19050if ${ac_cv_path_DSYMUTIL+:} false; then :
19051  $as_echo_n "(cached) " >&6
19052else
19053  case $DSYMUTIL in
19054  [\\/]* | ?:[\\/]*)
19055  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19056  ;;
19057  *)
19058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19059for as_dir in $PATH
19060do
19061  IFS=$as_save_IFS
19062  test -z "$as_dir" && as_dir=.
19063    for ac_exec_ext in '' $ac_executable_extensions; do
19064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19065    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19067    break 2
19068  fi
19069done
19070  done
19071IFS=$as_save_IFS
19072
19073  ;;
19074esac
19075fi
19076DSYMUTIL=$ac_cv_path_DSYMUTIL
19077if test -n "$DSYMUTIL"; then
19078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19079$as_echo "$DSYMUTIL" >&6; }
19080else
19081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19082$as_echo "no" >&6; }
19083fi
19084
19085
19086  test -n "$DSYMUTIL" && break
19087done
19088
19089  else
19090    # The variable is set, but is it from the command line or the environment?
19091
19092    # Try to remove the string !DSYMUTIL! from our list.
19093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19095      # If it failed, the variable was not from the command line. Ignore it,
19096      # but warn the user (except for BASH, which is always set by the calling BASH).
19097      if test "xDSYMUTIL" != xBASH; then
19098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19099$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19100      fi
19101      # Try to locate tool using the code snippet
19102      for ac_prog in dsymutil
19103do
19104  # Extract the first word of "$ac_prog", so it can be a program name with args.
19105set dummy $ac_prog; ac_word=$2
19106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19107$as_echo_n "checking for $ac_word... " >&6; }
19108if ${ac_cv_path_DSYMUTIL+:} false; then :
19109  $as_echo_n "(cached) " >&6
19110else
19111  case $DSYMUTIL in
19112  [\\/]* | ?:[\\/]*)
19113  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19114  ;;
19115  *)
19116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19117for as_dir in $PATH
19118do
19119  IFS=$as_save_IFS
19120  test -z "$as_dir" && as_dir=.
19121    for ac_exec_ext in '' $ac_executable_extensions; do
19122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19123    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19125    break 2
19126  fi
19127done
19128  done
19129IFS=$as_save_IFS
19130
19131  ;;
19132esac
19133fi
19134DSYMUTIL=$ac_cv_path_DSYMUTIL
19135if test -n "$DSYMUTIL"; then
19136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19137$as_echo "$DSYMUTIL" >&6; }
19138else
19139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19140$as_echo "no" >&6; }
19141fi
19142
19143
19144  test -n "$DSYMUTIL" && break
19145done
19146
19147    else
19148      # If it succeeded, then it was overridden by the user. We will use it
19149      # for the tool.
19150
19151      # First remove it from the list of overridden variables, so we can test
19152      # for unknown variables in the end.
19153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19154
19155      # Check if the provided tool contains a complete path.
19156      tool_specified="$DSYMUTIL"
19157      tool_basename="${tool_specified##*/}"
19158      if test "x$tool_basename" = "x$tool_specified"; then
19159        # A command without a complete path is provided, search $PATH.
19160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19161$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19162        # Extract the first word of "$tool_basename", so it can be a program name with args.
19163set dummy $tool_basename; ac_word=$2
19164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19165$as_echo_n "checking for $ac_word... " >&6; }
19166if ${ac_cv_path_DSYMUTIL+:} false; then :
19167  $as_echo_n "(cached) " >&6
19168else
19169  case $DSYMUTIL in
19170  [\\/]* | ?:[\\/]*)
19171  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19172  ;;
19173  *)
19174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19175for as_dir in $PATH
19176do
19177  IFS=$as_save_IFS
19178  test -z "$as_dir" && as_dir=.
19179    for ac_exec_ext in '' $ac_executable_extensions; do
19180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19181    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19183    break 2
19184  fi
19185done
19186  done
19187IFS=$as_save_IFS
19188
19189  ;;
19190esac
19191fi
19192DSYMUTIL=$ac_cv_path_DSYMUTIL
19193if test -n "$DSYMUTIL"; then
19194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19195$as_echo "$DSYMUTIL" >&6; }
19196else
19197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19198$as_echo "no" >&6; }
19199fi
19200
19201
19202        if test "x$DSYMUTIL" = x; then
19203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19204        fi
19205      else
19206        # Otherwise we believe it is a complete path. Use it as it is.
19207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19208$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19210$as_echo_n "checking for DSYMUTIL... " >&6; }
19211        if test ! -x "$tool_specified"; then
19212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19213$as_echo "not found" >&6; }
19214          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19215        fi
19216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19217$as_echo "$tool_specified" >&6; }
19218      fi
19219    fi
19220  fi
19221
19222
19223
19224  if test "x$DSYMUTIL" = x; then
19225    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19226  fi
19227
19228
19229
19230
19231
19232  # Publish this variable in the help.
19233
19234
19235  if test "x$XATTR" = x; then
19236    # The variable is not set by user, try to locate tool using the code snippet
19237    for ac_prog in xattr
19238do
19239  # Extract the first word of "$ac_prog", so it can be a program name with args.
19240set dummy $ac_prog; ac_word=$2
19241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19242$as_echo_n "checking for $ac_word... " >&6; }
19243if ${ac_cv_path_XATTR+:} false; then :
19244  $as_echo_n "(cached) " >&6
19245else
19246  case $XATTR in
19247  [\\/]* | ?:[\\/]*)
19248  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19249  ;;
19250  *)
19251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19252for as_dir in $PATH
19253do
19254  IFS=$as_save_IFS
19255  test -z "$as_dir" && as_dir=.
19256    for ac_exec_ext in '' $ac_executable_extensions; do
19257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19258    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19260    break 2
19261  fi
19262done
19263  done
19264IFS=$as_save_IFS
19265
19266  ;;
19267esac
19268fi
19269XATTR=$ac_cv_path_XATTR
19270if test -n "$XATTR"; then
19271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19272$as_echo "$XATTR" >&6; }
19273else
19274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19275$as_echo "no" >&6; }
19276fi
19277
19278
19279  test -n "$XATTR" && break
19280done
19281
19282  else
19283    # The variable is set, but is it from the command line or the environment?
19284
19285    # Try to remove the string !XATTR! from our list.
19286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19288      # If it failed, the variable was not from the command line. Ignore it,
19289      # but warn the user (except for BASH, which is always set by the calling BASH).
19290      if test "xXATTR" != xBASH; then
19291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19292$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19293      fi
19294      # Try to locate tool using the code snippet
19295      for ac_prog in xattr
19296do
19297  # Extract the first word of "$ac_prog", so it can be a program name with args.
19298set dummy $ac_prog; ac_word=$2
19299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19300$as_echo_n "checking for $ac_word... " >&6; }
19301if ${ac_cv_path_XATTR+:} false; then :
19302  $as_echo_n "(cached) " >&6
19303else
19304  case $XATTR in
19305  [\\/]* | ?:[\\/]*)
19306  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19307  ;;
19308  *)
19309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19310for as_dir in $PATH
19311do
19312  IFS=$as_save_IFS
19313  test -z "$as_dir" && as_dir=.
19314    for ac_exec_ext in '' $ac_executable_extensions; do
19315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19316    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19318    break 2
19319  fi
19320done
19321  done
19322IFS=$as_save_IFS
19323
19324  ;;
19325esac
19326fi
19327XATTR=$ac_cv_path_XATTR
19328if test -n "$XATTR"; then
19329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19330$as_echo "$XATTR" >&6; }
19331else
19332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19333$as_echo "no" >&6; }
19334fi
19335
19336
19337  test -n "$XATTR" && break
19338done
19339
19340    else
19341      # If it succeeded, then it was overridden by the user. We will use it
19342      # for the tool.
19343
19344      # First remove it from the list of overridden variables, so we can test
19345      # for unknown variables in the end.
19346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19347
19348      # Check if the provided tool contains a complete path.
19349      tool_specified="$XATTR"
19350      tool_basename="${tool_specified##*/}"
19351      if test "x$tool_basename" = "x$tool_specified"; then
19352        # A command without a complete path is provided, search $PATH.
19353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19354$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19355        # Extract the first word of "$tool_basename", so it can be a program name with args.
19356set dummy $tool_basename; ac_word=$2
19357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19358$as_echo_n "checking for $ac_word... " >&6; }
19359if ${ac_cv_path_XATTR+:} false; then :
19360  $as_echo_n "(cached) " >&6
19361else
19362  case $XATTR in
19363  [\\/]* | ?:[\\/]*)
19364  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19365  ;;
19366  *)
19367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19368for as_dir in $PATH
19369do
19370  IFS=$as_save_IFS
19371  test -z "$as_dir" && as_dir=.
19372    for ac_exec_ext in '' $ac_executable_extensions; do
19373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19374    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19376    break 2
19377  fi
19378done
19379  done
19380IFS=$as_save_IFS
19381
19382  ;;
19383esac
19384fi
19385XATTR=$ac_cv_path_XATTR
19386if test -n "$XATTR"; then
19387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19388$as_echo "$XATTR" >&6; }
19389else
19390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19391$as_echo "no" >&6; }
19392fi
19393
19394
19395        if test "x$XATTR" = x; then
19396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19397        fi
19398      else
19399        # Otherwise we believe it is a complete path. Use it as it is.
19400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19401$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19403$as_echo_n "checking for XATTR... " >&6; }
19404        if test ! -x "$tool_specified"; then
19405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19406$as_echo "not found" >&6; }
19407          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19408        fi
19409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19410$as_echo "$tool_specified" >&6; }
19411      fi
19412    fi
19413  fi
19414
19415
19416
19417  if test "x$XATTR" = x; then
19418    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19419  fi
19420
19421
19422
19423
19424  # Publish this variable in the help.
19425
19426
19427  if test "x$CODESIGN" = x; then
19428    # The variable is not set by user, try to locate tool using the code snippet
19429    for ac_prog in codesign
19430do
19431  # Extract the first word of "$ac_prog", so it can be a program name with args.
19432set dummy $ac_prog; ac_word=$2
19433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19434$as_echo_n "checking for $ac_word... " >&6; }
19435if ${ac_cv_path_CODESIGN+:} false; then :
19436  $as_echo_n "(cached) " >&6
19437else
19438  case $CODESIGN in
19439  [\\/]* | ?:[\\/]*)
19440  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19441  ;;
19442  *)
19443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19444for as_dir in $PATH
19445do
19446  IFS=$as_save_IFS
19447  test -z "$as_dir" && as_dir=.
19448    for ac_exec_ext in '' $ac_executable_extensions; do
19449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19450    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19452    break 2
19453  fi
19454done
19455  done
19456IFS=$as_save_IFS
19457
19458  ;;
19459esac
19460fi
19461CODESIGN=$ac_cv_path_CODESIGN
19462if test -n "$CODESIGN"; then
19463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19464$as_echo "$CODESIGN" >&6; }
19465else
19466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19467$as_echo "no" >&6; }
19468fi
19469
19470
19471  test -n "$CODESIGN" && break
19472done
19473
19474  else
19475    # The variable is set, but is it from the command line or the environment?
19476
19477    # Try to remove the string !CODESIGN! from our list.
19478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19480      # If it failed, the variable was not from the command line. Ignore it,
19481      # but warn the user (except for BASH, which is always set by the calling BASH).
19482      if test "xCODESIGN" != xBASH; then
19483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19484$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19485      fi
19486      # Try to locate tool using the code snippet
19487      for ac_prog in codesign
19488do
19489  # Extract the first word of "$ac_prog", so it can be a program name with args.
19490set dummy $ac_prog; ac_word=$2
19491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19492$as_echo_n "checking for $ac_word... " >&6; }
19493if ${ac_cv_path_CODESIGN+:} false; then :
19494  $as_echo_n "(cached) " >&6
19495else
19496  case $CODESIGN in
19497  [\\/]* | ?:[\\/]*)
19498  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19499  ;;
19500  *)
19501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19502for as_dir in $PATH
19503do
19504  IFS=$as_save_IFS
19505  test -z "$as_dir" && as_dir=.
19506    for ac_exec_ext in '' $ac_executable_extensions; do
19507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19508    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19510    break 2
19511  fi
19512done
19513  done
19514IFS=$as_save_IFS
19515
19516  ;;
19517esac
19518fi
19519CODESIGN=$ac_cv_path_CODESIGN
19520if test -n "$CODESIGN"; then
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19522$as_echo "$CODESIGN" >&6; }
19523else
19524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19525$as_echo "no" >&6; }
19526fi
19527
19528
19529  test -n "$CODESIGN" && break
19530done
19531
19532    else
19533      # If it succeeded, then it was overridden by the user. We will use it
19534      # for the tool.
19535
19536      # First remove it from the list of overridden variables, so we can test
19537      # for unknown variables in the end.
19538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19539
19540      # Check if the provided tool contains a complete path.
19541      tool_specified="$CODESIGN"
19542      tool_basename="${tool_specified##*/}"
19543      if test "x$tool_basename" = "x$tool_specified"; then
19544        # A command without a complete path is provided, search $PATH.
19545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19546$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19547        # Extract the first word of "$tool_basename", so it can be a program name with args.
19548set dummy $tool_basename; ac_word=$2
19549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19550$as_echo_n "checking for $ac_word... " >&6; }
19551if ${ac_cv_path_CODESIGN+:} false; then :
19552  $as_echo_n "(cached) " >&6
19553else
19554  case $CODESIGN in
19555  [\\/]* | ?:[\\/]*)
19556  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19557  ;;
19558  *)
19559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19560for as_dir in $PATH
19561do
19562  IFS=$as_save_IFS
19563  test -z "$as_dir" && as_dir=.
19564    for ac_exec_ext in '' $ac_executable_extensions; do
19565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19566    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19568    break 2
19569  fi
19570done
19571  done
19572IFS=$as_save_IFS
19573
19574  ;;
19575esac
19576fi
19577CODESIGN=$ac_cv_path_CODESIGN
19578if test -n "$CODESIGN"; then
19579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19580$as_echo "$CODESIGN" >&6; }
19581else
19582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19583$as_echo "no" >&6; }
19584fi
19585
19586
19587        if test "x$CODESIGN" = x; then
19588          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19589        fi
19590      else
19591        # Otherwise we believe it is a complete path. Use it as it is.
19592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19593$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19595$as_echo_n "checking for CODESIGN... " >&6; }
19596        if test ! -x "$tool_specified"; then
19597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19598$as_echo "not found" >&6; }
19599          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19600        fi
19601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19602$as_echo "$tool_specified" >&6; }
19603      fi
19604    fi
19605  fi
19606
19607
19608    if test "x$CODESIGN" != "x"; then
19609      # Verify that the openjdk_codesign certificate is present
19610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19611$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19612      rm -f codesign-testfile
19613      touch codesign-testfile
19614      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19615      rm -f codesign-testfile
19616      if test "x$CODESIGN" = x; then
19617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19618$as_echo "no" >&6; }
19619      else
19620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19621$as_echo "yes" >&6; }
19622      fi
19623    fi
19624  fi
19625
19626
19627# Check if pkg-config is available.
19628
19629
19630if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19631	if test -n "$ac_tool_prefix"; then
19632  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19633set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19635$as_echo_n "checking for $ac_word... " >&6; }
19636if ${ac_cv_path_PKG_CONFIG+:} false; then :
19637  $as_echo_n "(cached) " >&6
19638else
19639  case $PKG_CONFIG in
19640  [\\/]* | ?:[\\/]*)
19641  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19642  ;;
19643  *)
19644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19645for as_dir in $PATH
19646do
19647  IFS=$as_save_IFS
19648  test -z "$as_dir" && as_dir=.
19649    for ac_exec_ext in '' $ac_executable_extensions; do
19650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19651    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19653    break 2
19654  fi
19655done
19656  done
19657IFS=$as_save_IFS
19658
19659  ;;
19660esac
19661fi
19662PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19663if test -n "$PKG_CONFIG"; then
19664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19665$as_echo "$PKG_CONFIG" >&6; }
19666else
19667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19668$as_echo "no" >&6; }
19669fi
19670
19671
19672fi
19673if test -z "$ac_cv_path_PKG_CONFIG"; then
19674  ac_pt_PKG_CONFIG=$PKG_CONFIG
19675  # Extract the first word of "pkg-config", so it can be a program name with args.
19676set dummy pkg-config; ac_word=$2
19677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19678$as_echo_n "checking for $ac_word... " >&6; }
19679if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19680  $as_echo_n "(cached) " >&6
19681else
19682  case $ac_pt_PKG_CONFIG in
19683  [\\/]* | ?:[\\/]*)
19684  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19685  ;;
19686  *)
19687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19688for as_dir in $PATH
19689do
19690  IFS=$as_save_IFS
19691  test -z "$as_dir" && as_dir=.
19692    for ac_exec_ext in '' $ac_executable_extensions; do
19693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19694    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19696    break 2
19697  fi
19698done
19699  done
19700IFS=$as_save_IFS
19701
19702  ;;
19703esac
19704fi
19705ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19706if test -n "$ac_pt_PKG_CONFIG"; then
19707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19708$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19709else
19710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19711$as_echo "no" >&6; }
19712fi
19713
19714  if test "x$ac_pt_PKG_CONFIG" = x; then
19715    PKG_CONFIG=""
19716  else
19717    case $cross_compiling:$ac_tool_warned in
19718yes:)
19719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19721ac_tool_warned=yes ;;
19722esac
19723    PKG_CONFIG=$ac_pt_PKG_CONFIG
19724  fi
19725else
19726  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19727fi
19728
19729fi
19730if test -n "$PKG_CONFIG"; then
19731	_pkg_min_version=0.9.0
19732	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19733$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19734	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19735		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19736$as_echo "yes" >&6; }
19737	else
19738		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19739$as_echo "no" >&6; }
19740		PKG_CONFIG=""
19741	fi
19742
19743fi
19744
19745# After basic tools have been setup, we can check build os specific details.
19746
19747  ###############################################################################
19748
19749  # Note that this is the build platform OS version!
19750
19751  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19752  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19753  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19754  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19755
19756
19757
19758
19759
19760# Setup builddeps, for automatic downloading of tools we need.
19761# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19762# boot-jdk setup, but we need to have basic tools setup first.
19763
19764
19765# Check whether --with-builddeps-conf was given.
19766if test "${with_builddeps_conf+set}" = set; then :
19767  withval=$with_builddeps_conf;
19768fi
19769
19770
19771
19772# Check whether --with-builddeps-server was given.
19773if test "${with_builddeps_server+set}" = set; then :
19774  withval=$with_builddeps_server;
19775fi
19776
19777
19778
19779# Check whether --with-builddeps-dir was given.
19780if test "${with_builddeps_dir+set}" = set; then :
19781  withval=$with_builddeps_dir;
19782else
19783  with_builddeps_dir=/localhome/builddeps
19784fi
19785
19786
19787
19788# Check whether --with-builddeps-group was given.
19789if test "${with_builddeps_group+set}" = set; then :
19790  withval=$with_builddeps_group;
19791fi
19792
19793
19794
19795
19796  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19797    if test "x$with_builddeps_conf" != x; then
19798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19799$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19800      builddepsfile=$with_builddeps_conf
19801      if test -s $builddepsfile; then
19802        . $builddepsfile
19803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19804$as_echo "loaded!" >&6; }
19805      else
19806        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19807      fi
19808    else
19809      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19810$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19811      builddepsfile=`mktemp`
19812      touch $builddepsfile
19813      # Put all found confs into a single file.
19814      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19815      # Source the file to acquire the variables
19816      if test -s $builddepsfile; then
19817        . $builddepsfile
19818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19819$as_echo "found at least one!" >&6; }
19820      else
19821        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19822      fi
19823    fi
19824    # Create build and target names that use _ instead of "-" and ".".
19825    # This is necessary to use them in variable names.
19826    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19827    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19828    # Extract rewrite information for build and target
19829    eval rewritten_build=\${REWRITE_${build_var}}
19830    if test "x$rewritten_build" = x; then
19831      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19832      echo Build stays the same $rewritten_build
19833    else
19834      echo Rewriting build for builddeps into $rewritten_build
19835    fi
19836    eval rewritten_target=\${REWRITE_${target_var}}
19837    if test "x$rewritten_target" = x; then
19838      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19839      echo Target stays the same $rewritten_target
19840    else
19841      echo Rewriting target for builddeps into $rewritten_target
19842    fi
19843    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19844    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19845  fi
19846  for ac_prog in 7z unzip
19847do
19848  # Extract the first word of "$ac_prog", so it can be a program name with args.
19849set dummy $ac_prog; ac_word=$2
19850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19851$as_echo_n "checking for $ac_word... " >&6; }
19852if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19853  $as_echo_n "(cached) " >&6
19854else
19855  if test -n "$BDEPS_UNZIP"; then
19856  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19857else
19858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19859for as_dir in $PATH
19860do
19861  IFS=$as_save_IFS
19862  test -z "$as_dir" && as_dir=.
19863    for ac_exec_ext in '' $ac_executable_extensions; do
19864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19865    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19867    break 2
19868  fi
19869done
19870  done
19871IFS=$as_save_IFS
19872
19873fi
19874fi
19875BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19876if test -n "$BDEPS_UNZIP"; then
19877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19878$as_echo "$BDEPS_UNZIP" >&6; }
19879else
19880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19881$as_echo "no" >&6; }
19882fi
19883
19884
19885  test -n "$BDEPS_UNZIP" && break
19886done
19887
19888  if test "x$BDEPS_UNZIP" = x7z; then
19889    BDEPS_UNZIP="7z x"
19890  fi
19891
19892  for ac_prog in wget lftp ftp
19893do
19894  # Extract the first word of "$ac_prog", so it can be a program name with args.
19895set dummy $ac_prog; ac_word=$2
19896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19897$as_echo_n "checking for $ac_word... " >&6; }
19898if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19899  $as_echo_n "(cached) " >&6
19900else
19901  if test -n "$BDEPS_FTP"; then
19902  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19903else
19904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19905for as_dir in $PATH
19906do
19907  IFS=$as_save_IFS
19908  test -z "$as_dir" && as_dir=.
19909    for ac_exec_ext in '' $ac_executable_extensions; do
19910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19911    ac_cv_prog_BDEPS_FTP="$ac_prog"
19912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19913    break 2
19914  fi
19915done
19916  done
19917IFS=$as_save_IFS
19918
19919fi
19920fi
19921BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19922if test -n "$BDEPS_FTP"; then
19923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19924$as_echo "$BDEPS_FTP" >&6; }
19925else
19926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19927$as_echo "no" >&6; }
19928fi
19929
19930
19931  test -n "$BDEPS_FTP" && break
19932done
19933
19934
19935
19936###############################################################################
19937#
19938# Determine OpenJDK variants, options and version numbers.
19939#
19940###############################################################################
19941
19942# We need build & target for this.
19943
19944
19945  ###############################################################################
19946  #
19947  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19948  # We always build headless support.
19949  #
19950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19951$as_echo_n "checking headful support... " >&6; }
19952  # Check whether --enable-headful was given.
19953if test "${enable_headful+set}" = set; then :
19954  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19955else
19956  SUPPORT_HEADFUL=yes
19957fi
19958
19959
19960  SUPPORT_HEADLESS=yes
19961  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19962
19963  if test "x$SUPPORT_HEADFUL" = xyes; then
19964    # We are building both headful and headless.
19965    headful_msg="include support for both headful and headless"
19966  fi
19967
19968  if test "x$SUPPORT_HEADFUL" = xno; then
19969    # Thus we are building headless only.
19970    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19971    headful_msg="headless only"
19972  fi
19973
19974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19975$as_echo "$headful_msg" >&6; }
19976
19977
19978
19979
19980
19981  # Control wether Hotspot runs Queens test after build.
19982  # Check whether --enable-hotspot-test-in-build was given.
19983if test "${enable_hotspot_test_in_build+set}" = set; then :
19984  enableval=$enable_hotspot_test_in_build;
19985else
19986  enable_hotspot_test_in_build=no
19987fi
19988
19989  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19990    TEST_IN_BUILD=true
19991  else
19992    TEST_IN_BUILD=false
19993  fi
19994
19995
19996  ###############################################################################
19997  #
19998  # Choose cacerts source file
19999  #
20000
20001# Check whether --with-cacerts-file was given.
20002if test "${with_cacerts_file+set}" = set; then :
20003  withval=$with_cacerts_file;
20004fi
20005
20006  if test "x$with_cacerts_file" != x; then
20007    CACERTS_FILE=$with_cacerts_file
20008  fi
20009
20010
20011  ###############################################################################
20012  #
20013  # Enable or disable unlimited crypto
20014  #
20015  # Check whether --enable-unlimited-crypto was given.
20016if test "${enable_unlimited_crypto+set}" = set; then :
20017  enableval=$enable_unlimited_crypto;
20018else
20019  enable_unlimited_crypto=no
20020fi
20021
20022  if test "x$enable_unlimited_crypto" = "xyes"; then
20023    UNLIMITED_CRYPTO=true
20024  else
20025    UNLIMITED_CRYPTO=false
20026  fi
20027
20028
20029  ###############################################################################
20030  #
20031  # Enable or disable the elliptic curve crypto implementation
20032  #
20033
20034
20035  ###############################################################################
20036  #
20037  # --enable-rmiconnector-iiop
20038  #
20039  # Check whether --enable-rmiconnector-iiop was given.
20040if test "${enable_rmiconnector_iiop+set}" = set; then :
20041  enableval=$enable_rmiconnector_iiop;
20042fi
20043
20044  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20045    RMICONNECTOR_IIOP=true
20046  else
20047    RMICONNECTOR_IIOP=false
20048  fi
20049
20050
20051  ###############################################################################
20052  #
20053  # Compress jars
20054  #
20055  COMPRESS_JARS=false
20056
20057
20058
20059
20060  # Source the version numbers
20061  . $AUTOCONF_DIR/version-numbers
20062
20063  # Get the settings from parameters
20064
20065# Check whether --with-milestone was given.
20066if test "${with_milestone+set}" = set; then :
20067  withval=$with_milestone;
20068fi
20069
20070  if test "x$with_milestone" = xyes; then
20071    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20072  elif test "x$with_milestone" != x; then
20073    MILESTONE="$with_milestone"
20074  fi
20075  if test "x$MILESTONE" = x; then
20076    MILESTONE=internal
20077  fi
20078
20079
20080# Check whether --with-update-version was given.
20081if test "${with_update_version+set}" = set; then :
20082  withval=$with_update_version;
20083fi
20084
20085  if test "x$with_update_version" = xyes; then
20086    as_fn_error $? "Update version must have a value" "$LINENO" 5
20087  elif test "x$with_update_version" != x; then
20088    JDK_UPDATE_VERSION="$with_update_version"
20089    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20090    # to a bug in expr (which reduces it to just X). To work around this, we
20091    # always add a 0 to one digit update versions.
20092    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20093      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20094    fi
20095  fi
20096
20097
20098# Check whether --with-user-release-suffix was given.
20099if test "${with_user_release_suffix+set}" = set; then :
20100  withval=$with_user_release_suffix;
20101fi
20102
20103  if test "x$with_user_release_suffix" = xyes; then
20104    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20105  elif test "x$with_user_release_suffix" != x; then
20106    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20107  fi
20108
20109
20110# Check whether --with-build-number was given.
20111if test "${with_build_number+set}" = set; then :
20112  withval=$with_build_number;
20113fi
20114
20115  if test "x$with_build_number" = xyes; then
20116    as_fn_error $? "Build number must have a value" "$LINENO" 5
20117  elif test "x$with_build_number" != x; then
20118    JDK_BUILD_NUMBER="$with_build_number"
20119  fi
20120  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20121  if test "x$JDK_BUILD_NUMBER" = x; then
20122    JDK_BUILD_NUMBER=b00
20123    if test "x$USER_RELEASE_SUFFIX" = x; then
20124      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20125      # Avoid [:alnum:] since it depends on the locale.
20126      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20127      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20128    fi
20129  fi
20130
20131  # Now set the JDK version, milestone, build number etc.
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148# Check whether --with-copyright-year was given.
20149if test "${with_copyright_year+set}" = set; then :
20150  withval=$with_copyright_year;
20151fi
20152
20153  if test "x$with_copyright_year" = xyes; then
20154    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20155  elif test "x$with_copyright_year" != x; then
20156    COPYRIGHT_YEAR="$with_copyright_year"
20157  else
20158    COPYRIGHT_YEAR=`date +'%Y'`
20159  fi
20160
20161
20162  if test "x$JDK_UPDATE_VERSION" != x; then
20163    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20164  else
20165    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20166  fi
20167
20168
20169  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20170
20171
20172
20173###############################################################################
20174#
20175# Setup BootJDK, used to bootstrap the build.
20176#
20177###############################################################################
20178
20179
20180  BOOT_JDK_FOUND=no
20181
20182# Check whether --with-boot-jdk was given.
20183if test "${with_boot_jdk+set}" = set; then :
20184  withval=$with_boot_jdk;
20185fi
20186
20187
20188  # We look for the Boot JDK through various means, going from more certain to
20189  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20190  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20191  # must check if this is indeed valid; otherwise we'll continue looking.
20192
20193  # Test: Is bootjdk explicitely set by command line arguments?
20194
20195  if test "x$BOOT_JDK_FOUND" = xno; then
20196    # Now execute the test
20197
20198  if test "x$with_boot_jdk" != x; then
20199    BOOT_JDK=$with_boot_jdk
20200    BOOT_JDK_FOUND=maybe
20201    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20202$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20203  fi
20204
20205
20206    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20207    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20208      # Do we have a bin/java?
20209      if test ! -x "$BOOT_JDK/bin/java"; then
20210        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20212        BOOT_JDK_FOUND=no
20213      else
20214        # Do we have a bin/javac?
20215        if test ! -x "$BOOT_JDK/bin/javac"; then
20216          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20218          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20219$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20220          BOOT_JDK_FOUND=no
20221        else
20222          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20223          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20224
20225          # Extra M4 quote needed to protect [] in grep expression.
20226          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20227          if test "x$FOUND_CORRECT_VERSION" = x; then
20228            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20230            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20231$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20232            BOOT_JDK_FOUND=no
20233          else
20234            # We're done! :-)
20235            BOOT_JDK_FOUND=yes
20236
20237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20238
20239  # Input might be given as Windows format, start by converting to
20240  # unix format.
20241  path="$BOOT_JDK"
20242  new_path=`$CYGPATH -u "$path"`
20243
20244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20247  # "foo.exe" is OK but "foo" is an error.
20248  #
20249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20250  # It is also a way to make sure we got the proper file name for the real test later on.
20251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20252  if test "x$test_shortpath" = x; then
20253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20255    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20256  fi
20257
20258  # Call helper function which possibly converts this using DOS-style short mode.
20259  # If so, the updated path is stored in $new_path.
20260
20261  input_path="$new_path"
20262  # Check if we need to convert this using DOS-style short mode. If the path
20263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20264  # take no chances and rewrite it.
20265  # Note: m4 eats our [], so we need to use [ and ] instead.
20266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20267  if test "x$has_forbidden_chars" != x; then
20268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20272      # Going to short mode and back again did indeed matter. Since short mode is
20273      # case insensitive, let's make it lowercase to improve readability.
20274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20275      # Now convert it back to Unix-stile (cygpath)
20276      input_path=`$CYGPATH -u "$shortmode_path"`
20277      new_path="$input_path"
20278    fi
20279  fi
20280
20281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20282  if test "x$test_cygdrive_prefix" = x; then
20283    # As a simple fix, exclude /usr/bin since it's not a real path.
20284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20286      # a path prefixed by /cygdrive for fixpath to work.
20287      new_path="$CYGWIN_ROOT_PATH$input_path"
20288    fi
20289  fi
20290
20291
20292  if test "x$path" != "x$new_path"; then
20293    BOOT_JDK="$new_path"
20294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20296  fi
20297
20298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20299
20300  path="$BOOT_JDK"
20301  has_colon=`$ECHO $path | $GREP ^.:`
20302  new_path="$path"
20303  if test "x$has_colon" = x; then
20304    # Not in mixed or Windows style, start by that.
20305    new_path=`cmd //c echo $path`
20306  fi
20307
20308
20309  input_path="$new_path"
20310  # Check if we need to convert this using DOS-style short mode. If the path
20311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20312  # take no chances and rewrite it.
20313  # Note: m4 eats our [], so we need to use [ and ] instead.
20314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20315  if test "x$has_forbidden_chars" != x; then
20316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20318  fi
20319
20320
20321  windows_path="$new_path"
20322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20323    unix_path=`$CYGPATH -u "$windows_path"`
20324    new_path="$unix_path"
20325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20327    new_path="$unix_path"
20328  fi
20329
20330  if test "x$path" != "x$new_path"; then
20331    BOOT_JDK="$new_path"
20332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20334  fi
20335
20336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20338
20339  else
20340    # We're on a unix platform. Hooray! :)
20341    path="$BOOT_JDK"
20342    has_space=`$ECHO "$path" | $GREP " "`
20343    if test "x$has_space" != x; then
20344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20347    fi
20348
20349    # Use eval to expand a potential ~
20350    eval path="$path"
20351    if test ! -f "$path" && test ! -d "$path"; then
20352      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20353    fi
20354
20355    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20356  fi
20357
20358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20359$as_echo_n "checking for Boot JDK... " >&6; }
20360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20361$as_echo "$BOOT_JDK" >&6; }
20362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20363$as_echo_n "checking Boot JDK version... " >&6; }
20364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20366$as_echo "$BOOT_JDK_VERSION" >&6; }
20367          fi # end check jdk version
20368        fi # end check javac
20369      fi # end check java
20370    fi # end check boot jdk found
20371  fi
20372
20373  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20374    # Having specified an argument which is incorrect will produce an instant failure;
20375    # we should not go on looking
20376    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20377  fi
20378
20379  # Test: Is bootjdk available from builddeps?
20380
20381  if test "x$BOOT_JDK_FOUND" = xno; then
20382    # Now execute the test
20383
20384
20385
20386  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20387    # Source the builddeps file again, to make sure it uses the latest variables!
20388    . $builddepsfile
20389    # Look for a target and build machine specific resource!
20390    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20391    if test "x$resource" = x; then
20392      # Ok, lets instead look for a target specific resource
20393      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20394    fi
20395    if test "x$resource" = x; then
20396      # Ok, lets instead look for a build specific resource
20397      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20398    fi
20399    if test "x$resource" = x; then
20400      # Ok, lets instead look for a generic resource
20401      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20402      resource=${builddep_bootjdk}
20403    fi
20404    if test "x$resource" != x; then
20405      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20406$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20407      # If the resource in the builddeps.conf file is an existing directory,
20408      # for example /java/linux/cups
20409      if test -d ${resource}; then
20410        depdir=${resource}
20411      else
20412
20413  # bootjdk is for example mymodule
20414  # $resource is for example libs/general/libmymod_1_2_3.zip
20415  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20416  # $with_builddeps_dir is for example /localhome/builddeps
20417  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20418  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20419  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20420  filename=`basename $resource`
20421  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20422  filebase=${filename%%.*}
20423  extension=${filename#*.}
20424  installdir=$with_builddeps_dir/$filebase
20425  if test ! -f $installdir/$filename.unpacked; then
20426    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20427$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20428    if test ! -d $installdir; then
20429      mkdir -p $installdir
20430    fi
20431    if test ! -d $installdir; then
20432      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20433    fi
20434    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20435    touch $tmpfile
20436    if test ! -f $tmpfile; then
20437      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20438    fi
20439
20440  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20441  # $tmpfile is the local file name for the downloaded file.
20442  VALID_TOOL=no
20443  if test "x$BDEPS_FTP" = xwget; then
20444    VALID_TOOL=yes
20445    wget -O $tmpfile $with_builddeps_server/$resource
20446  fi
20447  if test "x$BDEPS_FTP" = xlftp; then
20448    VALID_TOOL=yes
20449    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20450  fi
20451  if test "x$BDEPS_FTP" = xftp; then
20452    VALID_TOOL=yes
20453    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20454    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20455    FTPUSERPWD=${FTPSERVER%%@*}
20456    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20457      FTPUSER=${userpwd%%:*}
20458      FTPPWD=${userpwd#*@}
20459      FTPSERVER=${FTPSERVER#*@}
20460    else
20461      FTPUSER=ftp
20462      FTPPWD=ftp
20463    fi
20464    # the "pass" command does not work on some
20465    # ftp clients (read ftp.exe) but if it works,
20466    # passive mode is better!
20467    ( \
20468        echo "user $FTPUSER $FTPPWD"        ; \
20469        echo "pass"                         ; \
20470        echo "bin"                          ; \
20471        echo "get $FTPPATH $tmpfile"              ; \
20472    ) | ftp -in $FTPSERVER
20473  fi
20474  if test "x$VALID_TOOL" != xyes; then
20475    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20476  fi
20477
20478    mv $tmpfile $installdir/$filename
20479    if test ! -s $installdir/$filename; then
20480      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20481    fi
20482    case "$extension" in
20483      zip)  echo "Unzipping $installdir/$filename..."
20484        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20485        ;;
20486      tar.gz) echo "Untaring $installdir/$filename..."
20487        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20488        ;;
20489      tgz) echo "Untaring $installdir/$filename..."
20490        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20491        ;;
20492      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20493        ;;
20494    esac
20495  fi
20496  if test -f $installdir/$filename.unpacked; then
20497    depdir=$installdir
20498  fi
20499
20500      fi
20501      # Source the builddeps file again, because in the previous command, the depdir
20502      # was updated to point at the current build dependency install directory.
20503      . $builddepsfile
20504      # Now extract variables from the builddeps.conf files.
20505      theroot=${builddep_bootjdk_ROOT}
20506      thecflags=${builddep_bootjdk_CFLAGS}
20507      thelibs=${builddep_bootjdk_LIBS}
20508      if test "x$depdir" = x; then
20509        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20510      fi
20511      BOOT_JDK=$depdir
20512      if test "x$theroot" != x; then
20513        BOOT_JDK="$theroot"
20514      fi
20515      if test "x$thecflags" != x; then
20516        BOOT_JDK_CFLAGS="$thecflags"
20517      fi
20518      if test "x$thelibs" != x; then
20519        BOOT_JDK_LIBS="$thelibs"
20520      fi
20521      BOOT_JDK_FOUND=maybe
20522      else BOOT_JDK_FOUND=no
20523
20524    fi
20525    else BOOT_JDK_FOUND=no
20526
20527  fi
20528
20529
20530
20531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20533      # Do we have a bin/java?
20534      if test ! -x "$BOOT_JDK/bin/java"; then
20535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20537        BOOT_JDK_FOUND=no
20538      else
20539        # Do we have a bin/javac?
20540        if test ! -x "$BOOT_JDK/bin/javac"; then
20541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20545          BOOT_JDK_FOUND=no
20546        else
20547          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20548          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20549
20550          # Extra M4 quote needed to protect [] in grep expression.
20551          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20552          if test "x$FOUND_CORRECT_VERSION" = x; then
20553            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20555            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20556$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20557            BOOT_JDK_FOUND=no
20558          else
20559            # We're done! :-)
20560            BOOT_JDK_FOUND=yes
20561
20562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20563
20564  # Input might be given as Windows format, start by converting to
20565  # unix format.
20566  path="$BOOT_JDK"
20567  new_path=`$CYGPATH -u "$path"`
20568
20569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20572  # "foo.exe" is OK but "foo" is an error.
20573  #
20574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20575  # It is also a way to make sure we got the proper file name for the real test later on.
20576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20577  if test "x$test_shortpath" = x; then
20578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20580    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20581  fi
20582
20583  # Call helper function which possibly converts this using DOS-style short mode.
20584  # If so, the updated path is stored in $new_path.
20585
20586  input_path="$new_path"
20587  # Check if we need to convert this using DOS-style short mode. If the path
20588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20589  # take no chances and rewrite it.
20590  # Note: m4 eats our [], so we need to use [ and ] instead.
20591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20592  if test "x$has_forbidden_chars" != x; then
20593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20597      # Going to short mode and back again did indeed matter. Since short mode is
20598      # case insensitive, let's make it lowercase to improve readability.
20599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20600      # Now convert it back to Unix-stile (cygpath)
20601      input_path=`$CYGPATH -u "$shortmode_path"`
20602      new_path="$input_path"
20603    fi
20604  fi
20605
20606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20607  if test "x$test_cygdrive_prefix" = x; then
20608    # As a simple fix, exclude /usr/bin since it's not a real path.
20609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20611      # a path prefixed by /cygdrive for fixpath to work.
20612      new_path="$CYGWIN_ROOT_PATH$input_path"
20613    fi
20614  fi
20615
20616
20617  if test "x$path" != "x$new_path"; then
20618    BOOT_JDK="$new_path"
20619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20621  fi
20622
20623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20624
20625  path="$BOOT_JDK"
20626  has_colon=`$ECHO $path | $GREP ^.:`
20627  new_path="$path"
20628  if test "x$has_colon" = x; then
20629    # Not in mixed or Windows style, start by that.
20630    new_path=`cmd //c echo $path`
20631  fi
20632
20633
20634  input_path="$new_path"
20635  # Check if we need to convert this using DOS-style short mode. If the path
20636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20637  # take no chances and rewrite it.
20638  # Note: m4 eats our [], so we need to use [ and ] instead.
20639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20640  if test "x$has_forbidden_chars" != x; then
20641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20643  fi
20644
20645
20646  windows_path="$new_path"
20647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20648    unix_path=`$CYGPATH -u "$windows_path"`
20649    new_path="$unix_path"
20650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20652    new_path="$unix_path"
20653  fi
20654
20655  if test "x$path" != "x$new_path"; then
20656    BOOT_JDK="$new_path"
20657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20659  fi
20660
20661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20663
20664  else
20665    # We're on a unix platform. Hooray! :)
20666    path="$BOOT_JDK"
20667    has_space=`$ECHO "$path" | $GREP " "`
20668    if test "x$has_space" != x; then
20669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20671      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20672    fi
20673
20674    # Use eval to expand a potential ~
20675    eval path="$path"
20676    if test ! -f "$path" && test ! -d "$path"; then
20677      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20678    fi
20679
20680    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20681  fi
20682
20683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20684$as_echo_n "checking for Boot JDK... " >&6; }
20685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20686$as_echo "$BOOT_JDK" >&6; }
20687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20688$as_echo_n "checking Boot JDK version... " >&6; }
20689            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20691$as_echo "$BOOT_JDK_VERSION" >&6; }
20692          fi # end check jdk version
20693        fi # end check javac
20694      fi # end check java
20695    fi # end check boot jdk found
20696  fi
20697
20698
20699  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20700
20701  if test "x$BOOT_JDK_FOUND" = xno; then
20702    # Now execute the test
20703
20704  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20705    # First check at user selected default
20706
20707  if test "x$BOOT_JDK_FOUND" = xno; then
20708    # Now execute the test
20709
20710  if test -x /usr/libexec/java_home; then
20711    BOOT_JDK=`/usr/libexec/java_home `
20712    BOOT_JDK_FOUND=maybe
20713    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20714$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20715  fi
20716
20717
20718    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20719    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20720      # Do we have a bin/java?
20721      if test ! -x "$BOOT_JDK/bin/java"; then
20722        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20724        BOOT_JDK_FOUND=no
20725      else
20726        # Do we have a bin/javac?
20727        if test ! -x "$BOOT_JDK/bin/javac"; then
20728          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20730          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20731$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20732          BOOT_JDK_FOUND=no
20733        else
20734          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20735          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20736
20737          # Extra M4 quote needed to protect [] in grep expression.
20738          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20739          if test "x$FOUND_CORRECT_VERSION" = x; then
20740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20742            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20743$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20744            BOOT_JDK_FOUND=no
20745          else
20746            # We're done! :-)
20747            BOOT_JDK_FOUND=yes
20748
20749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20750
20751  # Input might be given as Windows format, start by converting to
20752  # unix format.
20753  path="$BOOT_JDK"
20754  new_path=`$CYGPATH -u "$path"`
20755
20756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20759  # "foo.exe" is OK but "foo" is an error.
20760  #
20761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20762  # It is also a way to make sure we got the proper file name for the real test later on.
20763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20764  if test "x$test_shortpath" = x; then
20765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20767    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20768  fi
20769
20770  # Call helper function which possibly converts this using DOS-style short mode.
20771  # If so, the updated path is stored in $new_path.
20772
20773  input_path="$new_path"
20774  # Check if we need to convert this using DOS-style short mode. If the path
20775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20776  # take no chances and rewrite it.
20777  # Note: m4 eats our [], so we need to use [ and ] instead.
20778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20779  if test "x$has_forbidden_chars" != x; then
20780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20784      # Going to short mode and back again did indeed matter. Since short mode is
20785      # case insensitive, let's make it lowercase to improve readability.
20786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20787      # Now convert it back to Unix-stile (cygpath)
20788      input_path=`$CYGPATH -u "$shortmode_path"`
20789      new_path="$input_path"
20790    fi
20791  fi
20792
20793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20794  if test "x$test_cygdrive_prefix" = x; then
20795    # As a simple fix, exclude /usr/bin since it's not a real path.
20796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20798      # a path prefixed by /cygdrive for fixpath to work.
20799      new_path="$CYGWIN_ROOT_PATH$input_path"
20800    fi
20801  fi
20802
20803
20804  if test "x$path" != "x$new_path"; then
20805    BOOT_JDK="$new_path"
20806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20808  fi
20809
20810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20811
20812  path="$BOOT_JDK"
20813  has_colon=`$ECHO $path | $GREP ^.:`
20814  new_path="$path"
20815  if test "x$has_colon" = x; then
20816    # Not in mixed or Windows style, start by that.
20817    new_path=`cmd //c echo $path`
20818  fi
20819
20820
20821  input_path="$new_path"
20822  # Check if we need to convert this using DOS-style short mode. If the path
20823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20824  # take no chances and rewrite it.
20825  # Note: m4 eats our [], so we need to use [ and ] instead.
20826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20827  if test "x$has_forbidden_chars" != x; then
20828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20830  fi
20831
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842  if test "x$path" != "x$new_path"; then
20843    BOOT_JDK="$new_path"
20844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20845$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20846  fi
20847
20848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20850
20851  else
20852    # We're on a unix platform. Hooray! :)
20853    path="$BOOT_JDK"
20854    has_space=`$ECHO "$path" | $GREP " "`
20855    if test "x$has_space" != x; then
20856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20859    fi
20860
20861    # Use eval to expand a potential ~
20862    eval path="$path"
20863    if test ! -f "$path" && test ! -d "$path"; then
20864      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20865    fi
20866
20867    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20868  fi
20869
20870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20871$as_echo_n "checking for Boot JDK... " >&6; }
20872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20873$as_echo "$BOOT_JDK" >&6; }
20874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20875$as_echo_n "checking Boot JDK version... " >&6; }
20876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20878$as_echo "$BOOT_JDK_VERSION" >&6; }
20879          fi # end check jdk version
20880        fi # end check javac
20881      fi # end check java
20882    fi # end check boot jdk found
20883  fi
20884
20885    # If that did not work out (e.g. too old), try explicit versions instead
20886
20887  if test "x$BOOT_JDK_FOUND" = xno; then
20888    # Now execute the test
20889
20890  if test -x /usr/libexec/java_home; then
20891    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20892    BOOT_JDK_FOUND=maybe
20893    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20894$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20895  fi
20896
20897
20898    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20899    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20900      # Do we have a bin/java?
20901      if test ! -x "$BOOT_JDK/bin/java"; then
20902        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20904        BOOT_JDK_FOUND=no
20905      else
20906        # Do we have a bin/javac?
20907        if test ! -x "$BOOT_JDK/bin/javac"; then
20908          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20910          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20911$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20912          BOOT_JDK_FOUND=no
20913        else
20914          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20915          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20916
20917          # Extra M4 quote needed to protect [] in grep expression.
20918          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20919          if test "x$FOUND_CORRECT_VERSION" = x; then
20920            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20922            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20923$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20924            BOOT_JDK_FOUND=no
20925          else
20926            # We're done! :-)
20927            BOOT_JDK_FOUND=yes
20928
20929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930
20931  # Input might be given as Windows format, start by converting to
20932  # unix format.
20933  path="$BOOT_JDK"
20934  new_path=`$CYGPATH -u "$path"`
20935
20936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20939  # "foo.exe" is OK but "foo" is an error.
20940  #
20941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20942  # It is also a way to make sure we got the proper file name for the real test later on.
20943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20944  if test "x$test_shortpath" = x; then
20945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20947    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20948  fi
20949
20950  # Call helper function which possibly converts this using DOS-style short mode.
20951  # If so, the updated path is stored in $new_path.
20952
20953  input_path="$new_path"
20954  # Check if we need to convert this using DOS-style short mode. If the path
20955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20956  # take no chances and rewrite it.
20957  # Note: m4 eats our [], so we need to use [ and ] instead.
20958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20959  if test "x$has_forbidden_chars" != x; then
20960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20964      # Going to short mode and back again did indeed matter. Since short mode is
20965      # case insensitive, let's make it lowercase to improve readability.
20966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20967      # Now convert it back to Unix-stile (cygpath)
20968      input_path=`$CYGPATH -u "$shortmode_path"`
20969      new_path="$input_path"
20970    fi
20971  fi
20972
20973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20974  if test "x$test_cygdrive_prefix" = x; then
20975    # As a simple fix, exclude /usr/bin since it's not a real path.
20976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20978      # a path prefixed by /cygdrive for fixpath to work.
20979      new_path="$CYGWIN_ROOT_PATH$input_path"
20980    fi
20981  fi
20982
20983
20984  if test "x$path" != "x$new_path"; then
20985    BOOT_JDK="$new_path"
20986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20988  fi
20989
20990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20991
20992  path="$BOOT_JDK"
20993  has_colon=`$ECHO $path | $GREP ^.:`
20994  new_path="$path"
20995  if test "x$has_colon" = x; then
20996    # Not in mixed or Windows style, start by that.
20997    new_path=`cmd //c echo $path`
20998  fi
20999
21000
21001  input_path="$new_path"
21002  # Check if we need to convert this using DOS-style short mode. If the path
21003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21004  # take no chances and rewrite it.
21005  # Note: m4 eats our [], so we need to use [ and ] instead.
21006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21007  if test "x$has_forbidden_chars" != x; then
21008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21010  fi
21011
21012
21013  windows_path="$new_path"
21014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21015    unix_path=`$CYGPATH -u "$windows_path"`
21016    new_path="$unix_path"
21017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21019    new_path="$unix_path"
21020  fi
21021
21022  if test "x$path" != "x$new_path"; then
21023    BOOT_JDK="$new_path"
21024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21026  fi
21027
21028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21030
21031  else
21032    # We're on a unix platform. Hooray! :)
21033    path="$BOOT_JDK"
21034    has_space=`$ECHO "$path" | $GREP " "`
21035    if test "x$has_space" != x; then
21036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21038      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21039    fi
21040
21041    # Use eval to expand a potential ~
21042    eval path="$path"
21043    if test ! -f "$path" && test ! -d "$path"; then
21044      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21045    fi
21046
21047    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21048  fi
21049
21050            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21051$as_echo_n "checking for Boot JDK... " >&6; }
21052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21053$as_echo "$BOOT_JDK" >&6; }
21054            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21055$as_echo_n "checking Boot JDK version... " >&6; }
21056            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21058$as_echo "$BOOT_JDK_VERSION" >&6; }
21059          fi # end check jdk version
21060        fi # end check javac
21061      fi # end check java
21062    fi # end check boot jdk found
21063  fi
21064
21065
21066  if test "x$BOOT_JDK_FOUND" = xno; then
21067    # Now execute the test
21068
21069  if test -x /usr/libexec/java_home; then
21070    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21071    BOOT_JDK_FOUND=maybe
21072    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21073$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21074  fi
21075
21076
21077    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21078    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21079      # Do we have a bin/java?
21080      if test ! -x "$BOOT_JDK/bin/java"; then
21081        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21083        BOOT_JDK_FOUND=no
21084      else
21085        # Do we have a bin/javac?
21086        if test ! -x "$BOOT_JDK/bin/javac"; then
21087          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21089          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21090$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21091          BOOT_JDK_FOUND=no
21092        else
21093          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21094          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21095
21096          # Extra M4 quote needed to protect [] in grep expression.
21097          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21098          if test "x$FOUND_CORRECT_VERSION" = x; then
21099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21101            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21102$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21103            BOOT_JDK_FOUND=no
21104          else
21105            # We're done! :-)
21106            BOOT_JDK_FOUND=yes
21107
21108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21109
21110  # Input might be given as Windows format, start by converting to
21111  # unix format.
21112  path="$BOOT_JDK"
21113  new_path=`$CYGPATH -u "$path"`
21114
21115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21118  # "foo.exe" is OK but "foo" is an error.
21119  #
21120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21121  # It is also a way to make sure we got the proper file name for the real test later on.
21122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21123  if test "x$test_shortpath" = x; then
21124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21126    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21127  fi
21128
21129  # Call helper function which possibly converts this using DOS-style short mode.
21130  # If so, the updated path is stored in $new_path.
21131
21132  input_path="$new_path"
21133  # Check if we need to convert this using DOS-style short mode. If the path
21134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21135  # take no chances and rewrite it.
21136  # Note: m4 eats our [], so we need to use [ and ] instead.
21137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21138  if test "x$has_forbidden_chars" != x; then
21139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21143      # Going to short mode and back again did indeed matter. Since short mode is
21144      # case insensitive, let's make it lowercase to improve readability.
21145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21146      # Now convert it back to Unix-stile (cygpath)
21147      input_path=`$CYGPATH -u "$shortmode_path"`
21148      new_path="$input_path"
21149    fi
21150  fi
21151
21152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21153  if test "x$test_cygdrive_prefix" = x; then
21154    # As a simple fix, exclude /usr/bin since it's not a real path.
21155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21157      # a path prefixed by /cygdrive for fixpath to work.
21158      new_path="$CYGWIN_ROOT_PATH$input_path"
21159    fi
21160  fi
21161
21162
21163  if test "x$path" != "x$new_path"; then
21164    BOOT_JDK="$new_path"
21165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21167  fi
21168
21169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21170
21171  path="$BOOT_JDK"
21172  has_colon=`$ECHO $path | $GREP ^.:`
21173  new_path="$path"
21174  if test "x$has_colon" = x; then
21175    # Not in mixed or Windows style, start by that.
21176    new_path=`cmd //c echo $path`
21177  fi
21178
21179
21180  input_path="$new_path"
21181  # Check if we need to convert this using DOS-style short mode. If the path
21182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21183  # take no chances and rewrite it.
21184  # Note: m4 eats our [], so we need to use [ and ] instead.
21185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21186  if test "x$has_forbidden_chars" != x; then
21187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21189  fi
21190
21191
21192  windows_path="$new_path"
21193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21194    unix_path=`$CYGPATH -u "$windows_path"`
21195    new_path="$unix_path"
21196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21198    new_path="$unix_path"
21199  fi
21200
21201  if test "x$path" != "x$new_path"; then
21202    BOOT_JDK="$new_path"
21203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21204$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21205  fi
21206
21207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21209
21210  else
21211    # We're on a unix platform. Hooray! :)
21212    path="$BOOT_JDK"
21213    has_space=`$ECHO "$path" | $GREP " "`
21214    if test "x$has_space" != x; then
21215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21217      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21218    fi
21219
21220    # Use eval to expand a potential ~
21221    eval path="$path"
21222    if test ! -f "$path" && test ! -d "$path"; then
21223      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21224    fi
21225
21226    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21227  fi
21228
21229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21230$as_echo_n "checking for Boot JDK... " >&6; }
21231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21232$as_echo "$BOOT_JDK" >&6; }
21233            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21234$as_echo_n "checking Boot JDK version... " >&6; }
21235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21237$as_echo "$BOOT_JDK_VERSION" >&6; }
21238          fi # end check jdk version
21239        fi # end check javac
21240      fi # end check java
21241    fi # end check boot jdk found
21242  fi
21243
21244
21245  if test "x$BOOT_JDK_FOUND" = xno; then
21246    # Now execute the test
21247
21248  if test -x /usr/libexec/java_home; then
21249    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21250    BOOT_JDK_FOUND=maybe
21251    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21252$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21253  fi
21254
21255
21256    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21257    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21258      # Do we have a bin/java?
21259      if test ! -x "$BOOT_JDK/bin/java"; then
21260        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21262        BOOT_JDK_FOUND=no
21263      else
21264        # Do we have a bin/javac?
21265        if test ! -x "$BOOT_JDK/bin/javac"; then
21266          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21268          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21269$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21270          BOOT_JDK_FOUND=no
21271        else
21272          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21273          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21274
21275          # Extra M4 quote needed to protect [] in grep expression.
21276          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21277          if test "x$FOUND_CORRECT_VERSION" = x; then
21278            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21280            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21281$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21282            BOOT_JDK_FOUND=no
21283          else
21284            # We're done! :-)
21285            BOOT_JDK_FOUND=yes
21286
21287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21288
21289  # Input might be given as Windows format, start by converting to
21290  # unix format.
21291  path="$BOOT_JDK"
21292  new_path=`$CYGPATH -u "$path"`
21293
21294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21297  # "foo.exe" is OK but "foo" is an error.
21298  #
21299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21300  # It is also a way to make sure we got the proper file name for the real test later on.
21301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21302  if test "x$test_shortpath" = x; then
21303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21306  fi
21307
21308  # Call helper function which possibly converts this using DOS-style short mode.
21309  # If so, the updated path is stored in $new_path.
21310
21311  input_path="$new_path"
21312  # Check if we need to convert this using DOS-style short mode. If the path
21313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21314  # take no chances and rewrite it.
21315  # Note: m4 eats our [], so we need to use [ and ] instead.
21316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21317  if test "x$has_forbidden_chars" != x; then
21318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21322      # Going to short mode and back again did indeed matter. Since short mode is
21323      # case insensitive, let's make it lowercase to improve readability.
21324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21325      # Now convert it back to Unix-stile (cygpath)
21326      input_path=`$CYGPATH -u "$shortmode_path"`
21327      new_path="$input_path"
21328    fi
21329  fi
21330
21331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21332  if test "x$test_cygdrive_prefix" = x; then
21333    # As a simple fix, exclude /usr/bin since it's not a real path.
21334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21336      # a path prefixed by /cygdrive for fixpath to work.
21337      new_path="$CYGWIN_ROOT_PATH$input_path"
21338    fi
21339  fi
21340
21341
21342  if test "x$path" != "x$new_path"; then
21343    BOOT_JDK="$new_path"
21344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21346  fi
21347
21348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21349
21350  path="$BOOT_JDK"
21351  has_colon=`$ECHO $path | $GREP ^.:`
21352  new_path="$path"
21353  if test "x$has_colon" = x; then
21354    # Not in mixed or Windows style, start by that.
21355    new_path=`cmd //c echo $path`
21356  fi
21357
21358
21359  input_path="$new_path"
21360  # Check if we need to convert this using DOS-style short mode. If the path
21361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21362  # take no chances and rewrite it.
21363  # Note: m4 eats our [], so we need to use [ and ] instead.
21364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21365  if test "x$has_forbidden_chars" != x; then
21366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21368  fi
21369
21370
21371  windows_path="$new_path"
21372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21373    unix_path=`$CYGPATH -u "$windows_path"`
21374    new_path="$unix_path"
21375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21377    new_path="$unix_path"
21378  fi
21379
21380  if test "x$path" != "x$new_path"; then
21381    BOOT_JDK="$new_path"
21382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21384  fi
21385
21386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21388
21389  else
21390    # We're on a unix platform. Hooray! :)
21391    path="$BOOT_JDK"
21392    has_space=`$ECHO "$path" | $GREP " "`
21393    if test "x$has_space" != x; then
21394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21396      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21397    fi
21398
21399    # Use eval to expand a potential ~
21400    eval path="$path"
21401    if test ! -f "$path" && test ! -d "$path"; then
21402      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21403    fi
21404
21405    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21406  fi
21407
21408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21409$as_echo_n "checking for Boot JDK... " >&6; }
21410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21411$as_echo "$BOOT_JDK" >&6; }
21412            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21413$as_echo_n "checking Boot JDK version... " >&6; }
21414            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21416$as_echo "$BOOT_JDK_VERSION" >&6; }
21417          fi # end check jdk version
21418        fi # end check javac
21419      fi # end check java
21420    fi # end check boot jdk found
21421  fi
21422
21423  fi
21424
21425
21426    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21427    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21428      # Do we have a bin/java?
21429      if test ! -x "$BOOT_JDK/bin/java"; then
21430        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21432        BOOT_JDK_FOUND=no
21433      else
21434        # Do we have a bin/javac?
21435        if test ! -x "$BOOT_JDK/bin/javac"; then
21436          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21438          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21439$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21440          BOOT_JDK_FOUND=no
21441        else
21442          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21443          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21444
21445          # Extra M4 quote needed to protect [] in grep expression.
21446          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21447          if test "x$FOUND_CORRECT_VERSION" = x; then
21448            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21450            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21451$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21452            BOOT_JDK_FOUND=no
21453          else
21454            # We're done! :-)
21455            BOOT_JDK_FOUND=yes
21456
21457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21458
21459  # Input might be given as Windows format, start by converting to
21460  # unix format.
21461  path="$BOOT_JDK"
21462  new_path=`$CYGPATH -u "$path"`
21463
21464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21467  # "foo.exe" is OK but "foo" is an error.
21468  #
21469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21470  # It is also a way to make sure we got the proper file name for the real test later on.
21471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21472  if test "x$test_shortpath" = x; then
21473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21476  fi
21477
21478  # Call helper function which possibly converts this using DOS-style short mode.
21479  # If so, the updated path is stored in $new_path.
21480
21481  input_path="$new_path"
21482  # Check if we need to convert this using DOS-style short mode. If the path
21483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21484  # take no chances and rewrite it.
21485  # Note: m4 eats our [], so we need to use [ and ] instead.
21486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21487  if test "x$has_forbidden_chars" != x; then
21488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21492      # Going to short mode and back again did indeed matter. Since short mode is
21493      # case insensitive, let's make it lowercase to improve readability.
21494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21495      # Now convert it back to Unix-stile (cygpath)
21496      input_path=`$CYGPATH -u "$shortmode_path"`
21497      new_path="$input_path"
21498    fi
21499  fi
21500
21501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21502  if test "x$test_cygdrive_prefix" = x; then
21503    # As a simple fix, exclude /usr/bin since it's not a real path.
21504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21506      # a path prefixed by /cygdrive for fixpath to work.
21507      new_path="$CYGWIN_ROOT_PATH$input_path"
21508    fi
21509  fi
21510
21511
21512  if test "x$path" != "x$new_path"; then
21513    BOOT_JDK="$new_path"
21514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21516  fi
21517
21518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21519
21520  path="$BOOT_JDK"
21521  has_colon=`$ECHO $path | $GREP ^.:`
21522  new_path="$path"
21523  if test "x$has_colon" = x; then
21524    # Not in mixed or Windows style, start by that.
21525    new_path=`cmd //c echo $path`
21526  fi
21527
21528
21529  input_path="$new_path"
21530  # Check if we need to convert this using DOS-style short mode. If the path
21531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21532  # take no chances and rewrite it.
21533  # Note: m4 eats our [], so we need to use [ and ] instead.
21534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21535  if test "x$has_forbidden_chars" != x; then
21536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21538  fi
21539
21540
21541  windows_path="$new_path"
21542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21543    unix_path=`$CYGPATH -u "$windows_path"`
21544    new_path="$unix_path"
21545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21547    new_path="$unix_path"
21548  fi
21549
21550  if test "x$path" != "x$new_path"; then
21551    BOOT_JDK="$new_path"
21552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21554  fi
21555
21556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21558
21559  else
21560    # We're on a unix platform. Hooray! :)
21561    path="$BOOT_JDK"
21562    has_space=`$ECHO "$path" | $GREP " "`
21563    if test "x$has_space" != x; then
21564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21566      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21567    fi
21568
21569    # Use eval to expand a potential ~
21570    eval path="$path"
21571    if test ! -f "$path" && test ! -d "$path"; then
21572      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21573    fi
21574
21575    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21576  fi
21577
21578            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21579$as_echo_n "checking for Boot JDK... " >&6; }
21580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21581$as_echo "$BOOT_JDK" >&6; }
21582            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21583$as_echo_n "checking Boot JDK version... " >&6; }
21584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21586$as_echo "$BOOT_JDK_VERSION" >&6; }
21587          fi # end check jdk version
21588        fi # end check javac
21589      fi # end check java
21590    fi # end check boot jdk found
21591  fi
21592
21593
21594  # Test: Is $JAVA_HOME set?
21595
21596  if test "x$BOOT_JDK_FOUND" = xno; then
21597    # Now execute the test
21598
21599  if test "x$JAVA_HOME" != x; then
21600    JAVA_HOME_PROCESSED="$JAVA_HOME"
21601
21602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21603
21604  # Input might be given as Windows format, start by converting to
21605  # unix format.
21606  path="$JAVA_HOME_PROCESSED"
21607  new_path=`$CYGPATH -u "$path"`
21608
21609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21612  # "foo.exe" is OK but "foo" is an error.
21613  #
21614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21615  # It is also a way to make sure we got the proper file name for the real test later on.
21616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21617  if test "x$test_shortpath" = x; then
21618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21619$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21620    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21621  fi
21622
21623  # Call helper function which possibly converts this using DOS-style short mode.
21624  # If so, the updated path is stored in $new_path.
21625
21626  input_path="$new_path"
21627  # Check if we need to convert this using DOS-style short mode. If the path
21628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21629  # take no chances and rewrite it.
21630  # Note: m4 eats our [], so we need to use [ and ] instead.
21631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21632  if test "x$has_forbidden_chars" != x; then
21633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21637      # Going to short mode and back again did indeed matter. Since short mode is
21638      # case insensitive, let's make it lowercase to improve readability.
21639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21640      # Now convert it back to Unix-stile (cygpath)
21641      input_path=`$CYGPATH -u "$shortmode_path"`
21642      new_path="$input_path"
21643    fi
21644  fi
21645
21646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21647  if test "x$test_cygdrive_prefix" = x; then
21648    # As a simple fix, exclude /usr/bin since it's not a real path.
21649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21651      # a path prefixed by /cygdrive for fixpath to work.
21652      new_path="$CYGWIN_ROOT_PATH$input_path"
21653    fi
21654  fi
21655
21656
21657  if test "x$path" != "x$new_path"; then
21658    JAVA_HOME_PROCESSED="$new_path"
21659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21660$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21661  fi
21662
21663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21664
21665  path="$JAVA_HOME_PROCESSED"
21666  has_colon=`$ECHO $path | $GREP ^.:`
21667  new_path="$path"
21668  if test "x$has_colon" = x; then
21669    # Not in mixed or Windows style, start by that.
21670    new_path=`cmd //c echo $path`
21671  fi
21672
21673
21674  input_path="$new_path"
21675  # Check if we need to convert this using DOS-style short mode. If the path
21676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21677  # take no chances and rewrite it.
21678  # Note: m4 eats our [], so we need to use [ and ] instead.
21679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21680  if test "x$has_forbidden_chars" != x; then
21681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21683  fi
21684
21685
21686  windows_path="$new_path"
21687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21688    unix_path=`$CYGPATH -u "$windows_path"`
21689    new_path="$unix_path"
21690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21692    new_path="$unix_path"
21693  fi
21694
21695  if test "x$path" != "x$new_path"; then
21696    JAVA_HOME_PROCESSED="$new_path"
21697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21698$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21699  fi
21700
21701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21703
21704  else
21705    # We're on a unix platform. Hooray! :)
21706    path="$JAVA_HOME_PROCESSED"
21707    has_space=`$ECHO "$path" | $GREP " "`
21708    if test "x$has_space" != x; then
21709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21710$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21711      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21712    fi
21713
21714    # Use eval to expand a potential ~
21715    eval path="$path"
21716    if test ! -f "$path" && test ! -d "$path"; then
21717      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21718    fi
21719
21720    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21721  fi
21722
21723    if test ! -d "$JAVA_HOME_PROCESSED"; then
21724      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21725$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21726    else
21727      # Aha, the user has set a JAVA_HOME
21728      # let us use that as the Boot JDK.
21729      BOOT_JDK="$JAVA_HOME_PROCESSED"
21730      BOOT_JDK_FOUND=maybe
21731      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21732$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21733    fi
21734  fi
21735
21736
21737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21739      # Do we have a bin/java?
21740      if test ! -x "$BOOT_JDK/bin/java"; then
21741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21743        BOOT_JDK_FOUND=no
21744      else
21745        # Do we have a bin/javac?
21746        if test ! -x "$BOOT_JDK/bin/javac"; then
21747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21751          BOOT_JDK_FOUND=no
21752        else
21753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21755
21756          # Extra M4 quote needed to protect [] in grep expression.
21757          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21758          if test "x$FOUND_CORRECT_VERSION" = x; then
21759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21763            BOOT_JDK_FOUND=no
21764          else
21765            # We're done! :-)
21766            BOOT_JDK_FOUND=yes
21767
21768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21769
21770  # Input might be given as Windows format, start by converting to
21771  # unix format.
21772  path="$BOOT_JDK"
21773  new_path=`$CYGPATH -u "$path"`
21774
21775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21778  # "foo.exe" is OK but "foo" is an error.
21779  #
21780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21781  # It is also a way to make sure we got the proper file name for the real test later on.
21782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21783  if test "x$test_shortpath" = x; then
21784    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21785$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21786    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21787  fi
21788
21789  # Call helper function which possibly converts this using DOS-style short mode.
21790  # If so, the updated path is stored in $new_path.
21791
21792  input_path="$new_path"
21793  # Check if we need to convert this using DOS-style short mode. If the path
21794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21795  # take no chances and rewrite it.
21796  # Note: m4 eats our [], so we need to use [ and ] instead.
21797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21798  if test "x$has_forbidden_chars" != x; then
21799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21803      # Going to short mode and back again did indeed matter. Since short mode is
21804      # case insensitive, let's make it lowercase to improve readability.
21805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21806      # Now convert it back to Unix-stile (cygpath)
21807      input_path=`$CYGPATH -u "$shortmode_path"`
21808      new_path="$input_path"
21809    fi
21810  fi
21811
21812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21813  if test "x$test_cygdrive_prefix" = x; then
21814    # As a simple fix, exclude /usr/bin since it's not a real path.
21815    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21817      # a path prefixed by /cygdrive for fixpath to work.
21818      new_path="$CYGWIN_ROOT_PATH$input_path"
21819    fi
21820  fi
21821
21822
21823  if test "x$path" != "x$new_path"; then
21824    BOOT_JDK="$new_path"
21825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21827  fi
21828
21829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21830
21831  path="$BOOT_JDK"
21832  has_colon=`$ECHO $path | $GREP ^.:`
21833  new_path="$path"
21834  if test "x$has_colon" = x; then
21835    # Not in mixed or Windows style, start by that.
21836    new_path=`cmd //c echo $path`
21837  fi
21838
21839
21840  input_path="$new_path"
21841  # Check if we need to convert this using DOS-style short mode. If the path
21842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21843  # take no chances and rewrite it.
21844  # Note: m4 eats our [], so we need to use [ and ] instead.
21845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21846  if test "x$has_forbidden_chars" != x; then
21847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21849  fi
21850
21851
21852  windows_path="$new_path"
21853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21854    unix_path=`$CYGPATH -u "$windows_path"`
21855    new_path="$unix_path"
21856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21858    new_path="$unix_path"
21859  fi
21860
21861  if test "x$path" != "x$new_path"; then
21862    BOOT_JDK="$new_path"
21863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21865  fi
21866
21867  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21868  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21869
21870  else
21871    # We're on a unix platform. Hooray! :)
21872    path="$BOOT_JDK"
21873    has_space=`$ECHO "$path" | $GREP " "`
21874    if test "x$has_space" != x; then
21875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21877      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21878    fi
21879
21880    # Use eval to expand a potential ~
21881    eval path="$path"
21882    if test ! -f "$path" && test ! -d "$path"; then
21883      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21884    fi
21885
21886    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21887  fi
21888
21889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21890$as_echo_n "checking for Boot JDK... " >&6; }
21891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21892$as_echo "$BOOT_JDK" >&6; }
21893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21894$as_echo_n "checking Boot JDK version... " >&6; }
21895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21897$as_echo "$BOOT_JDK_VERSION" >&6; }
21898          fi # end check jdk version
21899        fi # end check javac
21900      fi # end check java
21901    fi # end check boot jdk found
21902  fi
21903
21904
21905  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21906
21907  if test "x$BOOT_JDK_FOUND" = xno; then
21908    # Now execute the test
21909
21910  # Extract the first word of "javac", so it can be a program name with args.
21911set dummy javac; ac_word=$2
21912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21913$as_echo_n "checking for $ac_word... " >&6; }
21914if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21915  $as_echo_n "(cached) " >&6
21916else
21917  case $JAVAC_CHECK in
21918  [\\/]* | ?:[\\/]*)
21919  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21920  ;;
21921  *)
21922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21923for as_dir in $PATH
21924do
21925  IFS=$as_save_IFS
21926  test -z "$as_dir" && as_dir=.
21927    for ac_exec_ext in '' $ac_executable_extensions; do
21928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21929    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21931    break 2
21932  fi
21933done
21934  done
21935IFS=$as_save_IFS
21936
21937  ;;
21938esac
21939fi
21940JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21941if test -n "$JAVAC_CHECK"; then
21942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21943$as_echo "$JAVAC_CHECK" >&6; }
21944else
21945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21946$as_echo "no" >&6; }
21947fi
21948
21949
21950  # Extract the first word of "java", so it can be a program name with args.
21951set dummy java; ac_word=$2
21952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21953$as_echo_n "checking for $ac_word... " >&6; }
21954if ${ac_cv_path_JAVA_CHECK+:} false; then :
21955  $as_echo_n "(cached) " >&6
21956else
21957  case $JAVA_CHECK in
21958  [\\/]* | ?:[\\/]*)
21959  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21960  ;;
21961  *)
21962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21963for as_dir in $PATH
21964do
21965  IFS=$as_save_IFS
21966  test -z "$as_dir" && as_dir=.
21967    for ac_exec_ext in '' $ac_executable_extensions; do
21968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21969    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21971    break 2
21972  fi
21973done
21974  done
21975IFS=$as_save_IFS
21976
21977  ;;
21978esac
21979fi
21980JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21981if test -n "$JAVA_CHECK"; then
21982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21983$as_echo "$JAVA_CHECK" >&6; }
21984else
21985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21986$as_echo "no" >&6; }
21987fi
21988
21989
21990  BINARY="$JAVAC_CHECK"
21991  if test "x$JAVAC_CHECK" = x; then
21992    BINARY="$JAVA_CHECK"
21993  fi
21994  if test "x$BINARY" != x; then
21995    # So there is a java(c) binary, it might be part of a JDK.
21996    # Lets find the JDK/JRE directory by following symbolic links.
21997    # Linux/GNU systems often have links from /usr/bin/java to
21998    # /etc/alternatives/java to the real JDK binary.
21999
22000  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22001    # Follow a chain of symbolic links. Use readlink
22002    # where it exists, else fall back to horribly
22003    # complicated shell code.
22004    if test "x$READLINK_TESTED" != yes; then
22005      # On MacOSX there is a readlink tool with a different
22006      # purpose than the GNU readlink tool. Check the found readlink.
22007      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22008      if test "x$ISGNU" = x; then
22009        # A readlink that we do not know how to use.
22010        # Are there other non-GNU readlinks out there?
22011        READLINK_TESTED=yes
22012        READLINK=
22013      fi
22014    fi
22015
22016    if test "x$READLINK" != x; then
22017      BINARY=`$READLINK -f $BINARY`
22018    else
22019      # Save the current directory for restoring afterwards
22020      STARTDIR=$PWD
22021      COUNTER=0
22022      sym_link_dir=`$DIRNAME $BINARY`
22023      sym_link_file=`$BASENAME $BINARY`
22024      cd $sym_link_dir
22025      # Use -P flag to resolve symlinks in directories.
22026      cd `$THEPWDCMD -P`
22027      sym_link_dir=`$THEPWDCMD -P`
22028      # Resolve file symlinks
22029      while test $COUNTER -lt 20; do
22030        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22031        if test "x$ISLINK" == x; then
22032          # This is not a symbolic link! We are done!
22033          break
22034        fi
22035        # Again resolve directory symlinks since the target of the just found
22036        # link could be in a different directory
22037        cd `$DIRNAME $ISLINK`
22038        sym_link_dir=`$THEPWDCMD -P`
22039        sym_link_file=`$BASENAME $ISLINK`
22040        let COUNTER=COUNTER+1
22041      done
22042      cd $STARTDIR
22043      BINARY=$sym_link_dir/$sym_link_file
22044    fi
22045  fi
22046
22047    BOOT_JDK=`dirname "$BINARY"`
22048    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22049    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22050      # Looks like we found ourselves an JDK
22051      BOOT_JDK_FOUND=maybe
22052      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22053$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22054    fi
22055  fi
22056
22057
22058    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22059    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22060      # Do we have a bin/java?
22061      if test ! -x "$BOOT_JDK/bin/java"; then
22062        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22064        BOOT_JDK_FOUND=no
22065      else
22066        # Do we have a bin/javac?
22067        if test ! -x "$BOOT_JDK/bin/javac"; then
22068          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22070          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22071$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22072          BOOT_JDK_FOUND=no
22073        else
22074          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22075          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22076
22077          # Extra M4 quote needed to protect [] in grep expression.
22078          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22079          if test "x$FOUND_CORRECT_VERSION" = x; then
22080            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22082            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22083$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22084            BOOT_JDK_FOUND=no
22085          else
22086            # We're done! :-)
22087            BOOT_JDK_FOUND=yes
22088
22089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22090
22091  # Input might be given as Windows format, start by converting to
22092  # unix format.
22093  path="$BOOT_JDK"
22094  new_path=`$CYGPATH -u "$path"`
22095
22096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22099  # "foo.exe" is OK but "foo" is an error.
22100  #
22101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22102  # It is also a way to make sure we got the proper file name for the real test later on.
22103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22104  if test "x$test_shortpath" = x; then
22105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22108  fi
22109
22110  # Call helper function which possibly converts this using DOS-style short mode.
22111  # If so, the updated path is stored in $new_path.
22112
22113  input_path="$new_path"
22114  # Check if we need to convert this using DOS-style short mode. If the path
22115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22116  # take no chances and rewrite it.
22117  # Note: m4 eats our [], so we need to use [ and ] instead.
22118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22119  if test "x$has_forbidden_chars" != x; then
22120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22124      # Going to short mode and back again did indeed matter. Since short mode is
22125      # case insensitive, let's make it lowercase to improve readability.
22126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22127      # Now convert it back to Unix-stile (cygpath)
22128      input_path=`$CYGPATH -u "$shortmode_path"`
22129      new_path="$input_path"
22130    fi
22131  fi
22132
22133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22134  if test "x$test_cygdrive_prefix" = x; then
22135    # As a simple fix, exclude /usr/bin since it's not a real path.
22136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22138      # a path prefixed by /cygdrive for fixpath to work.
22139      new_path="$CYGWIN_ROOT_PATH$input_path"
22140    fi
22141  fi
22142
22143
22144  if test "x$path" != "x$new_path"; then
22145    BOOT_JDK="$new_path"
22146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22148  fi
22149
22150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22151
22152  path="$BOOT_JDK"
22153  has_colon=`$ECHO $path | $GREP ^.:`
22154  new_path="$path"
22155  if test "x$has_colon" = x; then
22156    # Not in mixed or Windows style, start by that.
22157    new_path=`cmd //c echo $path`
22158  fi
22159
22160
22161  input_path="$new_path"
22162  # Check if we need to convert this using DOS-style short mode. If the path
22163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22164  # take no chances and rewrite it.
22165  # Note: m4 eats our [], so we need to use [ and ] instead.
22166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22167  if test "x$has_forbidden_chars" != x; then
22168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22170  fi
22171
22172
22173  windows_path="$new_path"
22174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22175    unix_path=`$CYGPATH -u "$windows_path"`
22176    new_path="$unix_path"
22177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22179    new_path="$unix_path"
22180  fi
22181
22182  if test "x$path" != "x$new_path"; then
22183    BOOT_JDK="$new_path"
22184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22186  fi
22187
22188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22190
22191  else
22192    # We're on a unix platform. Hooray! :)
22193    path="$BOOT_JDK"
22194    has_space=`$ECHO "$path" | $GREP " "`
22195    if test "x$has_space" != x; then
22196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22199    fi
22200
22201    # Use eval to expand a potential ~
22202    eval path="$path"
22203    if test ! -f "$path" && test ! -d "$path"; then
22204      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22205    fi
22206
22207    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22208  fi
22209
22210            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22211$as_echo_n "checking for Boot JDK... " >&6; }
22212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22213$as_echo "$BOOT_JDK" >&6; }
22214            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22215$as_echo_n "checking Boot JDK version... " >&6; }
22216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22218$as_echo "$BOOT_JDK_VERSION" >&6; }
22219          fi # end check jdk version
22220        fi # end check javac
22221      fi # end check java
22222    fi # end check boot jdk found
22223  fi
22224
22225
22226  # Test: Is there a JDK installed in default, well-known locations?
22227
22228  if test "x$BOOT_JDK_FOUND" = xno; then
22229    # Now execute the test
22230
22231  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22232
22233  if test "x$BOOT_JDK_FOUND" = xno; then
22234    # Now execute the test
22235
22236  if test "x$ProgramW6432" != x; then
22237    VIRTUAL_DIR="$ProgramW6432/Java"
22238
22239  windows_path="$VIRTUAL_DIR"
22240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22241    unix_path=`$CYGPATH -u "$windows_path"`
22242    VIRTUAL_DIR="$unix_path"
22243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22245    VIRTUAL_DIR="$unix_path"
22246  fi
22247
22248
22249  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22250  BOOT_JDK_SUFFIX=""
22251  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22252  if test "x$ALL_JDKS_FOUND" != x; then
22253    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22254
22255  if test "x$BOOT_JDK_FOUND" = xno; then
22256    # Now execute the test
22257
22258        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22259        if test -d "$BOOT_JDK"; then
22260          BOOT_JDK_FOUND=maybe
22261          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22262$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22263        fi
22264
22265
22266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22268      # Do we have a bin/java?
22269      if test ! -x "$BOOT_JDK/bin/java"; then
22270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22272        BOOT_JDK_FOUND=no
22273      else
22274        # Do we have a bin/javac?
22275        if test ! -x "$BOOT_JDK/bin/javac"; then
22276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22280          BOOT_JDK_FOUND=no
22281        else
22282          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22283          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22284
22285          # Extra M4 quote needed to protect [] in grep expression.
22286          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22287          if test "x$FOUND_CORRECT_VERSION" = x; then
22288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22290            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22291$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22292            BOOT_JDK_FOUND=no
22293          else
22294            # We're done! :-)
22295            BOOT_JDK_FOUND=yes
22296
22297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22298
22299  # Input might be given as Windows format, start by converting to
22300  # unix format.
22301  path="$BOOT_JDK"
22302  new_path=`$CYGPATH -u "$path"`
22303
22304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22307  # "foo.exe" is OK but "foo" is an error.
22308  #
22309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22310  # It is also a way to make sure we got the proper file name for the real test later on.
22311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22312  if test "x$test_shortpath" = x; then
22313    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22314$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22315    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22316  fi
22317
22318  # Call helper function which possibly converts this using DOS-style short mode.
22319  # If so, the updated path is stored in $new_path.
22320
22321  input_path="$new_path"
22322  # Check if we need to convert this using DOS-style short mode. If the path
22323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22324  # take no chances and rewrite it.
22325  # Note: m4 eats our [], so we need to use [ and ] instead.
22326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22327  if test "x$has_forbidden_chars" != x; then
22328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22332      # Going to short mode and back again did indeed matter. Since short mode is
22333      # case insensitive, let's make it lowercase to improve readability.
22334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22335      # Now convert it back to Unix-stile (cygpath)
22336      input_path=`$CYGPATH -u "$shortmode_path"`
22337      new_path="$input_path"
22338    fi
22339  fi
22340
22341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22342  if test "x$test_cygdrive_prefix" = x; then
22343    # As a simple fix, exclude /usr/bin since it's not a real path.
22344    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22346      # a path prefixed by /cygdrive for fixpath to work.
22347      new_path="$CYGWIN_ROOT_PATH$input_path"
22348    fi
22349  fi
22350
22351
22352  if test "x$path" != "x$new_path"; then
22353    BOOT_JDK="$new_path"
22354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22355$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22356  fi
22357
22358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22359
22360  path="$BOOT_JDK"
22361  has_colon=`$ECHO $path | $GREP ^.:`
22362  new_path="$path"
22363  if test "x$has_colon" = x; then
22364    # Not in mixed or Windows style, start by that.
22365    new_path=`cmd //c echo $path`
22366  fi
22367
22368
22369  input_path="$new_path"
22370  # Check if we need to convert this using DOS-style short mode. If the path
22371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22372  # take no chances and rewrite it.
22373  # Note: m4 eats our [], so we need to use [ and ] instead.
22374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22375  if test "x$has_forbidden_chars" != x; then
22376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22378  fi
22379
22380
22381  windows_path="$new_path"
22382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22383    unix_path=`$CYGPATH -u "$windows_path"`
22384    new_path="$unix_path"
22385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22387    new_path="$unix_path"
22388  fi
22389
22390  if test "x$path" != "x$new_path"; then
22391    BOOT_JDK="$new_path"
22392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22393$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22394  fi
22395
22396  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22397  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22398
22399  else
22400    # We're on a unix platform. Hooray! :)
22401    path="$BOOT_JDK"
22402    has_space=`$ECHO "$path" | $GREP " "`
22403    if test "x$has_space" != x; then
22404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22406      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22407    fi
22408
22409    # Use eval to expand a potential ~
22410    eval path="$path"
22411    if test ! -f "$path" && test ! -d "$path"; then
22412      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22413    fi
22414
22415    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22416  fi
22417
22418            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22419$as_echo_n "checking for Boot JDK... " >&6; }
22420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22421$as_echo "$BOOT_JDK" >&6; }
22422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22423$as_echo_n "checking Boot JDK version... " >&6; }
22424            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22426$as_echo "$BOOT_JDK_VERSION" >&6; }
22427          fi # end check jdk version
22428        fi # end check javac
22429      fi # end check java
22430    fi # end check boot jdk found
22431  fi
22432
22433    done
22434  fi
22435
22436  fi
22437
22438
22439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22441      # Do we have a bin/java?
22442      if test ! -x "$BOOT_JDK/bin/java"; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22445        BOOT_JDK_FOUND=no
22446      else
22447        # Do we have a bin/javac?
22448        if test ! -x "$BOOT_JDK/bin/javac"; then
22449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22453          BOOT_JDK_FOUND=no
22454        else
22455          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22456          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22457
22458          # Extra M4 quote needed to protect [] in grep expression.
22459          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22460          if test "x$FOUND_CORRECT_VERSION" = x; then
22461            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22463            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22464$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22465            BOOT_JDK_FOUND=no
22466          else
22467            # We're done! :-)
22468            BOOT_JDK_FOUND=yes
22469
22470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22471
22472  # Input might be given as Windows format, start by converting to
22473  # unix format.
22474  path="$BOOT_JDK"
22475  new_path=`$CYGPATH -u "$path"`
22476
22477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22480  # "foo.exe" is OK but "foo" is an error.
22481  #
22482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22483  # It is also a way to make sure we got the proper file name for the real test later on.
22484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22485  if test "x$test_shortpath" = x; then
22486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22488    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22489  fi
22490
22491  # Call helper function which possibly converts this using DOS-style short mode.
22492  # If so, the updated path is stored in $new_path.
22493
22494  input_path="$new_path"
22495  # Check if we need to convert this using DOS-style short mode. If the path
22496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22497  # take no chances and rewrite it.
22498  # Note: m4 eats our [], so we need to use [ and ] instead.
22499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22500  if test "x$has_forbidden_chars" != x; then
22501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22505      # Going to short mode and back again did indeed matter. Since short mode is
22506      # case insensitive, let's make it lowercase to improve readability.
22507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22508      # Now convert it back to Unix-stile (cygpath)
22509      input_path=`$CYGPATH -u "$shortmode_path"`
22510      new_path="$input_path"
22511    fi
22512  fi
22513
22514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22515  if test "x$test_cygdrive_prefix" = x; then
22516    # As a simple fix, exclude /usr/bin since it's not a real path.
22517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22519      # a path prefixed by /cygdrive for fixpath to work.
22520      new_path="$CYGWIN_ROOT_PATH$input_path"
22521    fi
22522  fi
22523
22524
22525  if test "x$path" != "x$new_path"; then
22526    BOOT_JDK="$new_path"
22527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22529  fi
22530
22531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22532
22533  path="$BOOT_JDK"
22534  has_colon=`$ECHO $path | $GREP ^.:`
22535  new_path="$path"
22536  if test "x$has_colon" = x; then
22537    # Not in mixed or Windows style, start by that.
22538    new_path=`cmd //c echo $path`
22539  fi
22540
22541
22542  input_path="$new_path"
22543  # Check if we need to convert this using DOS-style short mode. If the path
22544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22545  # take no chances and rewrite it.
22546  # Note: m4 eats our [], so we need to use [ and ] instead.
22547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22548  if test "x$has_forbidden_chars" != x; then
22549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22551  fi
22552
22553
22554  windows_path="$new_path"
22555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22556    unix_path=`$CYGPATH -u "$windows_path"`
22557    new_path="$unix_path"
22558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22560    new_path="$unix_path"
22561  fi
22562
22563  if test "x$path" != "x$new_path"; then
22564    BOOT_JDK="$new_path"
22565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22567  fi
22568
22569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22571
22572  else
22573    # We're on a unix platform. Hooray! :)
22574    path="$BOOT_JDK"
22575    has_space=`$ECHO "$path" | $GREP " "`
22576    if test "x$has_space" != x; then
22577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22579      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22580    fi
22581
22582    # Use eval to expand a potential ~
22583    eval path="$path"
22584    if test ! -f "$path" && test ! -d "$path"; then
22585      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22586    fi
22587
22588    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22589  fi
22590
22591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22592$as_echo_n "checking for Boot JDK... " >&6; }
22593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22594$as_echo "$BOOT_JDK" >&6; }
22595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22596$as_echo_n "checking Boot JDK version... " >&6; }
22597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22599$as_echo "$BOOT_JDK_VERSION" >&6; }
22600          fi # end check jdk version
22601        fi # end check javac
22602      fi # end check java
22603    fi # end check boot jdk found
22604  fi
22605
22606
22607  if test "x$BOOT_JDK_FOUND" = xno; then
22608    # Now execute the test
22609
22610  if test "x$PROGRAMW6432" != x; then
22611    VIRTUAL_DIR="$PROGRAMW6432/Java"
22612
22613  windows_path="$VIRTUAL_DIR"
22614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22615    unix_path=`$CYGPATH -u "$windows_path"`
22616    VIRTUAL_DIR="$unix_path"
22617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22619    VIRTUAL_DIR="$unix_path"
22620  fi
22621
22622
22623  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22624  BOOT_JDK_SUFFIX=""
22625  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22626  if test "x$ALL_JDKS_FOUND" != x; then
22627    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22628
22629  if test "x$BOOT_JDK_FOUND" = xno; then
22630    # Now execute the test
22631
22632        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22633        if test -d "$BOOT_JDK"; then
22634          BOOT_JDK_FOUND=maybe
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22636$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22637        fi
22638
22639
22640    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22641    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22642      # Do we have a bin/java?
22643      if test ! -x "$BOOT_JDK/bin/java"; then
22644        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22646        BOOT_JDK_FOUND=no
22647      else
22648        # Do we have a bin/javac?
22649        if test ! -x "$BOOT_JDK/bin/javac"; then
22650          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22652          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22653$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22654          BOOT_JDK_FOUND=no
22655        else
22656          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22657          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22658
22659          # Extra M4 quote needed to protect [] in grep expression.
22660          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22661          if test "x$FOUND_CORRECT_VERSION" = x; then
22662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22664            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22665$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22666            BOOT_JDK_FOUND=no
22667          else
22668            # We're done! :-)
22669            BOOT_JDK_FOUND=yes
22670
22671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22672
22673  # Input might be given as Windows format, start by converting to
22674  # unix format.
22675  path="$BOOT_JDK"
22676  new_path=`$CYGPATH -u "$path"`
22677
22678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22681  # "foo.exe" is OK but "foo" is an error.
22682  #
22683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22684  # It is also a way to make sure we got the proper file name for the real test later on.
22685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22686  if test "x$test_shortpath" = x; then
22687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22690  fi
22691
22692  # Call helper function which possibly converts this using DOS-style short mode.
22693  # If so, the updated path is stored in $new_path.
22694
22695  input_path="$new_path"
22696  # Check if we need to convert this using DOS-style short mode. If the path
22697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22698  # take no chances and rewrite it.
22699  # Note: m4 eats our [], so we need to use [ and ] instead.
22700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22701  if test "x$has_forbidden_chars" != x; then
22702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22706      # Going to short mode and back again did indeed matter. Since short mode is
22707      # case insensitive, let's make it lowercase to improve readability.
22708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22709      # Now convert it back to Unix-stile (cygpath)
22710      input_path=`$CYGPATH -u "$shortmode_path"`
22711      new_path="$input_path"
22712    fi
22713  fi
22714
22715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22716  if test "x$test_cygdrive_prefix" = x; then
22717    # As a simple fix, exclude /usr/bin since it's not a real path.
22718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22720      # a path prefixed by /cygdrive for fixpath to work.
22721      new_path="$CYGWIN_ROOT_PATH$input_path"
22722    fi
22723  fi
22724
22725
22726  if test "x$path" != "x$new_path"; then
22727    BOOT_JDK="$new_path"
22728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22730  fi
22731
22732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22733
22734  path="$BOOT_JDK"
22735  has_colon=`$ECHO $path | $GREP ^.:`
22736  new_path="$path"
22737  if test "x$has_colon" = x; then
22738    # Not in mixed or Windows style, start by that.
22739    new_path=`cmd //c echo $path`
22740  fi
22741
22742
22743  input_path="$new_path"
22744  # Check if we need to convert this using DOS-style short mode. If the path
22745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22746  # take no chances and rewrite it.
22747  # Note: m4 eats our [], so we need to use [ and ] instead.
22748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22749  if test "x$has_forbidden_chars" != x; then
22750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22752  fi
22753
22754
22755  windows_path="$new_path"
22756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22757    unix_path=`$CYGPATH -u "$windows_path"`
22758    new_path="$unix_path"
22759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22761    new_path="$unix_path"
22762  fi
22763
22764  if test "x$path" != "x$new_path"; then
22765    BOOT_JDK="$new_path"
22766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22768  fi
22769
22770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22772
22773  else
22774    # We're on a unix platform. Hooray! :)
22775    path="$BOOT_JDK"
22776    has_space=`$ECHO "$path" | $GREP " "`
22777    if test "x$has_space" != x; then
22778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22780      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22781    fi
22782
22783    # Use eval to expand a potential ~
22784    eval path="$path"
22785    if test ! -f "$path" && test ! -d "$path"; then
22786      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22787    fi
22788
22789    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22790  fi
22791
22792            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22793$as_echo_n "checking for Boot JDK... " >&6; }
22794            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22795$as_echo "$BOOT_JDK" >&6; }
22796            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22797$as_echo_n "checking Boot JDK version... " >&6; }
22798            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22799            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22800$as_echo "$BOOT_JDK_VERSION" >&6; }
22801          fi # end check jdk version
22802        fi # end check javac
22803      fi # end check java
22804    fi # end check boot jdk found
22805  fi
22806
22807    done
22808  fi
22809
22810  fi
22811
22812
22813    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22814    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22815      # Do we have a bin/java?
22816      if test ! -x "$BOOT_JDK/bin/java"; then
22817        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22819        BOOT_JDK_FOUND=no
22820      else
22821        # Do we have a bin/javac?
22822        if test ! -x "$BOOT_JDK/bin/javac"; then
22823          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22825          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22826$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22827          BOOT_JDK_FOUND=no
22828        else
22829          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22830          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22831
22832          # Extra M4 quote needed to protect [] in grep expression.
22833          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22834          if test "x$FOUND_CORRECT_VERSION" = x; then
22835            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22837            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22838$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22839            BOOT_JDK_FOUND=no
22840          else
22841            # We're done! :-)
22842            BOOT_JDK_FOUND=yes
22843
22844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22845
22846  # Input might be given as Windows format, start by converting to
22847  # unix format.
22848  path="$BOOT_JDK"
22849  new_path=`$CYGPATH -u "$path"`
22850
22851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22854  # "foo.exe" is OK but "foo" is an error.
22855  #
22856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22857  # It is also a way to make sure we got the proper file name for the real test later on.
22858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22859  if test "x$test_shortpath" = x; then
22860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22862    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22863  fi
22864
22865  # Call helper function which possibly converts this using DOS-style short mode.
22866  # If so, the updated path is stored in $new_path.
22867
22868  input_path="$new_path"
22869  # Check if we need to convert this using DOS-style short mode. If the path
22870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22871  # take no chances and rewrite it.
22872  # Note: m4 eats our [], so we need to use [ and ] instead.
22873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22874  if test "x$has_forbidden_chars" != x; then
22875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22879      # Going to short mode and back again did indeed matter. Since short mode is
22880      # case insensitive, let's make it lowercase to improve readability.
22881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22882      # Now convert it back to Unix-stile (cygpath)
22883      input_path=`$CYGPATH -u "$shortmode_path"`
22884      new_path="$input_path"
22885    fi
22886  fi
22887
22888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22889  if test "x$test_cygdrive_prefix" = x; then
22890    # As a simple fix, exclude /usr/bin since it's not a real path.
22891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22893      # a path prefixed by /cygdrive for fixpath to work.
22894      new_path="$CYGWIN_ROOT_PATH$input_path"
22895    fi
22896  fi
22897
22898
22899  if test "x$path" != "x$new_path"; then
22900    BOOT_JDK="$new_path"
22901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22903  fi
22904
22905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22906
22907  path="$BOOT_JDK"
22908  has_colon=`$ECHO $path | $GREP ^.:`
22909  new_path="$path"
22910  if test "x$has_colon" = x; then
22911    # Not in mixed or Windows style, start by that.
22912    new_path=`cmd //c echo $path`
22913  fi
22914
22915
22916  input_path="$new_path"
22917  # Check if we need to convert this using DOS-style short mode. If the path
22918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22919  # take no chances and rewrite it.
22920  # Note: m4 eats our [], so we need to use [ and ] instead.
22921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22922  if test "x$has_forbidden_chars" != x; then
22923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22925  fi
22926
22927
22928  windows_path="$new_path"
22929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22930    unix_path=`$CYGPATH -u "$windows_path"`
22931    new_path="$unix_path"
22932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22934    new_path="$unix_path"
22935  fi
22936
22937  if test "x$path" != "x$new_path"; then
22938    BOOT_JDK="$new_path"
22939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22941  fi
22942
22943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22945
22946  else
22947    # We're on a unix platform. Hooray! :)
22948    path="$BOOT_JDK"
22949    has_space=`$ECHO "$path" | $GREP " "`
22950    if test "x$has_space" != x; then
22951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22954    fi
22955
22956    # Use eval to expand a potential ~
22957    eval path="$path"
22958    if test ! -f "$path" && test ! -d "$path"; then
22959      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22960    fi
22961
22962    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22963  fi
22964
22965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22966$as_echo_n "checking for Boot JDK... " >&6; }
22967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22968$as_echo "$BOOT_JDK" >&6; }
22969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22970$as_echo_n "checking Boot JDK version... " >&6; }
22971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22973$as_echo "$BOOT_JDK_VERSION" >&6; }
22974          fi # end check jdk version
22975        fi # end check javac
22976      fi # end check java
22977    fi # end check boot jdk found
22978  fi
22979
22980
22981  if test "x$BOOT_JDK_FOUND" = xno; then
22982    # Now execute the test
22983
22984  if test "x$PROGRAMFILES" != x; then
22985    VIRTUAL_DIR="$PROGRAMFILES/Java"
22986
22987  windows_path="$VIRTUAL_DIR"
22988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989    unix_path=`$CYGPATH -u "$windows_path"`
22990    VIRTUAL_DIR="$unix_path"
22991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22993    VIRTUAL_DIR="$unix_path"
22994  fi
22995
22996
22997  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22998  BOOT_JDK_SUFFIX=""
22999  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23000  if test "x$ALL_JDKS_FOUND" != x; then
23001    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23002
23003  if test "x$BOOT_JDK_FOUND" = xno; then
23004    # Now execute the test
23005
23006        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23007        if test -d "$BOOT_JDK"; then
23008          BOOT_JDK_FOUND=maybe
23009          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23010$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23011        fi
23012
23013
23014    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23015    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23016      # Do we have a bin/java?
23017      if test ! -x "$BOOT_JDK/bin/java"; then
23018        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23020        BOOT_JDK_FOUND=no
23021      else
23022        # Do we have a bin/javac?
23023        if test ! -x "$BOOT_JDK/bin/javac"; then
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23026          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23027$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23028          BOOT_JDK_FOUND=no
23029        else
23030          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23031          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23032
23033          # Extra M4 quote needed to protect [] in grep expression.
23034          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23035          if test "x$FOUND_CORRECT_VERSION" = x; then
23036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23038            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23039$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23040            BOOT_JDK_FOUND=no
23041          else
23042            # We're done! :-)
23043            BOOT_JDK_FOUND=yes
23044
23045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23046
23047  # Input might be given as Windows format, start by converting to
23048  # unix format.
23049  path="$BOOT_JDK"
23050  new_path=`$CYGPATH -u "$path"`
23051
23052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23055  # "foo.exe" is OK but "foo" is an error.
23056  #
23057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23058  # It is also a way to make sure we got the proper file name for the real test later on.
23059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23060  if test "x$test_shortpath" = x; then
23061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23064  fi
23065
23066  # Call helper function which possibly converts this using DOS-style short mode.
23067  # If so, the updated path is stored in $new_path.
23068
23069  input_path="$new_path"
23070  # Check if we need to convert this using DOS-style short mode. If the path
23071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23072  # take no chances and rewrite it.
23073  # Note: m4 eats our [], so we need to use [ and ] instead.
23074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23075  if test "x$has_forbidden_chars" != x; then
23076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23080      # Going to short mode and back again did indeed matter. Since short mode is
23081      # case insensitive, let's make it lowercase to improve readability.
23082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23083      # Now convert it back to Unix-stile (cygpath)
23084      input_path=`$CYGPATH -u "$shortmode_path"`
23085      new_path="$input_path"
23086    fi
23087  fi
23088
23089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23090  if test "x$test_cygdrive_prefix" = x; then
23091    # As a simple fix, exclude /usr/bin since it's not a real path.
23092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23094      # a path prefixed by /cygdrive for fixpath to work.
23095      new_path="$CYGWIN_ROOT_PATH$input_path"
23096    fi
23097  fi
23098
23099
23100  if test "x$path" != "x$new_path"; then
23101    BOOT_JDK="$new_path"
23102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23104  fi
23105
23106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23107
23108  path="$BOOT_JDK"
23109  has_colon=`$ECHO $path | $GREP ^.:`
23110  new_path="$path"
23111  if test "x$has_colon" = x; then
23112    # Not in mixed or Windows style, start by that.
23113    new_path=`cmd //c echo $path`
23114  fi
23115
23116
23117  input_path="$new_path"
23118  # Check if we need to convert this using DOS-style short mode. If the path
23119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23120  # take no chances and rewrite it.
23121  # Note: m4 eats our [], so we need to use [ and ] instead.
23122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23123  if test "x$has_forbidden_chars" != x; then
23124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23126  fi
23127
23128
23129  windows_path="$new_path"
23130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23131    unix_path=`$CYGPATH -u "$windows_path"`
23132    new_path="$unix_path"
23133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23135    new_path="$unix_path"
23136  fi
23137
23138  if test "x$path" != "x$new_path"; then
23139    BOOT_JDK="$new_path"
23140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23142  fi
23143
23144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23146
23147  else
23148    # We're on a unix platform. Hooray! :)
23149    path="$BOOT_JDK"
23150    has_space=`$ECHO "$path" | $GREP " "`
23151    if test "x$has_space" != x; then
23152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23154      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23155    fi
23156
23157    # Use eval to expand a potential ~
23158    eval path="$path"
23159    if test ! -f "$path" && test ! -d "$path"; then
23160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23161    fi
23162
23163    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23164  fi
23165
23166            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23167$as_echo_n "checking for Boot JDK... " >&6; }
23168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23169$as_echo "$BOOT_JDK" >&6; }
23170            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23171$as_echo_n "checking Boot JDK version... " >&6; }
23172            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23174$as_echo "$BOOT_JDK_VERSION" >&6; }
23175          fi # end check jdk version
23176        fi # end check javac
23177      fi # end check java
23178    fi # end check boot jdk found
23179  fi
23180
23181    done
23182  fi
23183
23184  fi
23185
23186
23187    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23188    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23189      # Do we have a bin/java?
23190      if test ! -x "$BOOT_JDK/bin/java"; then
23191        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23193        BOOT_JDK_FOUND=no
23194      else
23195        # Do we have a bin/javac?
23196        if test ! -x "$BOOT_JDK/bin/javac"; then
23197          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23199          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23200$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23201          BOOT_JDK_FOUND=no
23202        else
23203          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23204          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23205
23206          # Extra M4 quote needed to protect [] in grep expression.
23207          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23208          if test "x$FOUND_CORRECT_VERSION" = x; then
23209            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23211            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23212$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23213            BOOT_JDK_FOUND=no
23214          else
23215            # We're done! :-)
23216            BOOT_JDK_FOUND=yes
23217
23218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23219
23220  # Input might be given as Windows format, start by converting to
23221  # unix format.
23222  path="$BOOT_JDK"
23223  new_path=`$CYGPATH -u "$path"`
23224
23225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23228  # "foo.exe" is OK but "foo" is an error.
23229  #
23230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23231  # It is also a way to make sure we got the proper file name for the real test later on.
23232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23233  if test "x$test_shortpath" = x; then
23234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23237  fi
23238
23239  # Call helper function which possibly converts this using DOS-style short mode.
23240  # If so, the updated path is stored in $new_path.
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23253      # Going to short mode and back again did indeed matter. Since short mode is
23254      # case insensitive, let's make it lowercase to improve readability.
23255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23256      # Now convert it back to Unix-stile (cygpath)
23257      input_path=`$CYGPATH -u "$shortmode_path"`
23258      new_path="$input_path"
23259    fi
23260  fi
23261
23262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23263  if test "x$test_cygdrive_prefix" = x; then
23264    # As a simple fix, exclude /usr/bin since it's not a real path.
23265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23267      # a path prefixed by /cygdrive for fixpath to work.
23268      new_path="$CYGWIN_ROOT_PATH$input_path"
23269    fi
23270  fi
23271
23272
23273  if test "x$path" != "x$new_path"; then
23274    BOOT_JDK="$new_path"
23275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23277  fi
23278
23279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23280
23281  path="$BOOT_JDK"
23282  has_colon=`$ECHO $path | $GREP ^.:`
23283  new_path="$path"
23284  if test "x$has_colon" = x; then
23285    # Not in mixed or Windows style, start by that.
23286    new_path=`cmd //c echo $path`
23287  fi
23288
23289
23290  input_path="$new_path"
23291  # Check if we need to convert this using DOS-style short mode. If the path
23292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23293  # take no chances and rewrite it.
23294  # Note: m4 eats our [], so we need to use [ and ] instead.
23295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23296  if test "x$has_forbidden_chars" != x; then
23297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299  fi
23300
23301
23302  windows_path="$new_path"
23303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23304    unix_path=`$CYGPATH -u "$windows_path"`
23305    new_path="$unix_path"
23306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23308    new_path="$unix_path"
23309  fi
23310
23311  if test "x$path" != "x$new_path"; then
23312    BOOT_JDK="$new_path"
23313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23315  fi
23316
23317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23319
23320  else
23321    # We're on a unix platform. Hooray! :)
23322    path="$BOOT_JDK"
23323    has_space=`$ECHO "$path" | $GREP " "`
23324    if test "x$has_space" != x; then
23325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23327      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23328    fi
23329
23330    # Use eval to expand a potential ~
23331    eval path="$path"
23332    if test ! -f "$path" && test ! -d "$path"; then
23333      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23334    fi
23335
23336    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23337  fi
23338
23339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23340$as_echo_n "checking for Boot JDK... " >&6; }
23341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23342$as_echo "$BOOT_JDK" >&6; }
23343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23344$as_echo_n "checking Boot JDK version... " >&6; }
23345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23347$as_echo "$BOOT_JDK_VERSION" >&6; }
23348          fi # end check jdk version
23349        fi # end check javac
23350      fi # end check java
23351    fi # end check boot jdk found
23352  fi
23353
23354
23355  if test "x$BOOT_JDK_FOUND" = xno; then
23356    # Now execute the test
23357
23358  if test "x$ProgramFiles" != x; then
23359    VIRTUAL_DIR="$ProgramFiles/Java"
23360
23361  windows_path="$VIRTUAL_DIR"
23362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23363    unix_path=`$CYGPATH -u "$windows_path"`
23364    VIRTUAL_DIR="$unix_path"
23365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23367    VIRTUAL_DIR="$unix_path"
23368  fi
23369
23370
23371  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23372  BOOT_JDK_SUFFIX=""
23373  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23374  if test "x$ALL_JDKS_FOUND" != x; then
23375    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23376
23377  if test "x$BOOT_JDK_FOUND" = xno; then
23378    # Now execute the test
23379
23380        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23381        if test -d "$BOOT_JDK"; then
23382          BOOT_JDK_FOUND=maybe
23383          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23384$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23385        fi
23386
23387
23388    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23389    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23390      # Do we have a bin/java?
23391      if test ! -x "$BOOT_JDK/bin/java"; then
23392        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23394        BOOT_JDK_FOUND=no
23395      else
23396        # Do we have a bin/javac?
23397        if test ! -x "$BOOT_JDK/bin/javac"; then
23398          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23400          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23401$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23402          BOOT_JDK_FOUND=no
23403        else
23404          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23405          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23406
23407          # Extra M4 quote needed to protect [] in grep expression.
23408          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23409          if test "x$FOUND_CORRECT_VERSION" = x; then
23410            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23412            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23413$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23414            BOOT_JDK_FOUND=no
23415          else
23416            # We're done! :-)
23417            BOOT_JDK_FOUND=yes
23418
23419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23420
23421  # Input might be given as Windows format, start by converting to
23422  # unix format.
23423  path="$BOOT_JDK"
23424  new_path=`$CYGPATH -u "$path"`
23425
23426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23429  # "foo.exe" is OK but "foo" is an error.
23430  #
23431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23432  # It is also a way to make sure we got the proper file name for the real test later on.
23433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23434  if test "x$test_shortpath" = x; then
23435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23437    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23438  fi
23439
23440  # Call helper function which possibly converts this using DOS-style short mode.
23441  # If so, the updated path is stored in $new_path.
23442
23443  input_path="$new_path"
23444  # Check if we need to convert this using DOS-style short mode. If the path
23445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23446  # take no chances and rewrite it.
23447  # Note: m4 eats our [], so we need to use [ and ] instead.
23448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23449  if test "x$has_forbidden_chars" != x; then
23450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23454      # Going to short mode and back again did indeed matter. Since short mode is
23455      # case insensitive, let's make it lowercase to improve readability.
23456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23457      # Now convert it back to Unix-stile (cygpath)
23458      input_path=`$CYGPATH -u "$shortmode_path"`
23459      new_path="$input_path"
23460    fi
23461  fi
23462
23463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23464  if test "x$test_cygdrive_prefix" = x; then
23465    # As a simple fix, exclude /usr/bin since it's not a real path.
23466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23468      # a path prefixed by /cygdrive for fixpath to work.
23469      new_path="$CYGWIN_ROOT_PATH$input_path"
23470    fi
23471  fi
23472
23473
23474  if test "x$path" != "x$new_path"; then
23475    BOOT_JDK="$new_path"
23476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23478  fi
23479
23480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23481
23482  path="$BOOT_JDK"
23483  has_colon=`$ECHO $path | $GREP ^.:`
23484  new_path="$path"
23485  if test "x$has_colon" = x; then
23486    # Not in mixed or Windows style, start by that.
23487    new_path=`cmd //c echo $path`
23488  fi
23489
23490
23491  input_path="$new_path"
23492  # Check if we need to convert this using DOS-style short mode. If the path
23493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23494  # take no chances and rewrite it.
23495  # Note: m4 eats our [], so we need to use [ and ] instead.
23496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23497  if test "x$has_forbidden_chars" != x; then
23498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23500  fi
23501
23502
23503  windows_path="$new_path"
23504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23505    unix_path=`$CYGPATH -u "$windows_path"`
23506    new_path="$unix_path"
23507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23509    new_path="$unix_path"
23510  fi
23511
23512  if test "x$path" != "x$new_path"; then
23513    BOOT_JDK="$new_path"
23514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23516  fi
23517
23518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23520
23521  else
23522    # We're on a unix platform. Hooray! :)
23523    path="$BOOT_JDK"
23524    has_space=`$ECHO "$path" | $GREP " "`
23525    if test "x$has_space" != x; then
23526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23528      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23529    fi
23530
23531    # Use eval to expand a potential ~
23532    eval path="$path"
23533    if test ! -f "$path" && test ! -d "$path"; then
23534      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23535    fi
23536
23537    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23538  fi
23539
23540            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23541$as_echo_n "checking for Boot JDK... " >&6; }
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23543$as_echo "$BOOT_JDK" >&6; }
23544            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23545$as_echo_n "checking Boot JDK version... " >&6; }
23546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23548$as_echo "$BOOT_JDK_VERSION" >&6; }
23549          fi # end check jdk version
23550        fi # end check javac
23551      fi # end check java
23552    fi # end check boot jdk found
23553  fi
23554
23555    done
23556  fi
23557
23558  fi
23559
23560
23561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23563      # Do we have a bin/java?
23564      if test ! -x "$BOOT_JDK/bin/java"; then
23565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23567        BOOT_JDK_FOUND=no
23568      else
23569        # Do we have a bin/javac?
23570        if test ! -x "$BOOT_JDK/bin/javac"; then
23571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23575          BOOT_JDK_FOUND=no
23576        else
23577          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23578          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23579
23580          # Extra M4 quote needed to protect [] in grep expression.
23581          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23582          if test "x$FOUND_CORRECT_VERSION" = x; then
23583            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23585            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23586$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23587            BOOT_JDK_FOUND=no
23588          else
23589            # We're done! :-)
23590            BOOT_JDK_FOUND=yes
23591
23592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23593
23594  # Input might be given as Windows format, start by converting to
23595  # unix format.
23596  path="$BOOT_JDK"
23597  new_path=`$CYGPATH -u "$path"`
23598
23599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23602  # "foo.exe" is OK but "foo" is an error.
23603  #
23604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23605  # It is also a way to make sure we got the proper file name for the real test later on.
23606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23607  if test "x$test_shortpath" = x; then
23608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23611  fi
23612
23613  # Call helper function which possibly converts this using DOS-style short mode.
23614  # If so, the updated path is stored in $new_path.
23615
23616  input_path="$new_path"
23617  # Check if we need to convert this using DOS-style short mode. If the path
23618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23619  # take no chances and rewrite it.
23620  # Note: m4 eats our [], so we need to use [ and ] instead.
23621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23622  if test "x$has_forbidden_chars" != x; then
23623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23627      # Going to short mode and back again did indeed matter. Since short mode is
23628      # case insensitive, let's make it lowercase to improve readability.
23629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23630      # Now convert it back to Unix-stile (cygpath)
23631      input_path=`$CYGPATH -u "$shortmode_path"`
23632      new_path="$input_path"
23633    fi
23634  fi
23635
23636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23637  if test "x$test_cygdrive_prefix" = x; then
23638    # As a simple fix, exclude /usr/bin since it's not a real path.
23639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23641      # a path prefixed by /cygdrive for fixpath to work.
23642      new_path="$CYGWIN_ROOT_PATH$input_path"
23643    fi
23644  fi
23645
23646
23647  if test "x$path" != "x$new_path"; then
23648    BOOT_JDK="$new_path"
23649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23651  fi
23652
23653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23654
23655  path="$BOOT_JDK"
23656  has_colon=`$ECHO $path | $GREP ^.:`
23657  new_path="$path"
23658  if test "x$has_colon" = x; then
23659    # Not in mixed or Windows style, start by that.
23660    new_path=`cmd //c echo $path`
23661  fi
23662
23663
23664  input_path="$new_path"
23665  # Check if we need to convert this using DOS-style short mode. If the path
23666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23667  # take no chances and rewrite it.
23668  # Note: m4 eats our [], so we need to use [ and ] instead.
23669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23670  if test "x$has_forbidden_chars" != x; then
23671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23673  fi
23674
23675
23676  windows_path="$new_path"
23677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678    unix_path=`$CYGPATH -u "$windows_path"`
23679    new_path="$unix_path"
23680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23682    new_path="$unix_path"
23683  fi
23684
23685  if test "x$path" != "x$new_path"; then
23686    BOOT_JDK="$new_path"
23687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23689  fi
23690
23691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23693
23694  else
23695    # We're on a unix platform. Hooray! :)
23696    path="$BOOT_JDK"
23697    has_space=`$ECHO "$path" | $GREP " "`
23698    if test "x$has_space" != x; then
23699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23701      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23702    fi
23703
23704    # Use eval to expand a potential ~
23705    eval path="$path"
23706    if test ! -f "$path" && test ! -d "$path"; then
23707      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23708    fi
23709
23710    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23711  fi
23712
23713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23714$as_echo_n "checking for Boot JDK... " >&6; }
23715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23716$as_echo "$BOOT_JDK" >&6; }
23717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23718$as_echo_n "checking Boot JDK version... " >&6; }
23719            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23721$as_echo "$BOOT_JDK_VERSION" >&6; }
23722          fi # end check jdk version
23723        fi # end check javac
23724      fi # end check java
23725    fi # end check boot jdk found
23726  fi
23727
23728
23729  if test "x$BOOT_JDK_FOUND" = xno; then
23730    # Now execute the test
23731
23732  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23733  BOOT_JDK_SUFFIX=""
23734  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23735  if test "x$ALL_JDKS_FOUND" != x; then
23736    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23737
23738  if test "x$BOOT_JDK_FOUND" = xno; then
23739    # Now execute the test
23740
23741        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23742        if test -d "$BOOT_JDK"; then
23743          BOOT_JDK_FOUND=maybe
23744          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23745$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23746        fi
23747
23748
23749    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23750    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23751      # Do we have a bin/java?
23752      if test ! -x "$BOOT_JDK/bin/java"; then
23753        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23755        BOOT_JDK_FOUND=no
23756      else
23757        # Do we have a bin/javac?
23758        if test ! -x "$BOOT_JDK/bin/javac"; then
23759          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23761          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23762$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23763          BOOT_JDK_FOUND=no
23764        else
23765          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23766          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23767
23768          # Extra M4 quote needed to protect [] in grep expression.
23769          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23770          if test "x$FOUND_CORRECT_VERSION" = x; then
23771            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23773            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23774$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23775            BOOT_JDK_FOUND=no
23776          else
23777            # We're done! :-)
23778            BOOT_JDK_FOUND=yes
23779
23780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23781
23782  # Input might be given as Windows format, start by converting to
23783  # unix format.
23784  path="$BOOT_JDK"
23785  new_path=`$CYGPATH -u "$path"`
23786
23787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23790  # "foo.exe" is OK but "foo" is an error.
23791  #
23792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23793  # It is also a way to make sure we got the proper file name for the real test later on.
23794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23795  if test "x$test_shortpath" = x; then
23796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23798    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23799  fi
23800
23801  # Call helper function which possibly converts this using DOS-style short mode.
23802  # If so, the updated path is stored in $new_path.
23803
23804  input_path="$new_path"
23805  # Check if we need to convert this using DOS-style short mode. If the path
23806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23807  # take no chances and rewrite it.
23808  # Note: m4 eats our [], so we need to use [ and ] instead.
23809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23810  if test "x$has_forbidden_chars" != x; then
23811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23815      # Going to short mode and back again did indeed matter. Since short mode is
23816      # case insensitive, let's make it lowercase to improve readability.
23817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23818      # Now convert it back to Unix-stile (cygpath)
23819      input_path=`$CYGPATH -u "$shortmode_path"`
23820      new_path="$input_path"
23821    fi
23822  fi
23823
23824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23825  if test "x$test_cygdrive_prefix" = x; then
23826    # As a simple fix, exclude /usr/bin since it's not a real path.
23827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23829      # a path prefixed by /cygdrive for fixpath to work.
23830      new_path="$CYGWIN_ROOT_PATH$input_path"
23831    fi
23832  fi
23833
23834
23835  if test "x$path" != "x$new_path"; then
23836    BOOT_JDK="$new_path"
23837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23839  fi
23840
23841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23842
23843  path="$BOOT_JDK"
23844  has_colon=`$ECHO $path | $GREP ^.:`
23845  new_path="$path"
23846  if test "x$has_colon" = x; then
23847    # Not in mixed or Windows style, start by that.
23848    new_path=`cmd //c echo $path`
23849  fi
23850
23851
23852  input_path="$new_path"
23853  # Check if we need to convert this using DOS-style short mode. If the path
23854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23855  # take no chances and rewrite it.
23856  # Note: m4 eats our [], so we need to use [ and ] instead.
23857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23858  if test "x$has_forbidden_chars" != x; then
23859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23861  fi
23862
23863
23864  windows_path="$new_path"
23865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23866    unix_path=`$CYGPATH -u "$windows_path"`
23867    new_path="$unix_path"
23868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23870    new_path="$unix_path"
23871  fi
23872
23873  if test "x$path" != "x$new_path"; then
23874    BOOT_JDK="$new_path"
23875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23877  fi
23878
23879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23881
23882  else
23883    # We're on a unix platform. Hooray! :)
23884    path="$BOOT_JDK"
23885    has_space=`$ECHO "$path" | $GREP " "`
23886    if test "x$has_space" != x; then
23887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23890    fi
23891
23892    # Use eval to expand a potential ~
23893    eval path="$path"
23894    if test ! -f "$path" && test ! -d "$path"; then
23895      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23896    fi
23897
23898    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23899  fi
23900
23901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23902$as_echo_n "checking for Boot JDK... " >&6; }
23903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23904$as_echo "$BOOT_JDK" >&6; }
23905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23906$as_echo_n "checking Boot JDK version... " >&6; }
23907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23909$as_echo "$BOOT_JDK_VERSION" >&6; }
23910          fi # end check jdk version
23911        fi # end check javac
23912      fi # end check java
23913    fi # end check boot jdk found
23914  fi
23915
23916    done
23917  fi
23918
23919
23920    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23921    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23922      # Do we have a bin/java?
23923      if test ! -x "$BOOT_JDK/bin/java"; then
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23926        BOOT_JDK_FOUND=no
23927      else
23928        # Do we have a bin/javac?
23929        if test ! -x "$BOOT_JDK/bin/javac"; then
23930          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23932          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23933$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23934          BOOT_JDK_FOUND=no
23935        else
23936          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23937          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23938
23939          # Extra M4 quote needed to protect [] in grep expression.
23940          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23941          if test "x$FOUND_CORRECT_VERSION" = x; then
23942            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23944            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23945$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23946            BOOT_JDK_FOUND=no
23947          else
23948            # We're done! :-)
23949            BOOT_JDK_FOUND=yes
23950
23951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23952
23953  # Input might be given as Windows format, start by converting to
23954  # unix format.
23955  path="$BOOT_JDK"
23956  new_path=`$CYGPATH -u "$path"`
23957
23958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23961  # "foo.exe" is OK but "foo" is an error.
23962  #
23963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23964  # It is also a way to make sure we got the proper file name for the real test later on.
23965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23966  if test "x$test_shortpath" = x; then
23967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23969    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23970  fi
23971
23972  # Call helper function which possibly converts this using DOS-style short mode.
23973  # If so, the updated path is stored in $new_path.
23974
23975  input_path="$new_path"
23976  # Check if we need to convert this using DOS-style short mode. If the path
23977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23978  # take no chances and rewrite it.
23979  # Note: m4 eats our [], so we need to use [ and ] instead.
23980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23981  if test "x$has_forbidden_chars" != x; then
23982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23986      # Going to short mode and back again did indeed matter. Since short mode is
23987      # case insensitive, let's make it lowercase to improve readability.
23988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23989      # Now convert it back to Unix-stile (cygpath)
23990      input_path=`$CYGPATH -u "$shortmode_path"`
23991      new_path="$input_path"
23992    fi
23993  fi
23994
23995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23996  if test "x$test_cygdrive_prefix" = x; then
23997    # As a simple fix, exclude /usr/bin since it's not a real path.
23998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24000      # a path prefixed by /cygdrive for fixpath to work.
24001      new_path="$CYGWIN_ROOT_PATH$input_path"
24002    fi
24003  fi
24004
24005
24006  if test "x$path" != "x$new_path"; then
24007    BOOT_JDK="$new_path"
24008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24010  fi
24011
24012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24013
24014  path="$BOOT_JDK"
24015  has_colon=`$ECHO $path | $GREP ^.:`
24016  new_path="$path"
24017  if test "x$has_colon" = x; then
24018    # Not in mixed or Windows style, start by that.
24019    new_path=`cmd //c echo $path`
24020  fi
24021
24022
24023  input_path="$new_path"
24024  # Check if we need to convert this using DOS-style short mode. If the path
24025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24026  # take no chances and rewrite it.
24027  # Note: m4 eats our [], so we need to use [ and ] instead.
24028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24029  if test "x$has_forbidden_chars" != x; then
24030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24032  fi
24033
24034
24035  windows_path="$new_path"
24036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24037    unix_path=`$CYGPATH -u "$windows_path"`
24038    new_path="$unix_path"
24039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24041    new_path="$unix_path"
24042  fi
24043
24044  if test "x$path" != "x$new_path"; then
24045    BOOT_JDK="$new_path"
24046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24048  fi
24049
24050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24052
24053  else
24054    # We're on a unix platform. Hooray! :)
24055    path="$BOOT_JDK"
24056    has_space=`$ECHO "$path" | $GREP " "`
24057    if test "x$has_space" != x; then
24058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24060      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24061    fi
24062
24063    # Use eval to expand a potential ~
24064    eval path="$path"
24065    if test ! -f "$path" && test ! -d "$path"; then
24066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24067    fi
24068
24069    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24070  fi
24071
24072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24073$as_echo_n "checking for Boot JDK... " >&6; }
24074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24075$as_echo "$BOOT_JDK" >&6; }
24076            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24077$as_echo_n "checking Boot JDK version... " >&6; }
24078            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24080$as_echo "$BOOT_JDK_VERSION" >&6; }
24081          fi # end check jdk version
24082        fi # end check javac
24083      fi # end check java
24084    fi # end check boot jdk found
24085  fi
24086
24087  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24088
24089  if test "x$BOOT_JDK_FOUND" = xno; then
24090    # Now execute the test
24091
24092  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24093  BOOT_JDK_SUFFIX="/Contents/Home"
24094  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24095  if test "x$ALL_JDKS_FOUND" != x; then
24096    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24097
24098  if test "x$BOOT_JDK_FOUND" = xno; then
24099    # Now execute the test
24100
24101        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24102        if test -d "$BOOT_JDK"; then
24103          BOOT_JDK_FOUND=maybe
24104          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24105$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24106        fi
24107
24108
24109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24111      # Do we have a bin/java?
24112      if test ! -x "$BOOT_JDK/bin/java"; then
24113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24115        BOOT_JDK_FOUND=no
24116      else
24117        # Do we have a bin/javac?
24118        if test ! -x "$BOOT_JDK/bin/javac"; then
24119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24123          BOOT_JDK_FOUND=no
24124        else
24125          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24126          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24127
24128          # Extra M4 quote needed to protect [] in grep expression.
24129          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24130          if test "x$FOUND_CORRECT_VERSION" = x; then
24131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24133            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24134$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24135            BOOT_JDK_FOUND=no
24136          else
24137            # We're done! :-)
24138            BOOT_JDK_FOUND=yes
24139
24140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24141
24142  # Input might be given as Windows format, start by converting to
24143  # unix format.
24144  path="$BOOT_JDK"
24145  new_path=`$CYGPATH -u "$path"`
24146
24147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24150  # "foo.exe" is OK but "foo" is an error.
24151  #
24152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24153  # It is also a way to make sure we got the proper file name for the real test later on.
24154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24155  if test "x$test_shortpath" = x; then
24156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24158    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24159  fi
24160
24161  # Call helper function which possibly converts this using DOS-style short mode.
24162  # If so, the updated path is stored in $new_path.
24163
24164  input_path="$new_path"
24165  # Check if we need to convert this using DOS-style short mode. If the path
24166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24167  # take no chances and rewrite it.
24168  # Note: m4 eats our [], so we need to use [ and ] instead.
24169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24170  if test "x$has_forbidden_chars" != x; then
24171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24175      # Going to short mode and back again did indeed matter. Since short mode is
24176      # case insensitive, let's make it lowercase to improve readability.
24177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24178      # Now convert it back to Unix-stile (cygpath)
24179      input_path=`$CYGPATH -u "$shortmode_path"`
24180      new_path="$input_path"
24181    fi
24182  fi
24183
24184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24185  if test "x$test_cygdrive_prefix" = x; then
24186    # As a simple fix, exclude /usr/bin since it's not a real path.
24187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24189      # a path prefixed by /cygdrive for fixpath to work.
24190      new_path="$CYGWIN_ROOT_PATH$input_path"
24191    fi
24192  fi
24193
24194
24195  if test "x$path" != "x$new_path"; then
24196    BOOT_JDK="$new_path"
24197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24199  fi
24200
24201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24202
24203  path="$BOOT_JDK"
24204  has_colon=`$ECHO $path | $GREP ^.:`
24205  new_path="$path"
24206  if test "x$has_colon" = x; then
24207    # Not in mixed or Windows style, start by that.
24208    new_path=`cmd //c echo $path`
24209  fi
24210
24211
24212  input_path="$new_path"
24213  # Check if we need to convert this using DOS-style short mode. If the path
24214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24215  # take no chances and rewrite it.
24216  # Note: m4 eats our [], so we need to use [ and ] instead.
24217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24218  if test "x$has_forbidden_chars" != x; then
24219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24221  fi
24222
24223
24224  windows_path="$new_path"
24225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24226    unix_path=`$CYGPATH -u "$windows_path"`
24227    new_path="$unix_path"
24228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24230    new_path="$unix_path"
24231  fi
24232
24233  if test "x$path" != "x$new_path"; then
24234    BOOT_JDK="$new_path"
24235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24237  fi
24238
24239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24241
24242  else
24243    # We're on a unix platform. Hooray! :)
24244    path="$BOOT_JDK"
24245    has_space=`$ECHO "$path" | $GREP " "`
24246    if test "x$has_space" != x; then
24247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24248$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24249      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24250    fi
24251
24252    # Use eval to expand a potential ~
24253    eval path="$path"
24254    if test ! -f "$path" && test ! -d "$path"; then
24255      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24256    fi
24257
24258    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24259  fi
24260
24261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24262$as_echo_n "checking for Boot JDK... " >&6; }
24263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24264$as_echo "$BOOT_JDK" >&6; }
24265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24266$as_echo_n "checking Boot JDK version... " >&6; }
24267            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24269$as_echo "$BOOT_JDK_VERSION" >&6; }
24270          fi # end check jdk version
24271        fi # end check javac
24272      fi # end check java
24273    fi # end check boot jdk found
24274  fi
24275
24276    done
24277  fi
24278
24279
24280    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24281    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24282      # Do we have a bin/java?
24283      if test ! -x "$BOOT_JDK/bin/java"; then
24284        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24286        BOOT_JDK_FOUND=no
24287      else
24288        # Do we have a bin/javac?
24289        if test ! -x "$BOOT_JDK/bin/javac"; then
24290          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24292          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24293$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24294          BOOT_JDK_FOUND=no
24295        else
24296          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24297          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24298
24299          # Extra M4 quote needed to protect [] in grep expression.
24300          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24301          if test "x$FOUND_CORRECT_VERSION" = x; then
24302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24304            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24305$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24306            BOOT_JDK_FOUND=no
24307          else
24308            # We're done! :-)
24309            BOOT_JDK_FOUND=yes
24310
24311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24312
24313  # Input might be given as Windows format, start by converting to
24314  # unix format.
24315  path="$BOOT_JDK"
24316  new_path=`$CYGPATH -u "$path"`
24317
24318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24321  # "foo.exe" is OK but "foo" is an error.
24322  #
24323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24324  # It is also a way to make sure we got the proper file name for the real test later on.
24325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24326  if test "x$test_shortpath" = x; then
24327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24329    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24330  fi
24331
24332  # Call helper function which possibly converts this using DOS-style short mode.
24333  # If so, the updated path is stored in $new_path.
24334
24335  input_path="$new_path"
24336  # Check if we need to convert this using DOS-style short mode. If the path
24337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24338  # take no chances and rewrite it.
24339  # Note: m4 eats our [], so we need to use [ and ] instead.
24340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24341  if test "x$has_forbidden_chars" != x; then
24342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24346      # Going to short mode and back again did indeed matter. Since short mode is
24347      # case insensitive, let's make it lowercase to improve readability.
24348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24349      # Now convert it back to Unix-stile (cygpath)
24350      input_path=`$CYGPATH -u "$shortmode_path"`
24351      new_path="$input_path"
24352    fi
24353  fi
24354
24355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24356  if test "x$test_cygdrive_prefix" = x; then
24357    # As a simple fix, exclude /usr/bin since it's not a real path.
24358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24360      # a path prefixed by /cygdrive for fixpath to work.
24361      new_path="$CYGWIN_ROOT_PATH$input_path"
24362    fi
24363  fi
24364
24365
24366  if test "x$path" != "x$new_path"; then
24367    BOOT_JDK="$new_path"
24368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24370  fi
24371
24372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24373
24374  path="$BOOT_JDK"
24375  has_colon=`$ECHO $path | $GREP ^.:`
24376  new_path="$path"
24377  if test "x$has_colon" = x; then
24378    # Not in mixed or Windows style, start by that.
24379    new_path=`cmd //c echo $path`
24380  fi
24381
24382
24383  input_path="$new_path"
24384  # Check if we need to convert this using DOS-style short mode. If the path
24385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24386  # take no chances and rewrite it.
24387  # Note: m4 eats our [], so we need to use [ and ] instead.
24388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24389  if test "x$has_forbidden_chars" != x; then
24390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24392  fi
24393
24394
24395  windows_path="$new_path"
24396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24397    unix_path=`$CYGPATH -u "$windows_path"`
24398    new_path="$unix_path"
24399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24401    new_path="$unix_path"
24402  fi
24403
24404  if test "x$path" != "x$new_path"; then
24405    BOOT_JDK="$new_path"
24406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24408  fi
24409
24410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24412
24413  else
24414    # We're on a unix platform. Hooray! :)
24415    path="$BOOT_JDK"
24416    has_space=`$ECHO "$path" | $GREP " "`
24417    if test "x$has_space" != x; then
24418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24420      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24421    fi
24422
24423    # Use eval to expand a potential ~
24424    eval path="$path"
24425    if test ! -f "$path" && test ! -d "$path"; then
24426      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24427    fi
24428
24429    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24430  fi
24431
24432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24433$as_echo_n "checking for Boot JDK... " >&6; }
24434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24435$as_echo "$BOOT_JDK" >&6; }
24436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24437$as_echo_n "checking Boot JDK version... " >&6; }
24438            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24440$as_echo "$BOOT_JDK_VERSION" >&6; }
24441          fi # end check jdk version
24442        fi # end check javac
24443      fi # end check java
24444    fi # end check boot jdk found
24445  fi
24446
24447
24448  if test "x$BOOT_JDK_FOUND" = xno; then
24449    # Now execute the test
24450
24451  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24452  BOOT_JDK_SUFFIX="/Contents/Home"
24453  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24454  if test "x$ALL_JDKS_FOUND" != x; then
24455    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24456
24457  if test "x$BOOT_JDK_FOUND" = xno; then
24458    # Now execute the test
24459
24460        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24461        if test -d "$BOOT_JDK"; then
24462          BOOT_JDK_FOUND=maybe
24463          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24464$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24465        fi
24466
24467
24468    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24469    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24470      # Do we have a bin/java?
24471      if test ! -x "$BOOT_JDK/bin/java"; then
24472        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24474        BOOT_JDK_FOUND=no
24475      else
24476        # Do we have a bin/javac?
24477        if test ! -x "$BOOT_JDK/bin/javac"; then
24478          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24480          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24481$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24482          BOOT_JDK_FOUND=no
24483        else
24484          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24485          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24486
24487          # Extra M4 quote needed to protect [] in grep expression.
24488          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24489          if test "x$FOUND_CORRECT_VERSION" = x; then
24490            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24492            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24493$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24494            BOOT_JDK_FOUND=no
24495          else
24496            # We're done! :-)
24497            BOOT_JDK_FOUND=yes
24498
24499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24500
24501  # Input might be given as Windows format, start by converting to
24502  # unix format.
24503  path="$BOOT_JDK"
24504  new_path=`$CYGPATH -u "$path"`
24505
24506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24509  # "foo.exe" is OK but "foo" is an error.
24510  #
24511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24512  # It is also a way to make sure we got the proper file name for the real test later on.
24513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24514  if test "x$test_shortpath" = x; then
24515    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24516$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24517    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24518  fi
24519
24520  # Call helper function which possibly converts this using DOS-style short mode.
24521  # If so, the updated path is stored in $new_path.
24522
24523  input_path="$new_path"
24524  # Check if we need to convert this using DOS-style short mode. If the path
24525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24526  # take no chances and rewrite it.
24527  # Note: m4 eats our [], so we need to use [ and ] instead.
24528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24529  if test "x$has_forbidden_chars" != x; then
24530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24534      # Going to short mode and back again did indeed matter. Since short mode is
24535      # case insensitive, let's make it lowercase to improve readability.
24536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24537      # Now convert it back to Unix-stile (cygpath)
24538      input_path=`$CYGPATH -u "$shortmode_path"`
24539      new_path="$input_path"
24540    fi
24541  fi
24542
24543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24544  if test "x$test_cygdrive_prefix" = x; then
24545    # As a simple fix, exclude /usr/bin since it's not a real path.
24546    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24548      # a path prefixed by /cygdrive for fixpath to work.
24549      new_path="$CYGWIN_ROOT_PATH$input_path"
24550    fi
24551  fi
24552
24553
24554  if test "x$path" != "x$new_path"; then
24555    BOOT_JDK="$new_path"
24556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24557$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24558  fi
24559
24560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24561
24562  path="$BOOT_JDK"
24563  has_colon=`$ECHO $path | $GREP ^.:`
24564  new_path="$path"
24565  if test "x$has_colon" = x; then
24566    # Not in mixed or Windows style, start by that.
24567    new_path=`cmd //c echo $path`
24568  fi
24569
24570
24571  input_path="$new_path"
24572  # Check if we need to convert this using DOS-style short mode. If the path
24573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24574  # take no chances and rewrite it.
24575  # Note: m4 eats our [], so we need to use [ and ] instead.
24576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24577  if test "x$has_forbidden_chars" != x; then
24578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24580  fi
24581
24582
24583  windows_path="$new_path"
24584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24585    unix_path=`$CYGPATH -u "$windows_path"`
24586    new_path="$unix_path"
24587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24589    new_path="$unix_path"
24590  fi
24591
24592  if test "x$path" != "x$new_path"; then
24593    BOOT_JDK="$new_path"
24594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24596  fi
24597
24598  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24599  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24600
24601  else
24602    # We're on a unix platform. Hooray! :)
24603    path="$BOOT_JDK"
24604    has_space=`$ECHO "$path" | $GREP " "`
24605    if test "x$has_space" != x; then
24606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24608      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24609    fi
24610
24611    # Use eval to expand a potential ~
24612    eval path="$path"
24613    if test ! -f "$path" && test ! -d "$path"; then
24614      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24615    fi
24616
24617    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24618  fi
24619
24620            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24621$as_echo_n "checking for Boot JDK... " >&6; }
24622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24623$as_echo "$BOOT_JDK" >&6; }
24624            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24625$as_echo_n "checking Boot JDK version... " >&6; }
24626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24628$as_echo "$BOOT_JDK_VERSION" >&6; }
24629          fi # end check jdk version
24630        fi # end check javac
24631      fi # end check java
24632    fi # end check boot jdk found
24633  fi
24634
24635    done
24636  fi
24637
24638
24639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24641      # Do we have a bin/java?
24642      if test ! -x "$BOOT_JDK/bin/java"; then
24643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24645        BOOT_JDK_FOUND=no
24646      else
24647        # Do we have a bin/javac?
24648        if test ! -x "$BOOT_JDK/bin/javac"; then
24649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24653          BOOT_JDK_FOUND=no
24654        else
24655          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24656          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24657
24658          # Extra M4 quote needed to protect [] in grep expression.
24659          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24660          if test "x$FOUND_CORRECT_VERSION" = x; then
24661            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24663            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24664$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24665            BOOT_JDK_FOUND=no
24666          else
24667            # We're done! :-)
24668            BOOT_JDK_FOUND=yes
24669
24670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24671
24672  # Input might be given as Windows format, start by converting to
24673  # unix format.
24674  path="$BOOT_JDK"
24675  new_path=`$CYGPATH -u "$path"`
24676
24677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24680  # "foo.exe" is OK but "foo" is an error.
24681  #
24682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24683  # It is also a way to make sure we got the proper file name for the real test later on.
24684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24685  if test "x$test_shortpath" = x; then
24686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24688    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24689  fi
24690
24691  # Call helper function which possibly converts this using DOS-style short mode.
24692  # If so, the updated path is stored in $new_path.
24693
24694  input_path="$new_path"
24695  # Check if we need to convert this using DOS-style short mode. If the path
24696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24697  # take no chances and rewrite it.
24698  # Note: m4 eats our [], so we need to use [ and ] instead.
24699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24700  if test "x$has_forbidden_chars" != x; then
24701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24705      # Going to short mode and back again did indeed matter. Since short mode is
24706      # case insensitive, let's make it lowercase to improve readability.
24707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24708      # Now convert it back to Unix-stile (cygpath)
24709      input_path=`$CYGPATH -u "$shortmode_path"`
24710      new_path="$input_path"
24711    fi
24712  fi
24713
24714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24715  if test "x$test_cygdrive_prefix" = x; then
24716    # As a simple fix, exclude /usr/bin since it's not a real path.
24717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24719      # a path prefixed by /cygdrive for fixpath to work.
24720      new_path="$CYGWIN_ROOT_PATH$input_path"
24721    fi
24722  fi
24723
24724
24725  if test "x$path" != "x$new_path"; then
24726    BOOT_JDK="$new_path"
24727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24729  fi
24730
24731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24732
24733  path="$BOOT_JDK"
24734  has_colon=`$ECHO $path | $GREP ^.:`
24735  new_path="$path"
24736  if test "x$has_colon" = x; then
24737    # Not in mixed or Windows style, start by that.
24738    new_path=`cmd //c echo $path`
24739  fi
24740
24741
24742  input_path="$new_path"
24743  # Check if we need to convert this using DOS-style short mode. If the path
24744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24745  # take no chances and rewrite it.
24746  # Note: m4 eats our [], so we need to use [ and ] instead.
24747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24748  if test "x$has_forbidden_chars" != x; then
24749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24751  fi
24752
24753
24754  windows_path="$new_path"
24755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24756    unix_path=`$CYGPATH -u "$windows_path"`
24757    new_path="$unix_path"
24758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24760    new_path="$unix_path"
24761  fi
24762
24763  if test "x$path" != "x$new_path"; then
24764    BOOT_JDK="$new_path"
24765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24767  fi
24768
24769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24771
24772  else
24773    # We're on a unix platform. Hooray! :)
24774    path="$BOOT_JDK"
24775    has_space=`$ECHO "$path" | $GREP " "`
24776    if test "x$has_space" != x; then
24777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24779      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24780    fi
24781
24782    # Use eval to expand a potential ~
24783    eval path="$path"
24784    if test ! -f "$path" && test ! -d "$path"; then
24785      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24786    fi
24787
24788    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24789  fi
24790
24791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24792$as_echo_n "checking for Boot JDK... " >&6; }
24793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24794$as_echo "$BOOT_JDK" >&6; }
24795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24796$as_echo_n "checking Boot JDK version... " >&6; }
24797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24799$as_echo "$BOOT_JDK_VERSION" >&6; }
24800          fi # end check jdk version
24801        fi # end check javac
24802      fi # end check java
24803    fi # end check boot jdk found
24804  fi
24805
24806  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24807
24808  if test "x$BOOT_JDK_FOUND" = xno; then
24809    # Now execute the test
24810
24811  BOOT_JDK_PREFIX="/usr/lib/jvm"
24812  BOOT_JDK_SUFFIX=""
24813  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24814  if test "x$ALL_JDKS_FOUND" != x; then
24815    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24816
24817  if test "x$BOOT_JDK_FOUND" = xno; then
24818    # Now execute the test
24819
24820        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24821        if test -d "$BOOT_JDK"; then
24822          BOOT_JDK_FOUND=maybe
24823          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24824$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24825        fi
24826
24827
24828    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24829    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24830      # Do we have a bin/java?
24831      if test ! -x "$BOOT_JDK/bin/java"; then
24832        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24834        BOOT_JDK_FOUND=no
24835      else
24836        # Do we have a bin/javac?
24837        if test ! -x "$BOOT_JDK/bin/javac"; then
24838          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24840          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24841$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24842          BOOT_JDK_FOUND=no
24843        else
24844          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24845          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24846
24847          # Extra M4 quote needed to protect [] in grep expression.
24848          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24849          if test "x$FOUND_CORRECT_VERSION" = x; then
24850            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24852            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24853$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24854            BOOT_JDK_FOUND=no
24855          else
24856            # We're done! :-)
24857            BOOT_JDK_FOUND=yes
24858
24859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24860
24861  # Input might be given as Windows format, start by converting to
24862  # unix format.
24863  path="$BOOT_JDK"
24864  new_path=`$CYGPATH -u "$path"`
24865
24866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24869  # "foo.exe" is OK but "foo" is an error.
24870  #
24871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24872  # It is also a way to make sure we got the proper file name for the real test later on.
24873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24874  if test "x$test_shortpath" = x; then
24875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24878  fi
24879
24880  # Call helper function which possibly converts this using DOS-style short mode.
24881  # If so, the updated path is stored in $new_path.
24882
24883  input_path="$new_path"
24884  # Check if we need to convert this using DOS-style short mode. If the path
24885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24886  # take no chances and rewrite it.
24887  # Note: m4 eats our [], so we need to use [ and ] instead.
24888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24889  if test "x$has_forbidden_chars" != x; then
24890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24894      # Going to short mode and back again did indeed matter. Since short mode is
24895      # case insensitive, let's make it lowercase to improve readability.
24896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24897      # Now convert it back to Unix-stile (cygpath)
24898      input_path=`$CYGPATH -u "$shortmode_path"`
24899      new_path="$input_path"
24900    fi
24901  fi
24902
24903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24904  if test "x$test_cygdrive_prefix" = x; then
24905    # As a simple fix, exclude /usr/bin since it's not a real path.
24906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24908      # a path prefixed by /cygdrive for fixpath to work.
24909      new_path="$CYGWIN_ROOT_PATH$input_path"
24910    fi
24911  fi
24912
24913
24914  if test "x$path" != "x$new_path"; then
24915    BOOT_JDK="$new_path"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24918  fi
24919
24920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24921
24922  path="$BOOT_JDK"
24923  has_colon=`$ECHO $path | $GREP ^.:`
24924  new_path="$path"
24925  if test "x$has_colon" = x; then
24926    # Not in mixed or Windows style, start by that.
24927    new_path=`cmd //c echo $path`
24928  fi
24929
24930
24931  input_path="$new_path"
24932  # Check if we need to convert this using DOS-style short mode. If the path
24933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24934  # take no chances and rewrite it.
24935  # Note: m4 eats our [], so we need to use [ and ] instead.
24936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24937  if test "x$has_forbidden_chars" != x; then
24938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24940  fi
24941
24942
24943  windows_path="$new_path"
24944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24945    unix_path=`$CYGPATH -u "$windows_path"`
24946    new_path="$unix_path"
24947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24949    new_path="$unix_path"
24950  fi
24951
24952  if test "x$path" != "x$new_path"; then
24953    BOOT_JDK="$new_path"
24954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24956  fi
24957
24958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24960
24961  else
24962    # We're on a unix platform. Hooray! :)
24963    path="$BOOT_JDK"
24964    has_space=`$ECHO "$path" | $GREP " "`
24965    if test "x$has_space" != x; then
24966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24968      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24969    fi
24970
24971    # Use eval to expand a potential ~
24972    eval path="$path"
24973    if test ! -f "$path" && test ! -d "$path"; then
24974      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24975    fi
24976
24977    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24978  fi
24979
24980            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24981$as_echo_n "checking for Boot JDK... " >&6; }
24982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24983$as_echo "$BOOT_JDK" >&6; }
24984            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24985$as_echo_n "checking Boot JDK version... " >&6; }
24986            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24988$as_echo "$BOOT_JDK_VERSION" >&6; }
24989          fi # end check jdk version
24990        fi # end check javac
24991      fi # end check java
24992    fi # end check boot jdk found
24993  fi
24994
24995    done
24996  fi
24997
24998
24999    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25000    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25001      # Do we have a bin/java?
25002      if test ! -x "$BOOT_JDK/bin/java"; then
25003        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25005        BOOT_JDK_FOUND=no
25006      else
25007        # Do we have a bin/javac?
25008        if test ! -x "$BOOT_JDK/bin/javac"; then
25009          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25011          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25012$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25013          BOOT_JDK_FOUND=no
25014        else
25015          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25016          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25017
25018          # Extra M4 quote needed to protect [] in grep expression.
25019          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25020          if test "x$FOUND_CORRECT_VERSION" = x; then
25021            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25023            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25024$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25025            BOOT_JDK_FOUND=no
25026          else
25027            # We're done! :-)
25028            BOOT_JDK_FOUND=yes
25029
25030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25031
25032  # Input might be given as Windows format, start by converting to
25033  # unix format.
25034  path="$BOOT_JDK"
25035  new_path=`$CYGPATH -u "$path"`
25036
25037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25040  # "foo.exe" is OK but "foo" is an error.
25041  #
25042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25043  # It is also a way to make sure we got the proper file name for the real test later on.
25044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25045  if test "x$test_shortpath" = x; then
25046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25049  fi
25050
25051  # Call helper function which possibly converts this using DOS-style short mode.
25052  # If so, the updated path is stored in $new_path.
25053
25054  input_path="$new_path"
25055  # Check if we need to convert this using DOS-style short mode. If the path
25056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25057  # take no chances and rewrite it.
25058  # Note: m4 eats our [], so we need to use [ and ] instead.
25059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25060  if test "x$has_forbidden_chars" != x; then
25061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25065      # Going to short mode and back again did indeed matter. Since short mode is
25066      # case insensitive, let's make it lowercase to improve readability.
25067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25068      # Now convert it back to Unix-stile (cygpath)
25069      input_path=`$CYGPATH -u "$shortmode_path"`
25070      new_path="$input_path"
25071    fi
25072  fi
25073
25074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25075  if test "x$test_cygdrive_prefix" = x; then
25076    # As a simple fix, exclude /usr/bin since it's not a real path.
25077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25079      # a path prefixed by /cygdrive for fixpath to work.
25080      new_path="$CYGWIN_ROOT_PATH$input_path"
25081    fi
25082  fi
25083
25084
25085  if test "x$path" != "x$new_path"; then
25086    BOOT_JDK="$new_path"
25087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25089  fi
25090
25091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25092
25093  path="$BOOT_JDK"
25094  has_colon=`$ECHO $path | $GREP ^.:`
25095  new_path="$path"
25096  if test "x$has_colon" = x; then
25097    # Not in mixed or Windows style, start by that.
25098    new_path=`cmd //c echo $path`
25099  fi
25100
25101
25102  input_path="$new_path"
25103  # Check if we need to convert this using DOS-style short mode. If the path
25104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25105  # take no chances and rewrite it.
25106  # Note: m4 eats our [], so we need to use [ and ] instead.
25107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25108  if test "x$has_forbidden_chars" != x; then
25109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25111  fi
25112
25113
25114  windows_path="$new_path"
25115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25116    unix_path=`$CYGPATH -u "$windows_path"`
25117    new_path="$unix_path"
25118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25120    new_path="$unix_path"
25121  fi
25122
25123  if test "x$path" != "x$new_path"; then
25124    BOOT_JDK="$new_path"
25125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25127  fi
25128
25129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25131
25132  else
25133    # We're on a unix platform. Hooray! :)
25134    path="$BOOT_JDK"
25135    has_space=`$ECHO "$path" | $GREP " "`
25136    if test "x$has_space" != x; then
25137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25140    fi
25141
25142    # Use eval to expand a potential ~
25143    eval path="$path"
25144    if test ! -f "$path" && test ! -d "$path"; then
25145      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25146    fi
25147
25148    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25149  fi
25150
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25152$as_echo_n "checking for Boot JDK... " >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25154$as_echo "$BOOT_JDK" >&6; }
25155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25156$as_echo_n "checking Boot JDK version... " >&6; }
25157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25159$as_echo "$BOOT_JDK_VERSION" >&6; }
25160          fi # end check jdk version
25161        fi # end check javac
25162      fi # end check java
25163    fi # end check boot jdk found
25164  fi
25165
25166  fi
25167
25168
25169    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25170    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25171      # Do we have a bin/java?
25172      if test ! -x "$BOOT_JDK/bin/java"; then
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25175        BOOT_JDK_FOUND=no
25176      else
25177        # Do we have a bin/javac?
25178        if test ! -x "$BOOT_JDK/bin/javac"; then
25179          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25181          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25182$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25183          BOOT_JDK_FOUND=no
25184        else
25185          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25186          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25187
25188          # Extra M4 quote needed to protect [] in grep expression.
25189          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25190          if test "x$FOUND_CORRECT_VERSION" = x; then
25191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25193            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25194$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25195            BOOT_JDK_FOUND=no
25196          else
25197            # We're done! :-)
25198            BOOT_JDK_FOUND=yes
25199
25200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25201
25202  # Input might be given as Windows format, start by converting to
25203  # unix format.
25204  path="$BOOT_JDK"
25205  new_path=`$CYGPATH -u "$path"`
25206
25207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25210  # "foo.exe" is OK but "foo" is an error.
25211  #
25212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25213  # It is also a way to make sure we got the proper file name for the real test later on.
25214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25215  if test "x$test_shortpath" = x; then
25216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25218    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25219  fi
25220
25221  # Call helper function which possibly converts this using DOS-style short mode.
25222  # If so, the updated path is stored in $new_path.
25223
25224  input_path="$new_path"
25225  # Check if we need to convert this using DOS-style short mode. If the path
25226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25227  # take no chances and rewrite it.
25228  # Note: m4 eats our [], so we need to use [ and ] instead.
25229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25230  if test "x$has_forbidden_chars" != x; then
25231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25235      # Going to short mode and back again did indeed matter. Since short mode is
25236      # case insensitive, let's make it lowercase to improve readability.
25237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25238      # Now convert it back to Unix-stile (cygpath)
25239      input_path=`$CYGPATH -u "$shortmode_path"`
25240      new_path="$input_path"
25241    fi
25242  fi
25243
25244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25245  if test "x$test_cygdrive_prefix" = x; then
25246    # As a simple fix, exclude /usr/bin since it's not a real path.
25247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25249      # a path prefixed by /cygdrive for fixpath to work.
25250      new_path="$CYGWIN_ROOT_PATH$input_path"
25251    fi
25252  fi
25253
25254
25255  if test "x$path" != "x$new_path"; then
25256    BOOT_JDK="$new_path"
25257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25259  fi
25260
25261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25262
25263  path="$BOOT_JDK"
25264  has_colon=`$ECHO $path | $GREP ^.:`
25265  new_path="$path"
25266  if test "x$has_colon" = x; then
25267    # Not in mixed or Windows style, start by that.
25268    new_path=`cmd //c echo $path`
25269  fi
25270
25271
25272  input_path="$new_path"
25273  # Check if we need to convert this using DOS-style short mode. If the path
25274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25275  # take no chances and rewrite it.
25276  # Note: m4 eats our [], so we need to use [ and ] instead.
25277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25278  if test "x$has_forbidden_chars" != x; then
25279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25281  fi
25282
25283
25284  windows_path="$new_path"
25285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25286    unix_path=`$CYGPATH -u "$windows_path"`
25287    new_path="$unix_path"
25288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25290    new_path="$unix_path"
25291  fi
25292
25293  if test "x$path" != "x$new_path"; then
25294    BOOT_JDK="$new_path"
25295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25297  fi
25298
25299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25301
25302  else
25303    # We're on a unix platform. Hooray! :)
25304    path="$BOOT_JDK"
25305    has_space=`$ECHO "$path" | $GREP " "`
25306    if test "x$has_space" != x; then
25307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25309      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25310    fi
25311
25312    # Use eval to expand a potential ~
25313    eval path="$path"
25314    if test ! -f "$path" && test ! -d "$path"; then
25315      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25316    fi
25317
25318    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25319  fi
25320
25321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25322$as_echo_n "checking for Boot JDK... " >&6; }
25323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25324$as_echo "$BOOT_JDK" >&6; }
25325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25326$as_echo_n "checking Boot JDK version... " >&6; }
25327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25329$as_echo "$BOOT_JDK_VERSION" >&6; }
25330          fi # end check jdk version
25331        fi # end check javac
25332      fi # end check java
25333    fi # end check boot jdk found
25334  fi
25335
25336
25337  # If we haven't found anything yet, we've truly lost. Give up.
25338  if test "x$BOOT_JDK_FOUND" = xno; then
25339
25340  # Print a helpful message on how to acquire the necessary build dependency.
25341  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25342  MISSING_DEPENDENCY=openjdk
25343
25344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25345    cygwin_help $MISSING_DEPENDENCY
25346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25347    msys_help $MISSING_DEPENDENCY
25348  else
25349    PKGHANDLER_COMMAND=
25350
25351    case $PKGHANDLER in
25352      apt-get)
25353        apt_help     $MISSING_DEPENDENCY ;;
25354      yum)
25355        yum_help     $MISSING_DEPENDENCY ;;
25356      port)
25357        port_help    $MISSING_DEPENDENCY ;;
25358      pkgutil)
25359        pkgutil_help $MISSING_DEPENDENCY ;;
25360      pkgadd)
25361        pkgadd_help  $MISSING_DEPENDENCY ;;
25362    esac
25363
25364    if test "x$PKGHANDLER_COMMAND" != x; then
25365      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25366    fi
25367  fi
25368
25369    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25370$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25371    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25372$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25373    as_fn_error $? "Cannot continue" "$LINENO" 5
25374  fi
25375
25376
25377
25378  # Setup tools from the Boot JDK.
25379
25380  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25381
25382  # Publish this variable in the help.
25383
25384
25385  if test "x$JAVA" = x; then
25386    # The variable is not set by user, try to locate tool using the code snippet
25387
25388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25389$as_echo_n "checking for java in Boot JDK... " >&6; }
25390      JAVA=$BOOT_JDK/bin/java
25391      if test ! -x $JAVA; then
25392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25393$as_echo "not found" >&6; }
25394        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25395$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25396        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25397      fi
25398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25399$as_echo "ok" >&6; }
25400
25401
25402  else
25403    # The variable is set, but is it from the command line or the environment?
25404
25405    # Try to remove the string !JAVA! from our list.
25406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25408      # If it failed, the variable was not from the command line. Ignore it,
25409      # but warn the user (except for BASH, which is always set by the calling BASH).
25410      if test "xJAVA" != xBASH; then
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25412$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25413      fi
25414      # Try to locate tool using the code snippet
25415
25416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25417$as_echo_n "checking for java in Boot JDK... " >&6; }
25418      JAVA=$BOOT_JDK/bin/java
25419      if test ! -x $JAVA; then
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25421$as_echo "not found" >&6; }
25422        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25423$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25424        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25425      fi
25426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25427$as_echo "ok" >&6; }
25428
25429
25430    else
25431      # If it succeeded, then it was overridden by the user. We will use it
25432      # for the tool.
25433
25434      # First remove it from the list of overridden variables, so we can test
25435      # for unknown variables in the end.
25436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25437
25438      # Check if the provided tool contains a complete path.
25439      tool_specified="$JAVA"
25440      tool_basename="${tool_specified##*/}"
25441      if test "x$tool_basename" = "x$tool_specified"; then
25442        # A command without a complete path is provided, search $PATH.
25443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25444$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25445        # Extract the first word of "$tool_basename", so it can be a program name with args.
25446set dummy $tool_basename; ac_word=$2
25447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25448$as_echo_n "checking for $ac_word... " >&6; }
25449if ${ac_cv_path_JAVA+:} false; then :
25450  $as_echo_n "(cached) " >&6
25451else
25452  case $JAVA in
25453  [\\/]* | ?:[\\/]*)
25454  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25455  ;;
25456  *)
25457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25458for as_dir in $PATH
25459do
25460  IFS=$as_save_IFS
25461  test -z "$as_dir" && as_dir=.
25462    for ac_exec_ext in '' $ac_executable_extensions; do
25463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25464    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25466    break 2
25467  fi
25468done
25469  done
25470IFS=$as_save_IFS
25471
25472  ;;
25473esac
25474fi
25475JAVA=$ac_cv_path_JAVA
25476if test -n "$JAVA"; then
25477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25478$as_echo "$JAVA" >&6; }
25479else
25480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25481$as_echo "no" >&6; }
25482fi
25483
25484
25485        if test "x$JAVA" = x; then
25486          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25487        fi
25488      else
25489        # Otherwise we believe it is a complete path. Use it as it is.
25490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25491$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25493$as_echo_n "checking for JAVA... " >&6; }
25494        if test ! -x "$tool_specified"; then
25495          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25496$as_echo "not found" >&6; }
25497          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25498        fi
25499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25500$as_echo "$tool_specified" >&6; }
25501      fi
25502    fi
25503  fi
25504
25505
25506
25507  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25508
25509  # Publish this variable in the help.
25510
25511
25512  if test "x$JAVAC" = x; then
25513    # The variable is not set by user, try to locate tool using the code snippet
25514
25515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25516$as_echo_n "checking for javac in Boot JDK... " >&6; }
25517      JAVAC=$BOOT_JDK/bin/javac
25518      if test ! -x $JAVAC; then
25519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25520$as_echo "not found" >&6; }
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25522$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25523        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25524      fi
25525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25526$as_echo "ok" >&6; }
25527
25528
25529  else
25530    # The variable is set, but is it from the command line or the environment?
25531
25532    # Try to remove the string !JAVAC! from our list.
25533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25535      # If it failed, the variable was not from the command line. Ignore it,
25536      # but warn the user (except for BASH, which is always set by the calling BASH).
25537      if test "xJAVAC" != xBASH; then
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25539$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25540      fi
25541      # Try to locate tool using the code snippet
25542
25543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25544$as_echo_n "checking for javac in Boot JDK... " >&6; }
25545      JAVAC=$BOOT_JDK/bin/javac
25546      if test ! -x $JAVAC; then
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25548$as_echo "not found" >&6; }
25549        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25550$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25551        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25552      fi
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25554$as_echo "ok" >&6; }
25555
25556
25557    else
25558      # If it succeeded, then it was overridden by the user. We will use it
25559      # for the tool.
25560
25561      # First remove it from the list of overridden variables, so we can test
25562      # for unknown variables in the end.
25563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25564
25565      # Check if the provided tool contains a complete path.
25566      tool_specified="$JAVAC"
25567      tool_basename="${tool_specified##*/}"
25568      if test "x$tool_basename" = "x$tool_specified"; then
25569        # A command without a complete path is provided, search $PATH.
25570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25571$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25572        # Extract the first word of "$tool_basename", so it can be a program name with args.
25573set dummy $tool_basename; ac_word=$2
25574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25575$as_echo_n "checking for $ac_word... " >&6; }
25576if ${ac_cv_path_JAVAC+:} false; then :
25577  $as_echo_n "(cached) " >&6
25578else
25579  case $JAVAC in
25580  [\\/]* | ?:[\\/]*)
25581  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25582  ;;
25583  *)
25584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25585for as_dir in $PATH
25586do
25587  IFS=$as_save_IFS
25588  test -z "$as_dir" && as_dir=.
25589    for ac_exec_ext in '' $ac_executable_extensions; do
25590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25591    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25593    break 2
25594  fi
25595done
25596  done
25597IFS=$as_save_IFS
25598
25599  ;;
25600esac
25601fi
25602JAVAC=$ac_cv_path_JAVAC
25603if test -n "$JAVAC"; then
25604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25605$as_echo "$JAVAC" >&6; }
25606else
25607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25608$as_echo "no" >&6; }
25609fi
25610
25611
25612        if test "x$JAVAC" = x; then
25613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25614        fi
25615      else
25616        # Otherwise we believe it is a complete path. Use it as it is.
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25618$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25620$as_echo_n "checking for JAVAC... " >&6; }
25621        if test ! -x "$tool_specified"; then
25622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25623$as_echo "not found" >&6; }
25624          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25625        fi
25626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25627$as_echo "$tool_specified" >&6; }
25628      fi
25629    fi
25630  fi
25631
25632
25633
25634  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25635
25636  # Publish this variable in the help.
25637
25638
25639  if test "x$JAVAH" = x; then
25640    # The variable is not set by user, try to locate tool using the code snippet
25641
25642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25643$as_echo_n "checking for javah in Boot JDK... " >&6; }
25644      JAVAH=$BOOT_JDK/bin/javah
25645      if test ! -x $JAVAH; then
25646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25647$as_echo "not found" >&6; }
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25649$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25650        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25651      fi
25652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25653$as_echo "ok" >&6; }
25654
25655
25656  else
25657    # The variable is set, but is it from the command line or the environment?
25658
25659    # Try to remove the string !JAVAH! from our list.
25660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25662      # If it failed, the variable was not from the command line. Ignore it,
25663      # but warn the user (except for BASH, which is always set by the calling BASH).
25664      if test "xJAVAH" != xBASH; then
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25666$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25667      fi
25668      # Try to locate tool using the code snippet
25669
25670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25671$as_echo_n "checking for javah in Boot JDK... " >&6; }
25672      JAVAH=$BOOT_JDK/bin/javah
25673      if test ! -x $JAVAH; then
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25675$as_echo "not found" >&6; }
25676        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25677$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25678        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25679      fi
25680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25681$as_echo "ok" >&6; }
25682
25683
25684    else
25685      # If it succeeded, then it was overridden by the user. We will use it
25686      # for the tool.
25687
25688      # First remove it from the list of overridden variables, so we can test
25689      # for unknown variables in the end.
25690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25691
25692      # Check if the provided tool contains a complete path.
25693      tool_specified="$JAVAH"
25694      tool_basename="${tool_specified##*/}"
25695      if test "x$tool_basename" = "x$tool_specified"; then
25696        # A command without a complete path is provided, search $PATH.
25697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25698$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25699        # Extract the first word of "$tool_basename", so it can be a program name with args.
25700set dummy $tool_basename; ac_word=$2
25701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25702$as_echo_n "checking for $ac_word... " >&6; }
25703if ${ac_cv_path_JAVAH+:} false; then :
25704  $as_echo_n "(cached) " >&6
25705else
25706  case $JAVAH in
25707  [\\/]* | ?:[\\/]*)
25708  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25709  ;;
25710  *)
25711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25712for as_dir in $PATH
25713do
25714  IFS=$as_save_IFS
25715  test -z "$as_dir" && as_dir=.
25716    for ac_exec_ext in '' $ac_executable_extensions; do
25717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25718    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25720    break 2
25721  fi
25722done
25723  done
25724IFS=$as_save_IFS
25725
25726  ;;
25727esac
25728fi
25729JAVAH=$ac_cv_path_JAVAH
25730if test -n "$JAVAH"; then
25731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25732$as_echo "$JAVAH" >&6; }
25733else
25734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25735$as_echo "no" >&6; }
25736fi
25737
25738
25739        if test "x$JAVAH" = x; then
25740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25741        fi
25742      else
25743        # Otherwise we believe it is a complete path. Use it as it is.
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25745$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25747$as_echo_n "checking for JAVAH... " >&6; }
25748        if test ! -x "$tool_specified"; then
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25750$as_echo "not found" >&6; }
25751          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25752        fi
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25754$as_echo "$tool_specified" >&6; }
25755      fi
25756    fi
25757  fi
25758
25759
25760
25761  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25762
25763  # Publish this variable in the help.
25764
25765
25766  if test "x$JAR" = x; then
25767    # The variable is not set by user, try to locate tool using the code snippet
25768
25769      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25770$as_echo_n "checking for jar in Boot JDK... " >&6; }
25771      JAR=$BOOT_JDK/bin/jar
25772      if test ! -x $JAR; then
25773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25774$as_echo "not found" >&6; }
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25776$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25777        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25778      fi
25779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25780$as_echo "ok" >&6; }
25781
25782
25783  else
25784    # The variable is set, but is it from the command line or the environment?
25785
25786    # Try to remove the string !JAR! from our list.
25787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25789      # If it failed, the variable was not from the command line. Ignore it,
25790      # but warn the user (except for BASH, which is always set by the calling BASH).
25791      if test "xJAR" != xBASH; then
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25793$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25794      fi
25795      # Try to locate tool using the code snippet
25796
25797      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25798$as_echo_n "checking for jar in Boot JDK... " >&6; }
25799      JAR=$BOOT_JDK/bin/jar
25800      if test ! -x $JAR; then
25801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25802$as_echo "not found" >&6; }
25803        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25804$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25805        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25806      fi
25807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25808$as_echo "ok" >&6; }
25809
25810
25811    else
25812      # If it succeeded, then it was overridden by the user. We will use it
25813      # for the tool.
25814
25815      # First remove it from the list of overridden variables, so we can test
25816      # for unknown variables in the end.
25817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25818
25819      # Check if the provided tool contains a complete path.
25820      tool_specified="$JAR"
25821      tool_basename="${tool_specified##*/}"
25822      if test "x$tool_basename" = "x$tool_specified"; then
25823        # A command without a complete path is provided, search $PATH.
25824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25825$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25826        # Extract the first word of "$tool_basename", so it can be a program name with args.
25827set dummy $tool_basename; ac_word=$2
25828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25829$as_echo_n "checking for $ac_word... " >&6; }
25830if ${ac_cv_path_JAR+:} false; then :
25831  $as_echo_n "(cached) " >&6
25832else
25833  case $JAR in
25834  [\\/]* | ?:[\\/]*)
25835  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25836  ;;
25837  *)
25838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25839for as_dir in $PATH
25840do
25841  IFS=$as_save_IFS
25842  test -z "$as_dir" && as_dir=.
25843    for ac_exec_ext in '' $ac_executable_extensions; do
25844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25845    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25847    break 2
25848  fi
25849done
25850  done
25851IFS=$as_save_IFS
25852
25853  ;;
25854esac
25855fi
25856JAR=$ac_cv_path_JAR
25857if test -n "$JAR"; then
25858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25859$as_echo "$JAR" >&6; }
25860else
25861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25862$as_echo "no" >&6; }
25863fi
25864
25865
25866        if test "x$JAR" = x; then
25867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25868        fi
25869      else
25870        # Otherwise we believe it is a complete path. Use it as it is.
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25872$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25874$as_echo_n "checking for JAR... " >&6; }
25875        if test ! -x "$tool_specified"; then
25876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25877$as_echo "not found" >&6; }
25878          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25879        fi
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25881$as_echo "$tool_specified" >&6; }
25882      fi
25883    fi
25884  fi
25885
25886
25887
25888  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25889
25890  # Publish this variable in the help.
25891
25892
25893  if test "x$NATIVE2ASCII" = x; then
25894    # The variable is not set by user, try to locate tool using the code snippet
25895
25896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25897$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25898      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25899      if test ! -x $NATIVE2ASCII; then
25900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25901$as_echo "not found" >&6; }
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25903$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25904        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25905      fi
25906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25907$as_echo "ok" >&6; }
25908
25909
25910  else
25911    # The variable is set, but is it from the command line or the environment?
25912
25913    # Try to remove the string !NATIVE2ASCII! from our list.
25914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25916      # If it failed, the variable was not from the command line. Ignore it,
25917      # but warn the user (except for BASH, which is always set by the calling BASH).
25918      if test "xNATIVE2ASCII" != xBASH; then
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25920$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25921      fi
25922      # Try to locate tool using the code snippet
25923
25924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25925$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25926      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25927      if test ! -x $NATIVE2ASCII; then
25928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25929$as_echo "not found" >&6; }
25930        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25931$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25932        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25933      fi
25934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25935$as_echo "ok" >&6; }
25936
25937
25938    else
25939      # If it succeeded, then it was overridden by the user. We will use it
25940      # for the tool.
25941
25942      # First remove it from the list of overridden variables, so we can test
25943      # for unknown variables in the end.
25944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25945
25946      # Check if the provided tool contains a complete path.
25947      tool_specified="$NATIVE2ASCII"
25948      tool_basename="${tool_specified##*/}"
25949      if test "x$tool_basename" = "x$tool_specified"; then
25950        # A command without a complete path is provided, search $PATH.
25951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25952$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25953        # Extract the first word of "$tool_basename", so it can be a program name with args.
25954set dummy $tool_basename; ac_word=$2
25955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25956$as_echo_n "checking for $ac_word... " >&6; }
25957if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25958  $as_echo_n "(cached) " >&6
25959else
25960  case $NATIVE2ASCII in
25961  [\\/]* | ?:[\\/]*)
25962  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25963  ;;
25964  *)
25965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25966for as_dir in $PATH
25967do
25968  IFS=$as_save_IFS
25969  test -z "$as_dir" && as_dir=.
25970    for ac_exec_ext in '' $ac_executable_extensions; do
25971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25972    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25974    break 2
25975  fi
25976done
25977  done
25978IFS=$as_save_IFS
25979
25980  ;;
25981esac
25982fi
25983NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25984if test -n "$NATIVE2ASCII"; then
25985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25986$as_echo "$NATIVE2ASCII" >&6; }
25987else
25988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25989$as_echo "no" >&6; }
25990fi
25991
25992
25993        if test "x$NATIVE2ASCII" = x; then
25994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25995        fi
25996      else
25997        # Otherwise we believe it is a complete path. Use it as it is.
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25999$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26001$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26002        if test ! -x "$tool_specified"; then
26003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26004$as_echo "not found" >&6; }
26005          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26006        fi
26007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26008$as_echo "$tool_specified" >&6; }
26009      fi
26010    fi
26011  fi
26012
26013
26014
26015  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26016
26017  # Publish this variable in the help.
26018
26019
26020  if test "x$JARSIGNER" = x; then
26021    # The variable is not set by user, try to locate tool using the code snippet
26022
26023      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26024$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26025      JARSIGNER=$BOOT_JDK/bin/jarsigner
26026      if test ! -x $JARSIGNER; then
26027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26028$as_echo "not found" >&6; }
26029        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26030$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26031        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26032      fi
26033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26034$as_echo "ok" >&6; }
26035
26036
26037  else
26038    # The variable is set, but is it from the command line or the environment?
26039
26040    # Try to remove the string !JARSIGNER! from our list.
26041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26043      # If it failed, the variable was not from the command line. Ignore it,
26044      # but warn the user (except for BASH, which is always set by the calling BASH).
26045      if test "xJARSIGNER" != xBASH; then
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26047$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26048      fi
26049      # Try to locate tool using the code snippet
26050
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26052$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26053      JARSIGNER=$BOOT_JDK/bin/jarsigner
26054      if test ! -x $JARSIGNER; then
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26056$as_echo "not found" >&6; }
26057        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26058$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26059        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26060      fi
26061      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26062$as_echo "ok" >&6; }
26063
26064
26065    else
26066      # If it succeeded, then it was overridden by the user. We will use it
26067      # for the tool.
26068
26069      # First remove it from the list of overridden variables, so we can test
26070      # for unknown variables in the end.
26071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26072
26073      # Check if the provided tool contains a complete path.
26074      tool_specified="$JARSIGNER"
26075      tool_basename="${tool_specified##*/}"
26076      if test "x$tool_basename" = "x$tool_specified"; then
26077        # A command without a complete path is provided, search $PATH.
26078        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26079$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26080        # Extract the first word of "$tool_basename", so it can be a program name with args.
26081set dummy $tool_basename; ac_word=$2
26082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26083$as_echo_n "checking for $ac_word... " >&6; }
26084if ${ac_cv_path_JARSIGNER+:} false; then :
26085  $as_echo_n "(cached) " >&6
26086else
26087  case $JARSIGNER in
26088  [\\/]* | ?:[\\/]*)
26089  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26090  ;;
26091  *)
26092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26093for as_dir in $PATH
26094do
26095  IFS=$as_save_IFS
26096  test -z "$as_dir" && as_dir=.
26097    for ac_exec_ext in '' $ac_executable_extensions; do
26098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26099    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26101    break 2
26102  fi
26103done
26104  done
26105IFS=$as_save_IFS
26106
26107  ;;
26108esac
26109fi
26110JARSIGNER=$ac_cv_path_JARSIGNER
26111if test -n "$JARSIGNER"; then
26112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26113$as_echo "$JARSIGNER" >&6; }
26114else
26115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26116$as_echo "no" >&6; }
26117fi
26118
26119
26120        if test "x$JARSIGNER" = x; then
26121          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26122        fi
26123      else
26124        # Otherwise we believe it is a complete path. Use it as it is.
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26126$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26128$as_echo_n "checking for JARSIGNER... " >&6; }
26129        if test ! -x "$tool_specified"; then
26130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26131$as_echo "not found" >&6; }
26132          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26133        fi
26134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26135$as_echo "$tool_specified" >&6; }
26136      fi
26137    fi
26138  fi
26139
26140
26141
26142  # Finally, set some other options...
26143
26144  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26145  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26146
26147
26148
26149
26150###############################################################################
26151#
26152# Configure the sources to use. We can add or override individual directories.
26153#
26154###############################################################################
26155
26156
26157  # Where are the sources. Any of these can be overridden
26158  # using --with-override-corba and the likes.
26159  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26160  CORBA_TOPDIR="$SRC_ROOT/corba"
26161  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26162  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26163  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26164  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26165  JDK_TOPDIR="$SRC_ROOT/jdk"
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176  ###############################################################################
26177  #
26178  # Pickup additional source for a component from outside of the source root
26179  # or override source for a component.
26180  #
26181
26182# Check whether --with-add-source-root was given.
26183if test "${with_add_source_root+set}" = set; then :
26184  withval=$with_add_source_root;
26185fi
26186
26187
26188
26189# Check whether --with-override-source-root was given.
26190if test "${with_override_source_root+set}" = set; then :
26191  withval=$with_override_source_root;
26192fi
26193
26194
26195
26196# Check whether --with-adds-and-overrides was given.
26197if test "${with_adds_and_overrides+set}" = set; then :
26198  withval=$with_adds_and_overrides;
26199fi
26200
26201
26202  if test "x$with_adds_and_overrides" != x; then
26203    with_add_source_root="$with_adds_and_overrides/adds"
26204    with_override_source_root="$with_adds_and_overrides/overrides"
26205  fi
26206
26207  if test "x$with_add_source_root" != x; then
26208    if ! test -d $with_add_source_root; then
26209      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26210    fi
26211    CURDIR="$PWD"
26212    cd "$with_add_source_root"
26213    ADD_SRC_ROOT="`pwd`"
26214    cd "$CURDIR"
26215    # Verify that the addon source root does not have any root makefiles.
26216    # If it does, then it is usually an error, prevent this.
26217    if test -f $with_add_source_root/langtools/make/Makefile; then
26218      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26219    fi
26220    if test -f $with_add_source_root/corba/make/Makefile; then
26221      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26222    fi
26223    if test -f $with_add_source_root/jaxp/make/Makefile; then
26224      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26225    fi
26226    if test -f $with_add_source_root/jaxws/make/Makefile; then
26227      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26228    fi
26229    if test -f $with_add_source_root/hotspot/make/Makefile; then
26230      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26231    fi
26232    if test -f $with_add_source_root/nashorn/make/Makefile; then
26233      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26234    fi
26235    if test -f $with_add_source_root/jdk/make/Makefile; then
26236      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26237    fi
26238  fi
26239
26240
26241  if test "x$with_override_source_root" != x; then
26242    if ! test -d $with_override_source_root; then
26243      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26244    fi
26245    CURDIR="$PWD"
26246    cd "$with_override_source_root"
26247    OVERRIDE_SRC_ROOT="`pwd`"
26248    cd "$CURDIR"
26249    if test -f $with_override_source_root/langtools/make/Makefile; then
26250      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26251    fi
26252    if test -f $with_override_source_root/corba/make/Makefile; then
26253      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26254    fi
26255    if test -f $with_override_source_root/jaxp/make/Makefile; then
26256      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26257    fi
26258    if test -f $with_override_source_root/jaxws/make/Makefile; then
26259      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26260    fi
26261    if test -f $with_override_source_root/hotspot/make/Makefile; then
26262      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26263    fi
26264    if test -f $with_override_source_root/nashorn/make/Makefile; then
26265      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26266    fi
26267    if test -f $with_override_source_root/jdk/make/Makefile; then
26268      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26269    fi
26270  fi
26271
26272
26273  ###############################################################################
26274  #
26275  # Override a repo completely, this is used for example when you have 3 small
26276  # development sandboxes of the langtools sources and want to avoid having 3 full
26277  # OpenJDK sources checked out on disk.
26278  #
26279  # Assuming that the 3 langtools sandboxes are located here:
26280  # /home/fredrik/sandbox1/langtools
26281  # /home/fredrik/sandbox2/langtools
26282  # /home/fredrik/sandbox3/langtools
26283  #
26284  # From the source root you create build subdirs manually:
26285  #     mkdir -p build1 build2 build3
26286  # in each build directory run:
26287  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26288  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26289  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26290  #
26291
26292
26293# Check whether --with-override-langtools was given.
26294if test "${with_override_langtools+set}" = set; then :
26295  withval=$with_override_langtools;
26296fi
26297
26298
26299
26300# Check whether --with-override-corba was given.
26301if test "${with_override_corba+set}" = set; then :
26302  withval=$with_override_corba;
26303fi
26304
26305
26306
26307# Check whether --with-override-jaxp was given.
26308if test "${with_override_jaxp+set}" = set; then :
26309  withval=$with_override_jaxp;
26310fi
26311
26312
26313
26314# Check whether --with-override-jaxws was given.
26315if test "${with_override_jaxws+set}" = set; then :
26316  withval=$with_override_jaxws;
26317fi
26318
26319
26320
26321# Check whether --with-override-hotspot was given.
26322if test "${with_override_hotspot+set}" = set; then :
26323  withval=$with_override_hotspot;
26324fi
26325
26326
26327
26328# Check whether --with-override-nashorn was given.
26329if test "${with_override_nashorn+set}" = set; then :
26330  withval=$with_override_nashorn;
26331fi
26332
26333
26334
26335# Check whether --with-override-jdk was given.
26336if test "${with_override_jdk+set}" = set; then :
26337  withval=$with_override_jdk;
26338fi
26339
26340
26341  if test "x$with_override_langtools" != x; then
26342    CURDIR="$PWD"
26343    cd "$with_override_langtools"
26344    LANGTOOLS_TOPDIR="`pwd`"
26345    cd "$CURDIR"
26346    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26347      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26348    fi
26349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26350$as_echo_n "checking if langtools should be overridden... " >&6; }
26351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26352$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26353  fi
26354  if test "x$with_override_corba" != x; then
26355    CURDIR="$PWD"
26356    cd "$with_override_corba"
26357    CORBA_TOPDIR="`pwd`"
26358    cd "$CURDIR"
26359    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26360      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26361    fi
26362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26363$as_echo_n "checking if corba should be overridden... " >&6; }
26364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26365$as_echo "yes with $CORBA_TOPDIR" >&6; }
26366  fi
26367  if test "x$with_override_jaxp" != x; then
26368    CURDIR="$PWD"
26369    cd "$with_override_jaxp"
26370    JAXP_TOPDIR="`pwd`"
26371    cd "$CURDIR"
26372    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26373      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26374    fi
26375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26376$as_echo_n "checking if jaxp should be overridden... " >&6; }
26377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26378$as_echo "yes with $JAXP_TOPDIR" >&6; }
26379  fi
26380  if test "x$with_override_jaxws" != x; then
26381    CURDIR="$PWD"
26382    cd "$with_override_jaxws"
26383    JAXWS_TOPDIR="`pwd`"
26384    cd "$CURDIR"
26385    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26386      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26387    fi
26388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26389$as_echo_n "checking if jaxws should be overridden... " >&6; }
26390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26391$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26392  fi
26393  if test "x$with_override_hotspot" != x; then
26394    CURDIR="$PWD"
26395    cd "$with_override_hotspot"
26396    HOTSPOT_TOPDIR="`pwd`"
26397    cd "$CURDIR"
26398    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26399      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26400    fi
26401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26402$as_echo_n "checking if hotspot should be overridden... " >&6; }
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26404$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26405  fi
26406  if test "x$with_override_nashorn" != x; then
26407    CURDIR="$PWD"
26408    cd "$with_override_nashorn"
26409    NASHORN_TOPDIR="`pwd`"
26410    cd "$CURDIR"
26411    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26412      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26413    fi
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26415$as_echo_n "checking if nashorn should be overridden... " >&6; }
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26417$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26418  fi
26419  if test "x$with_override_jdk" != x; then
26420    CURDIR="$PWD"
26421    cd "$with_override_jdk"
26422    JDK_TOPDIR="`pwd`"
26423    cd "$CURDIR"
26424    if ! test -f $JDK_TOPDIR/make/Makefile; then
26425      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26426    fi
26427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26428$as_echo_n "checking if JDK should be overridden... " >&6; }
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26430$as_echo "yes with $JDK_TOPDIR" >&6; }
26431  fi
26432
26433
26434  BUILD_OUTPUT="$OUTPUT_ROOT"
26435
26436
26437  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26438  BUILD_HOTSPOT=true
26439
26440
26441
26442# Check whether --with-import-hotspot was given.
26443if test "${with_import_hotspot+set}" = set; then :
26444  withval=$with_import_hotspot;
26445fi
26446
26447  if test "x$with_import_hotspot" != x; then
26448    CURDIR="$PWD"
26449    cd "$with_import_hotspot"
26450    HOTSPOT_DIST="`pwd`"
26451    cd "$CURDIR"
26452    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26453      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26454    fi
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26456$as_echo_n "checking if hotspot should be imported... " >&6; }
26457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26458$as_echo "yes from $HOTSPOT_DIST" >&6; }
26459    BUILD_HOTSPOT=false
26460  fi
26461
26462  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26463
26464
26465###############################################################################
26466#
26467# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26468# native code.
26469#
26470###############################################################################
26471
26472# First determine the toolchain type (compiler family)
26473
26474
26475# Check whether --with-toolchain-type was given.
26476if test "${with_toolchain_type+set}" = set; then :
26477  withval=$with_toolchain_type;
26478fi
26479
26480
26481  # Use indirect variable referencing
26482  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26483  VALID_TOOLCHAINS=${!toolchain_var_name}
26484
26485  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26486    if test -n "$XCODEBUILD"; then
26487      # On Mac OS X, default toolchain to clang after Xcode 5
26488      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26489      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26490      if test $? -ne 0; then
26491        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26492      fi
26493      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26494          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26495          $CUT -f 1 -d .`
26496      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26497$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26498      if test $XCODE_MAJOR_VERSION -ge 5; then
26499          DEFAULT_TOOLCHAIN="clang"
26500      else
26501          DEFAULT_TOOLCHAIN="gcc"
26502      fi
26503    else
26504      # If Xcode is not installed, but the command line tools are
26505      # then we can't run xcodebuild. On these systems we should
26506      # default to clang
26507      DEFAULT_TOOLCHAIN="clang"
26508    fi
26509  else
26510    # First toolchain type in the list is the default
26511    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26512  fi
26513
26514  if test "x$with_toolchain_type" = xlist; then
26515    # List all toolchains
26516    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26517$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26518    for toolchain in $VALID_TOOLCHAINS; do
26519      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26520      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26521      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26522    done
26523
26524    exit 0
26525  elif test "x$with_toolchain_type" != x; then
26526    # User override; check that it is valid
26527    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26528      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26529$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26530      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26531$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26532      as_fn_error $? "Cannot continue." "$LINENO" 5
26533    fi
26534    TOOLCHAIN_TYPE=$with_toolchain_type
26535  else
26536    # No flag given, use default
26537    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26538  fi
26539
26540
26541  TOOLCHAIN_CC_BINARY_clang="clang"
26542  TOOLCHAIN_CC_BINARY_gcc="gcc"
26543  TOOLCHAIN_CC_BINARY_microsoft="cl"
26544  TOOLCHAIN_CC_BINARY_solstudio="cc"
26545  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26546
26547  TOOLCHAIN_CXX_BINARY_clang="clang++"
26548  TOOLCHAIN_CXX_BINARY_gcc="g++"
26549  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26550  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26551  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26552
26553  # Use indirect variable referencing
26554  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26555  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26556  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26557  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26558  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26559  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26560
26561
26562  # Define filename patterns
26563  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26564    LIBRARY_PREFIX=
26565    SHARED_LIBRARY_SUFFIX='.dll'
26566    STATIC_LIBRARY_SUFFIX='.lib'
26567    SHARED_LIBRARY='$1.dll'
26568    STATIC_LIBRARY='$1.lib'
26569    OBJ_SUFFIX='.obj'
26570    EXE_SUFFIX='.exe'
26571  else
26572    LIBRARY_PREFIX=lib
26573    SHARED_LIBRARY_SUFFIX='.so'
26574    STATIC_LIBRARY_SUFFIX='.a'
26575    SHARED_LIBRARY='lib$1.so'
26576    STATIC_LIBRARY='lib$1.a'
26577    OBJ_SUFFIX='.o'
26578    EXE_SUFFIX=''
26579    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26580      SHARED_LIBRARY='lib$1.dylib'
26581      SHARED_LIBRARY_SUFFIX='.dylib'
26582    fi
26583  fi
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26595    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26596$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26597  else
26598    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26599$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26600  fi
26601
26602
26603# Then detect the actual binaries needed
26604
26605  # FIXME: Is this needed?
26606  ac_ext=cpp
26607ac_cpp='$CXXCPP $CPPFLAGS'
26608ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26609ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26610ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26611
26612
26613  # Store the CFLAGS etc passed to the configure script.
26614  ORG_CFLAGS="$CFLAGS"
26615  ORG_CXXFLAGS="$CXXFLAGS"
26616  ORG_OBJCFLAGS="$OBJCFLAGS"
26617
26618  # On Windows, we need to detect the visual studio installation first.
26619  # This will change the PATH, but we need to keep that new PATH even
26620  # after toolchain detection is done, since the compiler (on x86) uses
26621  # it for DLL resolution in runtime.
26622  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26623
26624  # Store path to cygwin link.exe to help excluding it when searching for
26625  # VS linker. This must be done before changing the PATH when looking for VS.
26626  # Extract the first word of "link", so it can be a program name with args.
26627set dummy link; ac_word=$2
26628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26629$as_echo_n "checking for $ac_word... " >&6; }
26630if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26631  $as_echo_n "(cached) " >&6
26632else
26633  case $CYGWIN_LINK in
26634  [\\/]* | ?:[\\/]*)
26635  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26636  ;;
26637  *)
26638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26639for as_dir in $PATH
26640do
26641  IFS=$as_save_IFS
26642  test -z "$as_dir" && as_dir=.
26643    for ac_exec_ext in '' $ac_executable_extensions; do
26644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26645    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26647    break 2
26648  fi
26649done
26650  done
26651IFS=$as_save_IFS
26652
26653  ;;
26654esac
26655fi
26656CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26657if test -n "$CYGWIN_LINK"; then
26658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26659$as_echo "$CYGWIN_LINK" >&6; }
26660else
26661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26662$as_echo "no" >&6; }
26663fi
26664
26665
26666  if test "x$CYGWIN_LINK" != x; then
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26668$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26669    "$CYGWIN_LINK" --version > /dev/null
26670    if test $? -eq 0 ; then
26671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26672$as_echo "yes" >&6; }
26673    else
26674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26675$as_echo "no" >&6; }
26676      # This might be the VS linker. Don't exclude it later on.
26677      CYGWIN_LINK=""
26678    fi
26679  fi
26680
26681  # First-hand choice is to locate and run the vsvars bat file.
26682
26683  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26684    VCVARSFILE="vc/bin/vcvars32.bat"
26685  else
26686    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26687  fi
26688
26689  VS_ENV_CMD=""
26690  VS_ENV_ARGS=""
26691  if test "x$with_toolsdir" != x; then
26692
26693  if test "x$VS_ENV_CMD" = x; then
26694    VS100BASE="$with_toolsdir/../.."
26695    METHOD="--with-tools-dir"
26696
26697  windows_path="$VS100BASE"
26698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26699    unix_path=`$CYGPATH -u "$windows_path"`
26700    VS100BASE="$unix_path"
26701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26703    VS100BASE="$unix_path"
26704  fi
26705
26706    if test -d "$VS100BASE"; then
26707      if test -f "$VS100BASE/$VCVARSFILE"; then
26708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26709$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26710        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26711        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26712        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26713        # TODO: improve detection for other versions of VS
26714        PLATFORM_TOOLSET="v100"
26715      else
26716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26717$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26718        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26719$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26720      fi
26721    fi
26722  fi
26723
26724  fi
26725
26726  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26727    # Having specified an argument which is incorrect will produce an instant failure;
26728    # we should not go on looking
26729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26730$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26731    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26732$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26733    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26734  fi
26735
26736  if test "x$VS100COMNTOOLS" != x; then
26737
26738  if test "x$VS_ENV_CMD" = x; then
26739    VS100BASE="$VS100COMNTOOLS/../.."
26740    METHOD="VS100COMNTOOLS variable"
26741
26742  windows_path="$VS100BASE"
26743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26744    unix_path=`$CYGPATH -u "$windows_path"`
26745    VS100BASE="$unix_path"
26746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26748    VS100BASE="$unix_path"
26749  fi
26750
26751    if test -d "$VS100BASE"; then
26752      if test -f "$VS100BASE/$VCVARSFILE"; then
26753        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26754$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26755        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26756        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26757        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26758        # TODO: improve detection for other versions of VS
26759        PLATFORM_TOOLSET="v100"
26760      else
26761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26762$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26764$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26765      fi
26766    fi
26767  fi
26768
26769  fi
26770  if test "x$PROGRAMFILES" != x; then
26771
26772  if test "x$VS_ENV_CMD" = x; then
26773    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26774    METHOD="well-known name"
26775
26776  windows_path="$VS100BASE"
26777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26778    unix_path=`$CYGPATH -u "$windows_path"`
26779    VS100BASE="$unix_path"
26780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26782    VS100BASE="$unix_path"
26783  fi
26784
26785    if test -d "$VS100BASE"; then
26786      if test -f "$VS100BASE/$VCVARSFILE"; then
26787        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26788$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26789        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26790        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26791        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26792        # TODO: improve detection for other versions of VS
26793        PLATFORM_TOOLSET="v100"
26794      else
26795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26796$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26797        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26798$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26799      fi
26800    fi
26801  fi
26802
26803  fi
26804
26805  if test "x$VS_ENV_CMD" = x; then
26806    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26807    METHOD="well-known name"
26808
26809  windows_path="$VS100BASE"
26810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811    unix_path=`$CYGPATH -u "$windows_path"`
26812    VS100BASE="$unix_path"
26813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26815    VS100BASE="$unix_path"
26816  fi
26817
26818    if test -d "$VS100BASE"; then
26819      if test -f "$VS100BASE/$VCVARSFILE"; then
26820        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26821$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26822        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26823        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26824        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26825        # TODO: improve detection for other versions of VS
26826        PLATFORM_TOOLSET="v100"
26827      else
26828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26829$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26831$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26832      fi
26833    fi
26834  fi
26835
26836
26837  if test "x$VS_ENV_CMD" = x; then
26838    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26839    METHOD="well-known name"
26840
26841  windows_path="$VS100BASE"
26842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26843    unix_path=`$CYGPATH -u "$windows_path"`
26844    VS100BASE="$unix_path"
26845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26847    VS100BASE="$unix_path"
26848  fi
26849
26850    if test -d "$VS100BASE"; then
26851      if test -f "$VS100BASE/$VCVARSFILE"; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26853$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26854        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26855        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26856        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26857        # TODO: improve detection for other versions of VS
26858        PLATFORM_TOOLSET="v100"
26859      else
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26861$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26862        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26863$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26864      fi
26865    fi
26866  fi
26867
26868
26869  if test "x$ProgramW6432" != x; then
26870
26871  if test "x$VS_ENV_CMD" = x; then
26872    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26873    METHOD="well-known name"
26874
26875  windows_path="$WIN_SDK_BASE"
26876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26877    unix_path=`$CYGPATH -u "$windows_path"`
26878    WIN_SDK_BASE="$unix_path"
26879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26881    WIN_SDK_BASE="$unix_path"
26882  fi
26883
26884    if test -d "$WIN_SDK_BASE"; then
26885      # There have been cases of partial or broken SDK installations. A missing
26886      # lib dir is not going to work.
26887      if test ! -d "$WIN_SDK_BASE/../lib"; then
26888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26889$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26890        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26891$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26892      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26893        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26894$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26895        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26896        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26897          VS_ENV_ARGS="/x86"
26898        else
26899          VS_ENV_ARGS="/x64"
26900        fi
26901        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26902        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26903        # TODO: improve detection for other versions of SDK
26904        PLATFORM_TOOLSET="Windows7.1SDK"
26905      else
26906        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26907$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26909$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26910      fi
26911    fi
26912  fi
26913
26914  fi
26915  if test "x$PROGRAMW6432" != x; then
26916
26917  if test "x$VS_ENV_CMD" = x; then
26918    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26919    METHOD="well-known name"
26920
26921  windows_path="$WIN_SDK_BASE"
26922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26923    unix_path=`$CYGPATH -u "$windows_path"`
26924    WIN_SDK_BASE="$unix_path"
26925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26927    WIN_SDK_BASE="$unix_path"
26928  fi
26929
26930    if test -d "$WIN_SDK_BASE"; then
26931      # There have been cases of partial or broken SDK installations. A missing
26932      # lib dir is not going to work.
26933      if test ! -d "$WIN_SDK_BASE/../lib"; then
26934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26937$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26938      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26941        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26942        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26943          VS_ENV_ARGS="/x86"
26944        else
26945          VS_ENV_ARGS="/x64"
26946        fi
26947        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26948        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26949        # TODO: improve detection for other versions of SDK
26950        PLATFORM_TOOLSET="Windows7.1SDK"
26951      else
26952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26953$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26955$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26956      fi
26957    fi
26958  fi
26959
26960  fi
26961  if test "x$PROGRAMFILES" != x; then
26962
26963  if test "x$VS_ENV_CMD" = x; then
26964    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26965    METHOD="well-known name"
26966
26967  windows_path="$WIN_SDK_BASE"
26968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969    unix_path=`$CYGPATH -u "$windows_path"`
26970    WIN_SDK_BASE="$unix_path"
26971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26973    WIN_SDK_BASE="$unix_path"
26974  fi
26975
26976    if test -d "$WIN_SDK_BASE"; then
26977      # There have been cases of partial or broken SDK installations. A missing
26978      # lib dir is not going to work.
26979      if test ! -d "$WIN_SDK_BASE/../lib"; then
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26982        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26983$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26984      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26986$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26987        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26988        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26989          VS_ENV_ARGS="/x86"
26990        else
26991          VS_ENV_ARGS="/x64"
26992        fi
26993        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26994        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26995        # TODO: improve detection for other versions of SDK
26996        PLATFORM_TOOLSET="Windows7.1SDK"
26997      else
26998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27001$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27002      fi
27003    fi
27004  fi
27005
27006  fi
27007
27008  if test "x$VS_ENV_CMD" = x; then
27009    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27010    METHOD="well-known name"
27011
27012  windows_path="$WIN_SDK_BASE"
27013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014    unix_path=`$CYGPATH -u "$windows_path"`
27015    WIN_SDK_BASE="$unix_path"
27016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018    WIN_SDK_BASE="$unix_path"
27019  fi
27020
27021    if test -d "$WIN_SDK_BASE"; then
27022      # There have been cases of partial or broken SDK installations. A missing
27023      # lib dir is not going to work.
27024      if test ! -d "$WIN_SDK_BASE/../lib"; then
27025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27026$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27027        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27028$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27029      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27031$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27032        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27033        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27034          VS_ENV_ARGS="/x86"
27035        else
27036          VS_ENV_ARGS="/x64"
27037        fi
27038        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27039        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27040        # TODO: improve detection for other versions of SDK
27041        PLATFORM_TOOLSET="Windows7.1SDK"
27042      else
27043        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27044$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27045        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27046$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27047      fi
27048    fi
27049  fi
27050
27051
27052  if test "x$VS_ENV_CMD" = x; then
27053    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27054    METHOD="well-known name"
27055
27056  windows_path="$WIN_SDK_BASE"
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058    unix_path=`$CYGPATH -u "$windows_path"`
27059    WIN_SDK_BASE="$unix_path"
27060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062    WIN_SDK_BASE="$unix_path"
27063  fi
27064
27065    if test -d "$WIN_SDK_BASE"; then
27066      # There have been cases of partial or broken SDK installations. A missing
27067      # lib dir is not going to work.
27068      if test ! -d "$WIN_SDK_BASE/../lib"; then
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27072$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27073      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27075$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27076        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27077        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27078          VS_ENV_ARGS="/x86"
27079        else
27080          VS_ENV_ARGS="/x64"
27081        fi
27082        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27083        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27084        # TODO: improve detection for other versions of SDK
27085        PLATFORM_TOOLSET="Windows7.1SDK"
27086      else
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27088$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27090$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27091      fi
27092    fi
27093  fi
27094
27095
27096  if test "x$VS_ENV_CMD" != x; then
27097    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27098
27099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27100
27101  # First separate the path from the arguments. This will split at the first
27102  # space.
27103  complete="$VS_ENV_CMD"
27104  path="${complete%% *}"
27105  tmp="$complete EOL"
27106  arguments="${tmp#* }"
27107
27108  # Input might be given as Windows format, start by converting to
27109  # unix format.
27110  new_path=`$CYGPATH -u "$path"`
27111
27112  # Now try to locate executable using which
27113  new_path=`$WHICH "$new_path" 2> /dev/null`
27114  # bat and cmd files are not always considered executable in cygwin causing which
27115  # to not find them
27116  if test "x$new_path" = x \
27117      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27118      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27119    new_path=`$CYGPATH -u "$path"`
27120  fi
27121  if test "x$new_path" = x; then
27122    # Oops. Which didn't find the executable.
27123    # The splitting of arguments from the executable at a space might have been incorrect,
27124    # since paths with space are more likely in Windows. Give it another try with the whole
27125    # argument.
27126    path="$complete"
27127    arguments="EOL"
27128    new_path=`$CYGPATH -u "$path"`
27129    new_path=`$WHICH "$new_path" 2> /dev/null`
27130    # bat and cmd files are not always considered executable in cygwin causing which
27131    # to not find them
27132    if test "x$new_path" = x \
27133        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27134        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27135      new_path=`$CYGPATH -u "$path"`
27136    fi
27137    if test "x$new_path" = x; then
27138      # It's still not found. Now this is an unrecoverable error.
27139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27140$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27141      has_space=`$ECHO "$complete" | $GREP " "`
27142      if test "x$has_space" != x; then
27143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27145      fi
27146      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27147    fi
27148  fi
27149
27150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27153  # "foo.exe" is OK but "foo" is an error.
27154  #
27155  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27156  # It is also a way to make sure we got the proper file name for the real test later on.
27157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27158  if test "x$test_shortpath" = x; then
27159    # Short path failed, file does not exist as specified.
27160    # Try adding .exe or .cmd
27161    if test -f "${new_path}.exe"; then
27162      input_to_shortpath="${new_path}.exe"
27163    elif test -f "${new_path}.cmd"; then
27164      input_to_shortpath="${new_path}.cmd"
27165    else
27166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27167$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27170      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27171    fi
27172  else
27173    input_to_shortpath="$new_path"
27174  fi
27175
27176  # Call helper function which possibly converts this using DOS-style short mode.
27177  # If so, the updated path is stored in $new_path.
27178  new_path="$input_to_shortpath"
27179
27180  input_path="$input_to_shortpath"
27181  # Check if we need to convert this using DOS-style short mode. If the path
27182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27183  # take no chances and rewrite it.
27184  # Note: m4 eats our [], so we need to use [ and ] instead.
27185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27186  if test "x$has_forbidden_chars" != x; then
27187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27191      # Going to short mode and back again did indeed matter. Since short mode is
27192      # case insensitive, let's make it lowercase to improve readability.
27193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27194      # Now convert it back to Unix-stile (cygpath)
27195      input_path=`$CYGPATH -u "$shortmode_path"`
27196      new_path="$input_path"
27197    fi
27198  fi
27199
27200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27201  if test "x$test_cygdrive_prefix" = x; then
27202    # As a simple fix, exclude /usr/bin since it's not a real path.
27203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27205      # a path prefixed by /cygdrive for fixpath to work.
27206      new_path="$CYGWIN_ROOT_PATH$input_path"
27207    fi
27208  fi
27209
27210  # remove trailing .exe if any
27211  new_path="${new_path/%.exe/}"
27212
27213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27214
27215  # First separate the path from the arguments. This will split at the first
27216  # space.
27217  complete="$VS_ENV_CMD"
27218  path="${complete%% *}"
27219  tmp="$complete EOL"
27220  arguments="${tmp#* }"
27221
27222  # Input might be given as Windows format, start by converting to
27223  # unix format.
27224  new_path="$path"
27225
27226  windows_path="$new_path"
27227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27228    unix_path=`$CYGPATH -u "$windows_path"`
27229    new_path="$unix_path"
27230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27232    new_path="$unix_path"
27233  fi
27234
27235
27236  # Now try to locate executable using which
27237  new_path=`$WHICH "$new_path" 2> /dev/null`
27238
27239  if test "x$new_path" = x; then
27240    # Oops. Which didn't find the executable.
27241    # The splitting of arguments from the executable at a space might have been incorrect,
27242    # since paths with space are more likely in Windows. Give it another try with the whole
27243    # argument.
27244    path="$complete"
27245    arguments="EOL"
27246    new_path="$path"
27247
27248  windows_path="$new_path"
27249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27250    unix_path=`$CYGPATH -u "$windows_path"`
27251    new_path="$unix_path"
27252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27254    new_path="$unix_path"
27255  fi
27256
27257
27258    new_path=`$WHICH "$new_path" 2> /dev/null`
27259    # bat and cmd files are not always considered executable in MSYS causing which
27260    # to not find them
27261    if test "x$new_path" = x \
27262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27264      new_path="$path"
27265
27266  windows_path="$new_path"
27267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27268    unix_path=`$CYGPATH -u "$windows_path"`
27269    new_path="$unix_path"
27270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27272    new_path="$unix_path"
27273  fi
27274
27275    fi
27276
27277    if test "x$new_path" = x; then
27278      # It's still not found. Now this is an unrecoverable error.
27279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27280$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27281      has_space=`$ECHO "$complete" | $GREP " "`
27282      if test "x$has_space" != x; then
27283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27285      fi
27286      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27287    fi
27288  fi
27289
27290  # Now new_path has a complete unix path to the binary
27291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27292    # Keep paths in /bin as-is, but remove trailing .exe if any
27293    new_path="${new_path/%.exe/}"
27294    # Do not save /bin paths to all_fixpath_prefixes!
27295  else
27296    # Not in mixed or Windows style, start by that.
27297    new_path=`cmd //c echo $new_path`
27298
27299  input_path="$new_path"
27300  # Check if we need to convert this using DOS-style short mode. If the path
27301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27302  # take no chances and rewrite it.
27303  # Note: m4 eats our [], so we need to use [ and ] instead.
27304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27305  if test "x$has_forbidden_chars" != x; then
27306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27308  fi
27309
27310    # Output is in $new_path
27311
27312  windows_path="$new_path"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    new_path="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    new_path="$unix_path"
27319  fi
27320
27321    # remove trailing .exe if any
27322    new_path="${new_path/%.exe/}"
27323
27324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27326  fi
27327
27328  else
27329    # We're on a unix platform. Hooray! :)
27330    # First separate the path from the arguments. This will split at the first
27331    # space.
27332    complete="$VS_ENV_CMD"
27333    path="${complete%% *}"
27334    tmp="$complete EOL"
27335    arguments="${tmp#* }"
27336
27337    # Cannot rely on the command "which" here since it doesn't always work.
27338    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27339    if test -z "$is_absolute_path"; then
27340      # Path to executable is not absolute. Find it.
27341      IFS_save="$IFS"
27342      IFS=:
27343      for p in $PATH; do
27344        if test -f "$p/$path" && test -x "$p/$path"; then
27345          new_path="$p/$path"
27346          break
27347        fi
27348      done
27349      IFS="$IFS_save"
27350    else
27351      # This is an absolute path, we can use it without further modifications.
27352      new_path="$path"
27353    fi
27354
27355    if test "x$new_path" = x; then
27356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27357$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27358      has_space=`$ECHO "$complete" | $GREP " "`
27359      if test "x$has_space" != x; then
27360        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27361$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27362      fi
27363      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27364    fi
27365  fi
27366
27367  # Now join together the path and the arguments once again
27368  if test "x$arguments" != xEOL; then
27369    new_complete="$new_path ${arguments% *}"
27370  else
27371    new_complete="$new_path"
27372  fi
27373
27374  if test "x$complete" != "x$new_complete"; then
27375    VS_ENV_CMD="$new_complete"
27376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27377$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27378  fi
27379
27380
27381    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27382    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27383$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27384
27385    # We need to create a couple of temporary files.
27386    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27387    $MKDIR -p $VS_ENV_TMP_DIR
27388
27389    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27390    # Instead create a shell script which will set the relevant variables when run.
27391    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27392
27393  unix_path="$WINPATH_VS_ENV_CMD"
27394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27395    windows_path=`$CYGPATH -m "$unix_path"`
27396    WINPATH_VS_ENV_CMD="$windows_path"
27397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27398    windows_path=`cmd //c echo $unix_path`
27399    WINPATH_VS_ENV_CMD="$windows_path"
27400  fi
27401
27402    WINPATH_BASH="$BASH"
27403
27404  unix_path="$WINPATH_BASH"
27405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27406    windows_path=`$CYGPATH -m "$unix_path"`
27407    WINPATH_BASH="$windows_path"
27408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27409    windows_path=`cmd //c echo $unix_path`
27410    WINPATH_BASH="$windows_path"
27411  fi
27412
27413
27414    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27415    # script (executable by bash) that will setup the important variables.
27416    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27417    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27418    # This will end up something like:
27419    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27420    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27421    # These will end up something like:
27422    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27423    # The trailing space for everyone except PATH is no typo, but is needed due
27424    # to trailing \ in the Windows paths. These will be stripped later.
27425    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27426    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27427    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27428    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27429    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27430    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27431
27432    # Now execute the newly created bat file.
27433    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27434    # Change directory so we don't need to mess with Windows paths in redirects.
27435    cd $VS_ENV_TMP_DIR
27436    cmd /c extract-vs-env.bat | $CAT
27437    cd $CURDIR
27438
27439    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27440      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27441$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27442      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27443$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27444      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27445$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27446      as_fn_error $? "Cannot continue" "$LINENO" 5
27447    fi
27448
27449    # Now set all paths and other env variables. This will allow the rest of
27450    # the configure script to find and run the compiler in the proper way.
27451    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27452$as_echo "$as_me: Setting extracted environment variables" >&6;}
27453    . $VS_ENV_TMP_DIR/set-vs-env.sh
27454    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27455    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27456  else
27457    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27458    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27459$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27460  fi
27461
27462  # At this point, we should have correct variables in the environment, or we can't continue.
27463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27464$as_echo_n "checking for Visual Studio variables... " >&6; }
27465
27466  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27467    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27469$as_echo "present but broken" >&6; }
27470      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27471    else
27472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27473$as_echo "ok" >&6; }
27474      # Remove any trailing "\" and " " from the variables.
27475      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27476      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27477      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27478      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27479      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27480      # Remove any paths containing # (typically F#) as that messes up make. This
27481      # is needed if visual studio was installed with F# support.
27482      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27483
27484
27485
27486
27487    fi
27488  else
27489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27490$as_echo "not found" >&6; }
27491
27492    if test "x$VS_ENV_CMD" = x; then
27493      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27494$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27495      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27496$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27497    else
27498      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27499$as_echo "$as_me: Running the extraction script failed." >&6;}
27500    fi
27501    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27502$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27503    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27504$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27505    as_fn_error $? "Cannot continue" "$LINENO" 5
27506  fi
27507
27508    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27509    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27510    PATH="$VS_PATH"
27511    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27512    export INCLUDE="$VS_INCLUDE"
27513    export LIB="$VS_LIB"
27514  fi
27515
27516  # autoconf magic only relies on PATH, so update it if tools dir is specified
27517  OLD_PATH="$PATH"
27518
27519  # For solaris we really need solaris tools, and not the GNU equivalent.
27520  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27521  # so add that to path before starting to probe.
27522  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27523  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27524    PATH="/usr/ccs/bin:$PATH"
27525  fi
27526
27527  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27528  # override all other locations.
27529  if test "x$TOOLCHAIN_PATH" != x; then
27530    PATH=$TOOLCHAIN_PATH:$PATH
27531  fi
27532
27533
27534  #
27535  # Setup the compilers (CC and CXX)
27536  #
27537
27538  COMPILER_NAME=C
27539  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27540
27541  if test "x$CC" != x; then
27542    # User has supplied compiler name already, always let that override.
27543    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27544$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27545    if test "x`basename $CC`" = "x$CC"; then
27546      # A command without a complete path is provided, search $PATH.
27547
27548      for ac_prog in $CC
27549do
27550  # Extract the first word of "$ac_prog", so it can be a program name with args.
27551set dummy $ac_prog; ac_word=$2
27552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27553$as_echo_n "checking for $ac_word... " >&6; }
27554if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27555  $as_echo_n "(cached) " >&6
27556else
27557  case $POTENTIAL_CC in
27558  [\\/]* | ?:[\\/]*)
27559  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27560  ;;
27561  *)
27562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27563for as_dir in $PATH
27564do
27565  IFS=$as_save_IFS
27566  test -z "$as_dir" && as_dir=.
27567    for ac_exec_ext in '' $ac_executable_extensions; do
27568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27569    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27571    break 2
27572  fi
27573done
27574  done
27575IFS=$as_save_IFS
27576
27577  ;;
27578esac
27579fi
27580POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27581if test -n "$POTENTIAL_CC"; then
27582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27583$as_echo "$POTENTIAL_CC" >&6; }
27584else
27585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27586$as_echo "no" >&6; }
27587fi
27588
27589
27590  test -n "$POTENTIAL_CC" && break
27591done
27592
27593      if test "x$POTENTIAL_CC" != x; then
27594        CC=$POTENTIAL_CC
27595      else
27596        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27597      fi
27598    else
27599      # Otherwise it might already be a complete path
27600      if test ! -x "$CC"; then
27601        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27602      fi
27603    fi
27604  else
27605    # No user supplied value. Locate compiler ourselves.
27606
27607    # If we are cross compiling, assume cross compilation tools follows the
27608    # cross compilation standard where they are prefixed with the autoconf
27609    # standard name for the target. For example the binary
27610    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27611    # If we are not cross compiling, then the default compiler name will be
27612    # used.
27613
27614    CC=
27615    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27616    # before checking the rest of the PATH.
27617    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27618    # step, this should not be necessary.
27619    if test -n "$TOOLCHAIN_PATH"; then
27620      PATH_save="$PATH"
27621      PATH="$TOOLCHAIN_PATH"
27622      for ac_prog in $SEARCH_LIST
27623do
27624  # Extract the first word of "$ac_prog", so it can be a program name with args.
27625set dummy $ac_prog; ac_word=$2
27626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27627$as_echo_n "checking for $ac_word... " >&6; }
27628if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27629  $as_echo_n "(cached) " >&6
27630else
27631  case $TOOLCHAIN_PATH_CC in
27632  [\\/]* | ?:[\\/]*)
27633  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27634  ;;
27635  *)
27636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27637for as_dir in $PATH
27638do
27639  IFS=$as_save_IFS
27640  test -z "$as_dir" && as_dir=.
27641    for ac_exec_ext in '' $ac_executable_extensions; do
27642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27643    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27645    break 2
27646  fi
27647done
27648  done
27649IFS=$as_save_IFS
27650
27651  ;;
27652esac
27653fi
27654TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27655if test -n "$TOOLCHAIN_PATH_CC"; then
27656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27657$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27658else
27659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27660$as_echo "no" >&6; }
27661fi
27662
27663
27664  test -n "$TOOLCHAIN_PATH_CC" && break
27665done
27666
27667      CC=$TOOLCHAIN_PATH_CC
27668      PATH="$PATH_save"
27669    fi
27670
27671    # AC_PATH_PROGS can't be run multiple times with the same variable,
27672    # so create a new name for this run.
27673    if test "x$CC" = x; then
27674      for ac_prog in $SEARCH_LIST
27675do
27676  # Extract the first word of "$ac_prog", so it can be a program name with args.
27677set dummy $ac_prog; ac_word=$2
27678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27679$as_echo_n "checking for $ac_word... " >&6; }
27680if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27681  $as_echo_n "(cached) " >&6
27682else
27683  case $POTENTIAL_CC in
27684  [\\/]* | ?:[\\/]*)
27685  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27686  ;;
27687  *)
27688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27689for as_dir in $PATH
27690do
27691  IFS=$as_save_IFS
27692  test -z "$as_dir" && as_dir=.
27693    for ac_exec_ext in '' $ac_executable_extensions; do
27694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27695    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27697    break 2
27698  fi
27699done
27700  done
27701IFS=$as_save_IFS
27702
27703  ;;
27704esac
27705fi
27706POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27707if test -n "$POTENTIAL_CC"; then
27708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27709$as_echo "$POTENTIAL_CC" >&6; }
27710else
27711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27712$as_echo "no" >&6; }
27713fi
27714
27715
27716  test -n "$POTENTIAL_CC" && break
27717done
27718
27719      CC=$POTENTIAL_CC
27720    fi
27721
27722    if test "x$CC" = x; then
27723
27724  # Print a helpful message on how to acquire the necessary build dependency.
27725  # devkit is the help tag: freetype, cups, pulse, alsa etc
27726  MISSING_DEPENDENCY=devkit
27727
27728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27729    cygwin_help $MISSING_DEPENDENCY
27730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27731    msys_help $MISSING_DEPENDENCY
27732  else
27733    PKGHANDLER_COMMAND=
27734
27735    case $PKGHANDLER in
27736      apt-get)
27737        apt_help     $MISSING_DEPENDENCY ;;
27738      yum)
27739        yum_help     $MISSING_DEPENDENCY ;;
27740      port)
27741        port_help    $MISSING_DEPENDENCY ;;
27742      pkgutil)
27743        pkgutil_help $MISSING_DEPENDENCY ;;
27744      pkgadd)
27745        pkgadd_help  $MISSING_DEPENDENCY ;;
27746    esac
27747
27748    if test "x$PKGHANDLER_COMMAND" != x; then
27749      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27750    fi
27751  fi
27752
27753      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27754    fi
27755  fi
27756
27757  # Now we have a compiler binary in CC. Make sure it's okay.
27758
27759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27760
27761  # First separate the path from the arguments. This will split at the first
27762  # space.
27763  complete="$CC"
27764  path="${complete%% *}"
27765  tmp="$complete EOL"
27766  arguments="${tmp#* }"
27767
27768  # Input might be given as Windows format, start by converting to
27769  # unix format.
27770  new_path=`$CYGPATH -u "$path"`
27771
27772  # Now try to locate executable using which
27773  new_path=`$WHICH "$new_path" 2> /dev/null`
27774  # bat and cmd files are not always considered executable in cygwin causing which
27775  # to not find them
27776  if test "x$new_path" = x \
27777      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27778      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27779    new_path=`$CYGPATH -u "$path"`
27780  fi
27781  if test "x$new_path" = x; then
27782    # Oops. Which didn't find the executable.
27783    # The splitting of arguments from the executable at a space might have been incorrect,
27784    # since paths with space are more likely in Windows. Give it another try with the whole
27785    # argument.
27786    path="$complete"
27787    arguments="EOL"
27788    new_path=`$CYGPATH -u "$path"`
27789    new_path=`$WHICH "$new_path" 2> /dev/null`
27790    # bat and cmd files are not always considered executable in cygwin causing which
27791    # to not find them
27792    if test "x$new_path" = x \
27793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27795      new_path=`$CYGPATH -u "$path"`
27796    fi
27797    if test "x$new_path" = x; then
27798      # It's still not found. Now this is an unrecoverable error.
27799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27800$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27801      has_space=`$ECHO "$complete" | $GREP " "`
27802      if test "x$has_space" != x; then
27803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27805      fi
27806      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27807    fi
27808  fi
27809
27810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27813  # "foo.exe" is OK but "foo" is an error.
27814  #
27815  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27816  # It is also a way to make sure we got the proper file name for the real test later on.
27817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27818  if test "x$test_shortpath" = x; then
27819    # Short path failed, file does not exist as specified.
27820    # Try adding .exe or .cmd
27821    if test -f "${new_path}.exe"; then
27822      input_to_shortpath="${new_path}.exe"
27823    elif test -f "${new_path}.cmd"; then
27824      input_to_shortpath="${new_path}.cmd"
27825    else
27826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27827$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27830      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27831    fi
27832  else
27833    input_to_shortpath="$new_path"
27834  fi
27835
27836  # Call helper function which possibly converts this using DOS-style short mode.
27837  # If so, the updated path is stored in $new_path.
27838  new_path="$input_to_shortpath"
27839
27840  input_path="$input_to_shortpath"
27841  # Check if we need to convert this using DOS-style short mode. If the path
27842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27843  # take no chances and rewrite it.
27844  # Note: m4 eats our [], so we need to use [ and ] instead.
27845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27846  if test "x$has_forbidden_chars" != x; then
27847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27851      # Going to short mode and back again did indeed matter. Since short mode is
27852      # case insensitive, let's make it lowercase to improve readability.
27853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27854      # Now convert it back to Unix-stile (cygpath)
27855      input_path=`$CYGPATH -u "$shortmode_path"`
27856      new_path="$input_path"
27857    fi
27858  fi
27859
27860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27861  if test "x$test_cygdrive_prefix" = x; then
27862    # As a simple fix, exclude /usr/bin since it's not a real path.
27863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27865      # a path prefixed by /cygdrive for fixpath to work.
27866      new_path="$CYGWIN_ROOT_PATH$input_path"
27867    fi
27868  fi
27869
27870  # remove trailing .exe if any
27871  new_path="${new_path/%.exe/}"
27872
27873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27874
27875  # First separate the path from the arguments. This will split at the first
27876  # space.
27877  complete="$CC"
27878  path="${complete%% *}"
27879  tmp="$complete EOL"
27880  arguments="${tmp#* }"
27881
27882  # Input might be given as Windows format, start by converting to
27883  # unix format.
27884  new_path="$path"
27885
27886  windows_path="$new_path"
27887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27888    unix_path=`$CYGPATH -u "$windows_path"`
27889    new_path="$unix_path"
27890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27892    new_path="$unix_path"
27893  fi
27894
27895
27896  # Now try to locate executable using which
27897  new_path=`$WHICH "$new_path" 2> /dev/null`
27898
27899  if test "x$new_path" = x; then
27900    # Oops. Which didn't find the executable.
27901    # The splitting of arguments from the executable at a space might have been incorrect,
27902    # since paths with space are more likely in Windows. Give it another try with the whole
27903    # argument.
27904    path="$complete"
27905    arguments="EOL"
27906    new_path="$path"
27907
27908  windows_path="$new_path"
27909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27910    unix_path=`$CYGPATH -u "$windows_path"`
27911    new_path="$unix_path"
27912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27914    new_path="$unix_path"
27915  fi
27916
27917
27918    new_path=`$WHICH "$new_path" 2> /dev/null`
27919    # bat and cmd files are not always considered executable in MSYS causing which
27920    # to not find them
27921    if test "x$new_path" = x \
27922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27924      new_path="$path"
27925
27926  windows_path="$new_path"
27927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928    unix_path=`$CYGPATH -u "$windows_path"`
27929    new_path="$unix_path"
27930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27932    new_path="$unix_path"
27933  fi
27934
27935    fi
27936
27937    if test "x$new_path" = x; then
27938      # It's still not found. Now this is an unrecoverable error.
27939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27940$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27941      has_space=`$ECHO "$complete" | $GREP " "`
27942      if test "x$has_space" != x; then
27943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27945      fi
27946      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27947    fi
27948  fi
27949
27950  # Now new_path has a complete unix path to the binary
27951  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27952    # Keep paths in /bin as-is, but remove trailing .exe if any
27953    new_path="${new_path/%.exe/}"
27954    # Do not save /bin paths to all_fixpath_prefixes!
27955  else
27956    # Not in mixed or Windows style, start by that.
27957    new_path=`cmd //c echo $new_path`
27958
27959  input_path="$new_path"
27960  # Check if we need to convert this using DOS-style short mode. If the path
27961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27962  # take no chances and rewrite it.
27963  # Note: m4 eats our [], so we need to use [ and ] instead.
27964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27965  if test "x$has_forbidden_chars" != x; then
27966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27968  fi
27969
27970    # Output is in $new_path
27971
27972  windows_path="$new_path"
27973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27974    unix_path=`$CYGPATH -u "$windows_path"`
27975    new_path="$unix_path"
27976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27978    new_path="$unix_path"
27979  fi
27980
27981    # remove trailing .exe if any
27982    new_path="${new_path/%.exe/}"
27983
27984    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27985    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27986  fi
27987
27988  else
27989    # We're on a unix platform. Hooray! :)
27990    # First separate the path from the arguments. This will split at the first
27991    # space.
27992    complete="$CC"
27993    path="${complete%% *}"
27994    tmp="$complete EOL"
27995    arguments="${tmp#* }"
27996
27997    # Cannot rely on the command "which" here since it doesn't always work.
27998    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27999    if test -z "$is_absolute_path"; then
28000      # Path to executable is not absolute. Find it.
28001      IFS_save="$IFS"
28002      IFS=:
28003      for p in $PATH; do
28004        if test -f "$p/$path" && test -x "$p/$path"; then
28005          new_path="$p/$path"
28006          break
28007        fi
28008      done
28009      IFS="$IFS_save"
28010    else
28011      # This is an absolute path, we can use it without further modifications.
28012      new_path="$path"
28013    fi
28014
28015    if test "x$new_path" = x; then
28016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28017$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28018      has_space=`$ECHO "$complete" | $GREP " "`
28019      if test "x$has_space" != x; then
28020        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28022      fi
28023      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28024    fi
28025  fi
28026
28027  # Now join together the path and the arguments once again
28028  if test "x$arguments" != xEOL; then
28029    new_complete="$new_path ${arguments% *}"
28030  else
28031    new_complete="$new_path"
28032  fi
28033
28034  if test "x$complete" != "x$new_complete"; then
28035    CC="$new_complete"
28036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28037$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28038  fi
28039
28040  TEST_COMPILER="$CC"
28041  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28042  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28043  if test "x$OPENJDK_BUILD_OS" != xaix; then
28044    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28046$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28047
28048  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28049    # Follow a chain of symbolic links. Use readlink
28050    # where it exists, else fall back to horribly
28051    # complicated shell code.
28052    if test "x$READLINK_TESTED" != yes; then
28053      # On MacOSX there is a readlink tool with a different
28054      # purpose than the GNU readlink tool. Check the found readlink.
28055      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28056      if test "x$ISGNU" = x; then
28057        # A readlink that we do not know how to use.
28058        # Are there other non-GNU readlinks out there?
28059        READLINK_TESTED=yes
28060        READLINK=
28061      fi
28062    fi
28063
28064    if test "x$READLINK" != x; then
28065      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28066    else
28067      # Save the current directory for restoring afterwards
28068      STARTDIR=$PWD
28069      COUNTER=0
28070      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28071      sym_link_file=`$BASENAME $TEST_COMPILER`
28072      cd $sym_link_dir
28073      # Use -P flag to resolve symlinks in directories.
28074      cd `$THEPWDCMD -P`
28075      sym_link_dir=`$THEPWDCMD -P`
28076      # Resolve file symlinks
28077      while test $COUNTER -lt 20; do
28078        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28079        if test "x$ISLINK" == x; then
28080          # This is not a symbolic link! We are done!
28081          break
28082        fi
28083        # Again resolve directory symlinks since the target of the just found
28084        # link could be in a different directory
28085        cd `$DIRNAME $ISLINK`
28086        sym_link_dir=`$THEPWDCMD -P`
28087        sym_link_file=`$BASENAME $ISLINK`
28088        let COUNTER=COUNTER+1
28089      done
28090      cd $STARTDIR
28091      TEST_COMPILER=$sym_link_dir/$sym_link_file
28092    fi
28093  fi
28094
28095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28096$as_echo "$TEST_COMPILER" >&6; }
28097  fi
28098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28099$as_echo_n "checking if CC is disguised ccache... " >&6; }
28100
28101  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28102  if test "x$COMPILER_BASENAME" = "xccache"; then
28103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28104$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28105    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28106    # We want to control ccache invocation ourselves, so ignore this cc and try
28107    # searching again.
28108
28109    # Remove the path to the fake ccache cc from the PATH
28110    RETRY_COMPILER_SAVED_PATH="$PATH"
28111    COMPILER_DIRNAME=`$DIRNAME $CC`
28112    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28113
28114    # Try again looking for our compiler
28115    if test -n "$ac_tool_prefix"; then
28116  for ac_prog in $TOOLCHAIN_CC_BINARY
28117  do
28118    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28119set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28121$as_echo_n "checking for $ac_word... " >&6; }
28122if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28123  $as_echo_n "(cached) " >&6
28124else
28125  if test -n "$PROPER_COMPILER_CC"; then
28126  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28127else
28128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28129for as_dir in $PATH
28130do
28131  IFS=$as_save_IFS
28132  test -z "$as_dir" && as_dir=.
28133    for ac_exec_ext in '' $ac_executable_extensions; do
28134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28135    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28137    break 2
28138  fi
28139done
28140  done
28141IFS=$as_save_IFS
28142
28143fi
28144fi
28145PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28146if test -n "$PROPER_COMPILER_CC"; then
28147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28148$as_echo "$PROPER_COMPILER_CC" >&6; }
28149else
28150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28151$as_echo "no" >&6; }
28152fi
28153
28154
28155    test -n "$PROPER_COMPILER_CC" && break
28156  done
28157fi
28158if test -z "$PROPER_COMPILER_CC"; then
28159  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28160  for ac_prog in $TOOLCHAIN_CC_BINARY
28161do
28162  # Extract the first word of "$ac_prog", so it can be a program name with args.
28163set dummy $ac_prog; ac_word=$2
28164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28165$as_echo_n "checking for $ac_word... " >&6; }
28166if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28167  $as_echo_n "(cached) " >&6
28168else
28169  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28170  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28171else
28172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28173for as_dir in $PATH
28174do
28175  IFS=$as_save_IFS
28176  test -z "$as_dir" && as_dir=.
28177    for ac_exec_ext in '' $ac_executable_extensions; do
28178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28179    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28181    break 2
28182  fi
28183done
28184  done
28185IFS=$as_save_IFS
28186
28187fi
28188fi
28189ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28190if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28192$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28193else
28194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28195$as_echo "no" >&6; }
28196fi
28197
28198
28199  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28200done
28201
28202  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28203    PROPER_COMPILER_CC=""
28204  else
28205    case $cross_compiling:$ac_tool_warned in
28206yes:)
28207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28209ac_tool_warned=yes ;;
28210esac
28211    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28212  fi
28213fi
28214
28215
28216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217
28218  # First separate the path from the arguments. This will split at the first
28219  # space.
28220  complete="$PROPER_COMPILER_CC"
28221  path="${complete%% *}"
28222  tmp="$complete EOL"
28223  arguments="${tmp#* }"
28224
28225  # Input might be given as Windows format, start by converting to
28226  # unix format.
28227  new_path=`$CYGPATH -u "$path"`
28228
28229  # Now try to locate executable using which
28230  new_path=`$WHICH "$new_path" 2> /dev/null`
28231  # bat and cmd files are not always considered executable in cygwin causing which
28232  # to not find them
28233  if test "x$new_path" = x \
28234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28236    new_path=`$CYGPATH -u "$path"`
28237  fi
28238  if test "x$new_path" = x; then
28239    # Oops. Which didn't find the executable.
28240    # The splitting of arguments from the executable at a space might have been incorrect,
28241    # since paths with space are more likely in Windows. Give it another try with the whole
28242    # argument.
28243    path="$complete"
28244    arguments="EOL"
28245    new_path=`$CYGPATH -u "$path"`
28246    new_path=`$WHICH "$new_path" 2> /dev/null`
28247    # bat and cmd files are not always considered executable in cygwin causing which
28248    # to not find them
28249    if test "x$new_path" = x \
28250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28252      new_path=`$CYGPATH -u "$path"`
28253    fi
28254    if test "x$new_path" = x; then
28255      # It's still not found. Now this is an unrecoverable error.
28256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28257$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28258      has_space=`$ECHO "$complete" | $GREP " "`
28259      if test "x$has_space" != x; then
28260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28262      fi
28263      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28264    fi
28265  fi
28266
28267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28270  # "foo.exe" is OK but "foo" is an error.
28271  #
28272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28273  # It is also a way to make sure we got the proper file name for the real test later on.
28274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28275  if test "x$test_shortpath" = x; then
28276    # Short path failed, file does not exist as specified.
28277    # Try adding .exe or .cmd
28278    if test -f "${new_path}.exe"; then
28279      input_to_shortpath="${new_path}.exe"
28280    elif test -f "${new_path}.cmd"; then
28281      input_to_shortpath="${new_path}.cmd"
28282    else
28283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28284$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28287      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28288    fi
28289  else
28290    input_to_shortpath="$new_path"
28291  fi
28292
28293  # Call helper function which possibly converts this using DOS-style short mode.
28294  # If so, the updated path is stored in $new_path.
28295  new_path="$input_to_shortpath"
28296
28297  input_path="$input_to_shortpath"
28298  # Check if we need to convert this using DOS-style short mode. If the path
28299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28300  # take no chances and rewrite it.
28301  # Note: m4 eats our [], so we need to use [ and ] instead.
28302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28303  if test "x$has_forbidden_chars" != x; then
28304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28308      # Going to short mode and back again did indeed matter. Since short mode is
28309      # case insensitive, let's make it lowercase to improve readability.
28310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28311      # Now convert it back to Unix-stile (cygpath)
28312      input_path=`$CYGPATH -u "$shortmode_path"`
28313      new_path="$input_path"
28314    fi
28315  fi
28316
28317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28318  if test "x$test_cygdrive_prefix" = x; then
28319    # As a simple fix, exclude /usr/bin since it's not a real path.
28320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28322      # a path prefixed by /cygdrive for fixpath to work.
28323      new_path="$CYGWIN_ROOT_PATH$input_path"
28324    fi
28325  fi
28326
28327  # remove trailing .exe if any
28328  new_path="${new_path/%.exe/}"
28329
28330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28331
28332  # First separate the path from the arguments. This will split at the first
28333  # space.
28334  complete="$PROPER_COMPILER_CC"
28335  path="${complete%% *}"
28336  tmp="$complete EOL"
28337  arguments="${tmp#* }"
28338
28339  # Input might be given as Windows format, start by converting to
28340  # unix format.
28341  new_path="$path"
28342
28343  windows_path="$new_path"
28344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28345    unix_path=`$CYGPATH -u "$windows_path"`
28346    new_path="$unix_path"
28347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28349    new_path="$unix_path"
28350  fi
28351
28352
28353  # Now try to locate executable using which
28354  new_path=`$WHICH "$new_path" 2> /dev/null`
28355
28356  if test "x$new_path" = x; then
28357    # Oops. Which didn't find the executable.
28358    # The splitting of arguments from the executable at a space might have been incorrect,
28359    # since paths with space are more likely in Windows. Give it another try with the whole
28360    # argument.
28361    path="$complete"
28362    arguments="EOL"
28363    new_path="$path"
28364
28365  windows_path="$new_path"
28366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28367    unix_path=`$CYGPATH -u "$windows_path"`
28368    new_path="$unix_path"
28369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28371    new_path="$unix_path"
28372  fi
28373
28374
28375    new_path=`$WHICH "$new_path" 2> /dev/null`
28376    # bat and cmd files are not always considered executable in MSYS causing which
28377    # to not find them
28378    if test "x$new_path" = x \
28379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28381      new_path="$path"
28382
28383  windows_path="$new_path"
28384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28385    unix_path=`$CYGPATH -u "$windows_path"`
28386    new_path="$unix_path"
28387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28389    new_path="$unix_path"
28390  fi
28391
28392    fi
28393
28394    if test "x$new_path" = x; then
28395      # It's still not found. Now this is an unrecoverable error.
28396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28397$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28398      has_space=`$ECHO "$complete" | $GREP " "`
28399      if test "x$has_space" != x; then
28400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28402      fi
28403      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28404    fi
28405  fi
28406
28407  # Now new_path has a complete unix path to the binary
28408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28409    # Keep paths in /bin as-is, but remove trailing .exe if any
28410    new_path="${new_path/%.exe/}"
28411    # Do not save /bin paths to all_fixpath_prefixes!
28412  else
28413    # Not in mixed or Windows style, start by that.
28414    new_path=`cmd //c echo $new_path`
28415
28416  input_path="$new_path"
28417  # Check if we need to convert this using DOS-style short mode. If the path
28418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28419  # take no chances and rewrite it.
28420  # Note: m4 eats our [], so we need to use [ and ] instead.
28421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28422  if test "x$has_forbidden_chars" != x; then
28423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28425  fi
28426
28427    # Output is in $new_path
28428
28429  windows_path="$new_path"
28430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28431    unix_path=`$CYGPATH -u "$windows_path"`
28432    new_path="$unix_path"
28433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28435    new_path="$unix_path"
28436  fi
28437
28438    # remove trailing .exe if any
28439    new_path="${new_path/%.exe/}"
28440
28441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28443  fi
28444
28445  else
28446    # We're on a unix platform. Hooray! :)
28447    # First separate the path from the arguments. This will split at the first
28448    # space.
28449    complete="$PROPER_COMPILER_CC"
28450    path="${complete%% *}"
28451    tmp="$complete EOL"
28452    arguments="${tmp#* }"
28453
28454    # Cannot rely on the command "which" here since it doesn't always work.
28455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28456    if test -z "$is_absolute_path"; then
28457      # Path to executable is not absolute. Find it.
28458      IFS_save="$IFS"
28459      IFS=:
28460      for p in $PATH; do
28461        if test -f "$p/$path" && test -x "$p/$path"; then
28462          new_path="$p/$path"
28463          break
28464        fi
28465      done
28466      IFS="$IFS_save"
28467    else
28468      # This is an absolute path, we can use it without further modifications.
28469      new_path="$path"
28470    fi
28471
28472    if test "x$new_path" = x; then
28473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28474$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28475      has_space=`$ECHO "$complete" | $GREP " "`
28476      if test "x$has_space" != x; then
28477        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28479      fi
28480      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28481    fi
28482  fi
28483
28484  # Now join together the path and the arguments once again
28485  if test "x$arguments" != xEOL; then
28486    new_complete="$new_path ${arguments% *}"
28487  else
28488    new_complete="$new_path"
28489  fi
28490
28491  if test "x$complete" != "x$new_complete"; then
28492    PROPER_COMPILER_CC="$new_complete"
28493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28494$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28495  fi
28496
28497    PATH="$RETRY_COMPILER_SAVED_PATH"
28498
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28500$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28501
28502  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28503    # Follow a chain of symbolic links. Use readlink
28504    # where it exists, else fall back to horribly
28505    # complicated shell code.
28506    if test "x$READLINK_TESTED" != yes; then
28507      # On MacOSX there is a readlink tool with a different
28508      # purpose than the GNU readlink tool. Check the found readlink.
28509      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28510      if test "x$ISGNU" = x; then
28511        # A readlink that we do not know how to use.
28512        # Are there other non-GNU readlinks out there?
28513        READLINK_TESTED=yes
28514        READLINK=
28515      fi
28516    fi
28517
28518    if test "x$READLINK" != x; then
28519      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28520    else
28521      # Save the current directory for restoring afterwards
28522      STARTDIR=$PWD
28523      COUNTER=0
28524      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28525      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28526      cd $sym_link_dir
28527      # Use -P flag to resolve symlinks in directories.
28528      cd `$THEPWDCMD -P`
28529      sym_link_dir=`$THEPWDCMD -P`
28530      # Resolve file symlinks
28531      while test $COUNTER -lt 20; do
28532        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28533        if test "x$ISLINK" == x; then
28534          # This is not a symbolic link! We are done!
28535          break
28536        fi
28537        # Again resolve directory symlinks since the target of the just found
28538        # link could be in a different directory
28539        cd `$DIRNAME $ISLINK`
28540        sym_link_dir=`$THEPWDCMD -P`
28541        sym_link_file=`$BASENAME $ISLINK`
28542        let COUNTER=COUNTER+1
28543      done
28544      cd $STARTDIR
28545      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28546    fi
28547  fi
28548
28549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28550$as_echo "$PROPER_COMPILER_CC" >&6; }
28551    CC="$PROPER_COMPILER_CC"
28552  else
28553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28554$as_echo "no, keeping CC" >&6; }
28555  fi
28556
28557
28558  COMPILER=$CC
28559  COMPILER_NAME=$COMPILER_NAME
28560
28561  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28562    # cc -V output typically looks like
28563    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28564    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28565    # Check that this is likely to be the Solaris Studio cc.
28566    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28567    if test $? -ne 0; then
28568      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28569      { $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
28570$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28571      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28572$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28573      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28574$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28575      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28576    fi
28577    # Remove usage instructions (if present), and
28578    # collapse compiler output into a single line
28579    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28580        $SED -e 's/ *[Uu]sage:.*//'`
28581    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28582        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28583  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28584    # xlc -qversion output typically looks like
28585    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28586    #     Version: 11.01.0000.0015
28587    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28588    # Check that this is likely to be the IBM XL C compiler.
28589    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28590    if test $? -ne 0; then
28591      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28592      { $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
28593$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28595$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28596      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28597$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28598      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28599    fi
28600    # Collapse compiler output into a single line
28601    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28602    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28603        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28604  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28605    # There is no specific version flag, but all output starts with a version string.
28606    # First line typically looks something like:
28607    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28608    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28609    # Check that this is likely to be Microsoft CL.EXE.
28610    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28611    if test $? -ne 0; then
28612      { $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
28613$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28614      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28615$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28616      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28617    fi
28618    # Collapse compiler output into a single line
28619    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28620    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28621        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28622  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28623    # gcc --version output typically looks like
28624    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28625    #     Copyright (C) 2013 Free Software Foundation, Inc.
28626    #     This is free software; see the source for copying conditions.  There is NO
28627    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28628    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28629    # Check that this is likely to be GCC.
28630    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28631    if test $? -ne 0; then
28632      { $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
28633$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28634      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28635$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28636      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28637    fi
28638    # Remove Copyright and legalese from version string, and
28639    # collapse into a single line
28640    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28641        $SED -e 's/ *Copyright .*//'`
28642    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28643        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28644  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28645    # clang --version output typically looks like
28646    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28647    #    clang version 3.3 (tags/RELEASE_33/final)
28648    # or
28649    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28650    #    Target: x86_64-pc-linux-gnu
28651    #    Thread model: posix
28652    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28653    # Check that this is likely to be clang
28654    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28655    if test $? -ne 0; then
28656      { $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
28657$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28658      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28659$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28660      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28661    fi
28662    # Collapse compiler output into a single line
28663    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28664    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28665        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28666  else
28667      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28668  fi
28669  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28670  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28671  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28672  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28673
28674  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28675$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28676
28677
28678  # Now that we have resolved CC ourself, let autoconf have its go at it
28679  ac_ext=c
28680ac_cpp='$CPP $CPPFLAGS'
28681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28683ac_compiler_gnu=$ac_cv_c_compiler_gnu
28684if test -n "$ac_tool_prefix"; then
28685  for ac_prog in $CC
28686  do
28687    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28690$as_echo_n "checking for $ac_word... " >&6; }
28691if ${ac_cv_prog_CC+:} false; then :
28692  $as_echo_n "(cached) " >&6
28693else
28694  if test -n "$CC"; then
28695  ac_cv_prog_CC="$CC" # Let the user override the test.
28696else
28697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28698for as_dir in $PATH
28699do
28700  IFS=$as_save_IFS
28701  test -z "$as_dir" && as_dir=.
28702    for ac_exec_ext in '' $ac_executable_extensions; do
28703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28704    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28706    break 2
28707  fi
28708done
28709  done
28710IFS=$as_save_IFS
28711
28712fi
28713fi
28714CC=$ac_cv_prog_CC
28715if test -n "$CC"; then
28716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28717$as_echo "$CC" >&6; }
28718else
28719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28720$as_echo "no" >&6; }
28721fi
28722
28723
28724    test -n "$CC" && break
28725  done
28726fi
28727if test -z "$CC"; then
28728  ac_ct_CC=$CC
28729  for ac_prog in $CC
28730do
28731  # Extract the first word of "$ac_prog", so it can be a program name with args.
28732set dummy $ac_prog; ac_word=$2
28733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28734$as_echo_n "checking for $ac_word... " >&6; }
28735if ${ac_cv_prog_ac_ct_CC+:} false; then :
28736  $as_echo_n "(cached) " >&6
28737else
28738  if test -n "$ac_ct_CC"; then
28739  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28740else
28741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28742for as_dir in $PATH
28743do
28744  IFS=$as_save_IFS
28745  test -z "$as_dir" && as_dir=.
28746    for ac_exec_ext in '' $ac_executable_extensions; do
28747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28748    ac_cv_prog_ac_ct_CC="$ac_prog"
28749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28750    break 2
28751  fi
28752done
28753  done
28754IFS=$as_save_IFS
28755
28756fi
28757fi
28758ac_ct_CC=$ac_cv_prog_ac_ct_CC
28759if test -n "$ac_ct_CC"; then
28760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28761$as_echo "$ac_ct_CC" >&6; }
28762else
28763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28764$as_echo "no" >&6; }
28765fi
28766
28767
28768  test -n "$ac_ct_CC" && break
28769done
28770
28771  if test "x$ac_ct_CC" = x; then
28772    CC=""
28773  else
28774    case $cross_compiling:$ac_tool_warned in
28775yes:)
28776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28778ac_tool_warned=yes ;;
28779esac
28780    CC=$ac_ct_CC
28781  fi
28782fi
28783
28784
28785test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28787as_fn_error $? "no acceptable C compiler found in \$PATH
28788See \`config.log' for more details" "$LINENO" 5; }
28789
28790# Provide some information about the compiler.
28791$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28792set X $ac_compile
28793ac_compiler=$2
28794for ac_option in --version -v -V -qversion; do
28795  { { ac_try="$ac_compiler $ac_option >&5"
28796case "(($ac_try" in
28797  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28798  *) ac_try_echo=$ac_try;;
28799esac
28800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28801$as_echo "$ac_try_echo"; } >&5
28802  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28803  ac_status=$?
28804  if test -s conftest.err; then
28805    sed '10a\
28806... rest of stderr output deleted ...
28807         10q' conftest.err >conftest.er1
28808    cat conftest.er1 >&5
28809  fi
28810  rm -f conftest.er1 conftest.err
28811  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28812  test $ac_status = 0; }
28813done
28814
28815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28816/* end confdefs.h.  */
28817
28818int
28819main ()
28820{
28821
28822  ;
28823  return 0;
28824}
28825_ACEOF
28826ac_clean_files_save=$ac_clean_files
28827ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28828# Try to create an executable without -o first, disregard a.out.
28829# It will help us diagnose broken compilers, and finding out an intuition
28830# of exeext.
28831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28832$as_echo_n "checking whether the C compiler works... " >&6; }
28833ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28834
28835# The possible output files:
28836ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28837
28838ac_rmfiles=
28839for ac_file in $ac_files
28840do
28841  case $ac_file in
28842    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28843    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28844  esac
28845done
28846rm -f $ac_rmfiles
28847
28848if { { ac_try="$ac_link_default"
28849case "(($ac_try" in
28850  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28851  *) ac_try_echo=$ac_try;;
28852esac
28853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28854$as_echo "$ac_try_echo"; } >&5
28855  (eval "$ac_link_default") 2>&5
28856  ac_status=$?
28857  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28858  test $ac_status = 0; }; then :
28859  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28860# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28861# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28862# so that the user can short-circuit this test for compilers unknown to
28863# Autoconf.
28864for ac_file in $ac_files ''
28865do
28866  test -f "$ac_file" || continue
28867  case $ac_file in
28868    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28869	;;
28870    [ab].out )
28871	# We found the default executable, but exeext='' is most
28872	# certainly right.
28873	break;;
28874    *.* )
28875	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28876	then :; else
28877	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28878	fi
28879	# We set ac_cv_exeext here because the later test for it is not
28880	# safe: cross compilers may not add the suffix if given an `-o'
28881	# argument, so we may need to know it at that point already.
28882	# Even if this section looks crufty: it has the advantage of
28883	# actually working.
28884	break;;
28885    * )
28886	break;;
28887  esac
28888done
28889test "$ac_cv_exeext" = no && ac_cv_exeext=
28890
28891else
28892  ac_file=''
28893fi
28894if test -z "$ac_file"; then :
28895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28896$as_echo "no" >&6; }
28897$as_echo "$as_me: failed program was:" >&5
28898sed 's/^/| /' conftest.$ac_ext >&5
28899
28900{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28902as_fn_error 77 "C compiler cannot create executables
28903See \`config.log' for more details" "$LINENO" 5; }
28904else
28905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28906$as_echo "yes" >&6; }
28907fi
28908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28909$as_echo_n "checking for C compiler default output file name... " >&6; }
28910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28911$as_echo "$ac_file" >&6; }
28912ac_exeext=$ac_cv_exeext
28913
28914rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28915ac_clean_files=$ac_clean_files_save
28916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28917$as_echo_n "checking for suffix of executables... " >&6; }
28918if { { ac_try="$ac_link"
28919case "(($ac_try" in
28920  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28921  *) ac_try_echo=$ac_try;;
28922esac
28923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28924$as_echo "$ac_try_echo"; } >&5
28925  (eval "$ac_link") 2>&5
28926  ac_status=$?
28927  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28928  test $ac_status = 0; }; then :
28929  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28930# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28931# work properly (i.e., refer to `conftest.exe'), while it won't with
28932# `rm'.
28933for ac_file in conftest.exe conftest conftest.*; do
28934  test -f "$ac_file" || continue
28935  case $ac_file in
28936    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28937    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28938	  break;;
28939    * ) break;;
28940  esac
28941done
28942else
28943  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28945as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28946See \`config.log' for more details" "$LINENO" 5; }
28947fi
28948rm -f conftest conftest$ac_cv_exeext
28949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28950$as_echo "$ac_cv_exeext" >&6; }
28951
28952rm -f conftest.$ac_ext
28953EXEEXT=$ac_cv_exeext
28954ac_exeext=$EXEEXT
28955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28956/* end confdefs.h.  */
28957#include <stdio.h>
28958int
28959main ()
28960{
28961FILE *f = fopen ("conftest.out", "w");
28962 return ferror (f) || fclose (f) != 0;
28963
28964  ;
28965  return 0;
28966}
28967_ACEOF
28968ac_clean_files="$ac_clean_files conftest.out"
28969# Check that the compiler produces executables we can run.  If not, either
28970# the compiler is broken, or we cross compile.
28971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28972$as_echo_n "checking whether we are cross compiling... " >&6; }
28973if test "$cross_compiling" != yes; then
28974  { { ac_try="$ac_link"
28975case "(($ac_try" in
28976  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28977  *) ac_try_echo=$ac_try;;
28978esac
28979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28980$as_echo "$ac_try_echo"; } >&5
28981  (eval "$ac_link") 2>&5
28982  ac_status=$?
28983  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28984  test $ac_status = 0; }
28985  if { ac_try='./conftest$ac_cv_exeext'
28986  { { case "(($ac_try" in
28987  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28988  *) ac_try_echo=$ac_try;;
28989esac
28990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28991$as_echo "$ac_try_echo"; } >&5
28992  (eval "$ac_try") 2>&5
28993  ac_status=$?
28994  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28995  test $ac_status = 0; }; }; then
28996    cross_compiling=no
28997  else
28998    if test "$cross_compiling" = maybe; then
28999	cross_compiling=yes
29000    else
29001	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29003as_fn_error $? "cannot run C compiled programs.
29004If you meant to cross compile, use \`--host'.
29005See \`config.log' for more details" "$LINENO" 5; }
29006    fi
29007  fi
29008fi
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29010$as_echo "$cross_compiling" >&6; }
29011
29012rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29013ac_clean_files=$ac_clean_files_save
29014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29015$as_echo_n "checking for suffix of object files... " >&6; }
29016if ${ac_cv_objext+:} false; then :
29017  $as_echo_n "(cached) " >&6
29018else
29019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29020/* end confdefs.h.  */
29021
29022int
29023main ()
29024{
29025
29026  ;
29027  return 0;
29028}
29029_ACEOF
29030rm -f conftest.o conftest.obj
29031if { { ac_try="$ac_compile"
29032case "(($ac_try" in
29033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29034  *) ac_try_echo=$ac_try;;
29035esac
29036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29037$as_echo "$ac_try_echo"; } >&5
29038  (eval "$ac_compile") 2>&5
29039  ac_status=$?
29040  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29041  test $ac_status = 0; }; then :
29042  for ac_file in conftest.o conftest.obj conftest.*; do
29043  test -f "$ac_file" || continue;
29044  case $ac_file in
29045    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29046    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29047       break;;
29048  esac
29049done
29050else
29051  $as_echo "$as_me: failed program was:" >&5
29052sed 's/^/| /' conftest.$ac_ext >&5
29053
29054{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29056as_fn_error $? "cannot compute suffix of object files: cannot compile
29057See \`config.log' for more details" "$LINENO" 5; }
29058fi
29059rm -f conftest.$ac_cv_objext conftest.$ac_ext
29060fi
29061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29062$as_echo "$ac_cv_objext" >&6; }
29063OBJEXT=$ac_cv_objext
29064ac_objext=$OBJEXT
29065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29066$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29067if ${ac_cv_c_compiler_gnu+:} false; then :
29068  $as_echo_n "(cached) " >&6
29069else
29070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29071/* end confdefs.h.  */
29072
29073int
29074main ()
29075{
29076#ifndef __GNUC__
29077       choke me
29078#endif
29079
29080  ;
29081  return 0;
29082}
29083_ACEOF
29084if ac_fn_c_try_compile "$LINENO"; then :
29085  ac_compiler_gnu=yes
29086else
29087  ac_compiler_gnu=no
29088fi
29089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29090ac_cv_c_compiler_gnu=$ac_compiler_gnu
29091
29092fi
29093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29094$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29095if test $ac_compiler_gnu = yes; then
29096  GCC=yes
29097else
29098  GCC=
29099fi
29100ac_test_CFLAGS=${CFLAGS+set}
29101ac_save_CFLAGS=$CFLAGS
29102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29103$as_echo_n "checking whether $CC accepts -g... " >&6; }
29104if ${ac_cv_prog_cc_g+:} false; then :
29105  $as_echo_n "(cached) " >&6
29106else
29107  ac_save_c_werror_flag=$ac_c_werror_flag
29108   ac_c_werror_flag=yes
29109   ac_cv_prog_cc_g=no
29110   CFLAGS="-g"
29111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29112/* end confdefs.h.  */
29113
29114int
29115main ()
29116{
29117
29118  ;
29119  return 0;
29120}
29121_ACEOF
29122if ac_fn_c_try_compile "$LINENO"; then :
29123  ac_cv_prog_cc_g=yes
29124else
29125  CFLAGS=""
29126      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128
29129int
29130main ()
29131{
29132
29133  ;
29134  return 0;
29135}
29136_ACEOF
29137if ac_fn_c_try_compile "$LINENO"; then :
29138
29139else
29140  ac_c_werror_flag=$ac_save_c_werror_flag
29141	 CFLAGS="-g"
29142	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29143/* end confdefs.h.  */
29144
29145int
29146main ()
29147{
29148
29149  ;
29150  return 0;
29151}
29152_ACEOF
29153if ac_fn_c_try_compile "$LINENO"; then :
29154  ac_cv_prog_cc_g=yes
29155fi
29156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29157fi
29158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29159fi
29160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29161   ac_c_werror_flag=$ac_save_c_werror_flag
29162fi
29163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29164$as_echo "$ac_cv_prog_cc_g" >&6; }
29165if test "$ac_test_CFLAGS" = set; then
29166  CFLAGS=$ac_save_CFLAGS
29167elif test $ac_cv_prog_cc_g = yes; then
29168  if test "$GCC" = yes; then
29169    CFLAGS="-g -O2"
29170  else
29171    CFLAGS="-g"
29172  fi
29173else
29174  if test "$GCC" = yes; then
29175    CFLAGS="-O2"
29176  else
29177    CFLAGS=
29178  fi
29179fi
29180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29181$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29182if ${ac_cv_prog_cc_c89+:} false; then :
29183  $as_echo_n "(cached) " >&6
29184else
29185  ac_cv_prog_cc_c89=no
29186ac_save_CC=$CC
29187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29188/* end confdefs.h.  */
29189#include <stdarg.h>
29190#include <stdio.h>
29191struct stat;
29192/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29193struct buf { int x; };
29194FILE * (*rcsopen) (struct buf *, struct stat *, int);
29195static char *e (p, i)
29196     char **p;
29197     int i;
29198{
29199  return p[i];
29200}
29201static char *f (char * (*g) (char **, int), char **p, ...)
29202{
29203  char *s;
29204  va_list v;
29205  va_start (v,p);
29206  s = g (p, va_arg (v,int));
29207  va_end (v);
29208  return s;
29209}
29210
29211/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29212   function prototypes and stuff, but not '\xHH' hex character constants.
29213   These don't provoke an error unfortunately, instead are silently treated
29214   as 'x'.  The following induces an error, until -std is added to get
29215   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29216   array size at least.  It's necessary to write '\x00'==0 to get something
29217   that's true only with -std.  */
29218int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29219
29220/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29221   inside strings and character constants.  */
29222#define FOO(x) 'x'
29223int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29224
29225int test (int i, double x);
29226struct s1 {int (*f) (int a);};
29227struct s2 {int (*f) (double a);};
29228int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29229int argc;
29230char **argv;
29231int
29232main ()
29233{
29234return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29235  ;
29236  return 0;
29237}
29238_ACEOF
29239for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29240	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29241do
29242  CC="$ac_save_CC $ac_arg"
29243  if ac_fn_c_try_compile "$LINENO"; then :
29244  ac_cv_prog_cc_c89=$ac_arg
29245fi
29246rm -f core conftest.err conftest.$ac_objext
29247  test "x$ac_cv_prog_cc_c89" != "xno" && break
29248done
29249rm -f conftest.$ac_ext
29250CC=$ac_save_CC
29251
29252fi
29253# AC_CACHE_VAL
29254case "x$ac_cv_prog_cc_c89" in
29255  x)
29256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29257$as_echo "none needed" >&6; } ;;
29258  xno)
29259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29260$as_echo "unsupported" >&6; } ;;
29261  *)
29262    CC="$CC $ac_cv_prog_cc_c89"
29263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29264$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29265esac
29266if test "x$ac_cv_prog_cc_c89" != xno; then :
29267
29268fi
29269
29270ac_ext=cpp
29271ac_cpp='$CXXCPP $CPPFLAGS'
29272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29275
29276
29277
29278  COMPILER_NAME=C++
29279  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29280
29281  if test "x$CXX" != x; then
29282    # User has supplied compiler name already, always let that override.
29283    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29284$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29285    if test "x`basename $CXX`" = "x$CXX"; then
29286      # A command without a complete path is provided, search $PATH.
29287
29288      for ac_prog in $CXX
29289do
29290  # Extract the first word of "$ac_prog", so it can be a program name with args.
29291set dummy $ac_prog; ac_word=$2
29292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29293$as_echo_n "checking for $ac_word... " >&6; }
29294if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29295  $as_echo_n "(cached) " >&6
29296else
29297  case $POTENTIAL_CXX in
29298  [\\/]* | ?:[\\/]*)
29299  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29300  ;;
29301  *)
29302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29303for as_dir in $PATH
29304do
29305  IFS=$as_save_IFS
29306  test -z "$as_dir" && as_dir=.
29307    for ac_exec_ext in '' $ac_executable_extensions; do
29308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29309    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29311    break 2
29312  fi
29313done
29314  done
29315IFS=$as_save_IFS
29316
29317  ;;
29318esac
29319fi
29320POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29321if test -n "$POTENTIAL_CXX"; then
29322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29323$as_echo "$POTENTIAL_CXX" >&6; }
29324else
29325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29326$as_echo "no" >&6; }
29327fi
29328
29329
29330  test -n "$POTENTIAL_CXX" && break
29331done
29332
29333      if test "x$POTENTIAL_CXX" != x; then
29334        CXX=$POTENTIAL_CXX
29335      else
29336        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29337      fi
29338    else
29339      # Otherwise it might already be a complete path
29340      if test ! -x "$CXX"; then
29341        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29342      fi
29343    fi
29344  else
29345    # No user supplied value. Locate compiler ourselves.
29346
29347    # If we are cross compiling, assume cross compilation tools follows the
29348    # cross compilation standard where they are prefixed with the autoconf
29349    # standard name for the target. For example the binary
29350    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29351    # If we are not cross compiling, then the default compiler name will be
29352    # used.
29353
29354    CXX=
29355    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29356    # before checking the rest of the PATH.
29357    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29358    # step, this should not be necessary.
29359    if test -n "$TOOLCHAIN_PATH"; then
29360      PATH_save="$PATH"
29361      PATH="$TOOLCHAIN_PATH"
29362      for ac_prog in $SEARCH_LIST
29363do
29364  # Extract the first word of "$ac_prog", so it can be a program name with args.
29365set dummy $ac_prog; ac_word=$2
29366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29367$as_echo_n "checking for $ac_word... " >&6; }
29368if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29369  $as_echo_n "(cached) " >&6
29370else
29371  case $TOOLCHAIN_PATH_CXX in
29372  [\\/]* | ?:[\\/]*)
29373  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29374  ;;
29375  *)
29376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29377for as_dir in $PATH
29378do
29379  IFS=$as_save_IFS
29380  test -z "$as_dir" && as_dir=.
29381    for ac_exec_ext in '' $ac_executable_extensions; do
29382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29383    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29385    break 2
29386  fi
29387done
29388  done
29389IFS=$as_save_IFS
29390
29391  ;;
29392esac
29393fi
29394TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29395if test -n "$TOOLCHAIN_PATH_CXX"; then
29396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29397$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29398else
29399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29400$as_echo "no" >&6; }
29401fi
29402
29403
29404  test -n "$TOOLCHAIN_PATH_CXX" && break
29405done
29406
29407      CXX=$TOOLCHAIN_PATH_CXX
29408      PATH="$PATH_save"
29409    fi
29410
29411    # AC_PATH_PROGS can't be run multiple times with the same variable,
29412    # so create a new name for this run.
29413    if test "x$CXX" = x; then
29414      for ac_prog in $SEARCH_LIST
29415do
29416  # Extract the first word of "$ac_prog", so it can be a program name with args.
29417set dummy $ac_prog; ac_word=$2
29418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29419$as_echo_n "checking for $ac_word... " >&6; }
29420if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29421  $as_echo_n "(cached) " >&6
29422else
29423  case $POTENTIAL_CXX in
29424  [\\/]* | ?:[\\/]*)
29425  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29426  ;;
29427  *)
29428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29429for as_dir in $PATH
29430do
29431  IFS=$as_save_IFS
29432  test -z "$as_dir" && as_dir=.
29433    for ac_exec_ext in '' $ac_executable_extensions; do
29434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29435    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29437    break 2
29438  fi
29439done
29440  done
29441IFS=$as_save_IFS
29442
29443  ;;
29444esac
29445fi
29446POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29447if test -n "$POTENTIAL_CXX"; then
29448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29449$as_echo "$POTENTIAL_CXX" >&6; }
29450else
29451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29452$as_echo "no" >&6; }
29453fi
29454
29455
29456  test -n "$POTENTIAL_CXX" && break
29457done
29458
29459      CXX=$POTENTIAL_CXX
29460    fi
29461
29462    if test "x$CXX" = x; then
29463
29464  # Print a helpful message on how to acquire the necessary build dependency.
29465  # devkit is the help tag: freetype, cups, pulse, alsa etc
29466  MISSING_DEPENDENCY=devkit
29467
29468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29469    cygwin_help $MISSING_DEPENDENCY
29470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29471    msys_help $MISSING_DEPENDENCY
29472  else
29473    PKGHANDLER_COMMAND=
29474
29475    case $PKGHANDLER in
29476      apt-get)
29477        apt_help     $MISSING_DEPENDENCY ;;
29478      yum)
29479        yum_help     $MISSING_DEPENDENCY ;;
29480      port)
29481        port_help    $MISSING_DEPENDENCY ;;
29482      pkgutil)
29483        pkgutil_help $MISSING_DEPENDENCY ;;
29484      pkgadd)
29485        pkgadd_help  $MISSING_DEPENDENCY ;;
29486    esac
29487
29488    if test "x$PKGHANDLER_COMMAND" != x; then
29489      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29490    fi
29491  fi
29492
29493      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29494    fi
29495  fi
29496
29497  # Now we have a compiler binary in CXX. Make sure it's okay.
29498
29499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29500
29501  # First separate the path from the arguments. This will split at the first
29502  # space.
29503  complete="$CXX"
29504  path="${complete%% *}"
29505  tmp="$complete EOL"
29506  arguments="${tmp#* }"
29507
29508  # Input might be given as Windows format, start by converting to
29509  # unix format.
29510  new_path=`$CYGPATH -u "$path"`
29511
29512  # Now try to locate executable using which
29513  new_path=`$WHICH "$new_path" 2> /dev/null`
29514  # bat and cmd files are not always considered executable in cygwin causing which
29515  # to not find them
29516  if test "x$new_path" = x \
29517      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29518      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29519    new_path=`$CYGPATH -u "$path"`
29520  fi
29521  if test "x$new_path" = x; then
29522    # Oops. Which didn't find the executable.
29523    # The splitting of arguments from the executable at a space might have been incorrect,
29524    # since paths with space are more likely in Windows. Give it another try with the whole
29525    # argument.
29526    path="$complete"
29527    arguments="EOL"
29528    new_path=`$CYGPATH -u "$path"`
29529    new_path=`$WHICH "$new_path" 2> /dev/null`
29530    # bat and cmd files are not always considered executable in cygwin causing which
29531    # to not find them
29532    if test "x$new_path" = x \
29533        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29534        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29535      new_path=`$CYGPATH -u "$path"`
29536    fi
29537    if test "x$new_path" = x; then
29538      # It's still not found. Now this is an unrecoverable error.
29539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29540$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29541      has_space=`$ECHO "$complete" | $GREP " "`
29542      if test "x$has_space" != x; then
29543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29545      fi
29546      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29547    fi
29548  fi
29549
29550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29553  # "foo.exe" is OK but "foo" is an error.
29554  #
29555  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29556  # It is also a way to make sure we got the proper file name for the real test later on.
29557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29558  if test "x$test_shortpath" = x; then
29559    # Short path failed, file does not exist as specified.
29560    # Try adding .exe or .cmd
29561    if test -f "${new_path}.exe"; then
29562      input_to_shortpath="${new_path}.exe"
29563    elif test -f "${new_path}.cmd"; then
29564      input_to_shortpath="${new_path}.cmd"
29565    else
29566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29567$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29568      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29569$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29570      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29571    fi
29572  else
29573    input_to_shortpath="$new_path"
29574  fi
29575
29576  # Call helper function which possibly converts this using DOS-style short mode.
29577  # If so, the updated path is stored in $new_path.
29578  new_path="$input_to_shortpath"
29579
29580  input_path="$input_to_shortpath"
29581  # Check if we need to convert this using DOS-style short mode. If the path
29582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29583  # take no chances and rewrite it.
29584  # Note: m4 eats our [], so we need to use [ and ] instead.
29585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29586  if test "x$has_forbidden_chars" != x; then
29587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29591      # Going to short mode and back again did indeed matter. Since short mode is
29592      # case insensitive, let's make it lowercase to improve readability.
29593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29594      # Now convert it back to Unix-stile (cygpath)
29595      input_path=`$CYGPATH -u "$shortmode_path"`
29596      new_path="$input_path"
29597    fi
29598  fi
29599
29600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29601  if test "x$test_cygdrive_prefix" = x; then
29602    # As a simple fix, exclude /usr/bin since it's not a real path.
29603    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29605      # a path prefixed by /cygdrive for fixpath to work.
29606      new_path="$CYGWIN_ROOT_PATH$input_path"
29607    fi
29608  fi
29609
29610  # remove trailing .exe if any
29611  new_path="${new_path/%.exe/}"
29612
29613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29614
29615  # First separate the path from the arguments. This will split at the first
29616  # space.
29617  complete="$CXX"
29618  path="${complete%% *}"
29619  tmp="$complete EOL"
29620  arguments="${tmp#* }"
29621
29622  # Input might be given as Windows format, start by converting to
29623  # unix format.
29624  new_path="$path"
29625
29626  windows_path="$new_path"
29627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29628    unix_path=`$CYGPATH -u "$windows_path"`
29629    new_path="$unix_path"
29630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29632    new_path="$unix_path"
29633  fi
29634
29635
29636  # Now try to locate executable using which
29637  new_path=`$WHICH "$new_path" 2> /dev/null`
29638
29639  if test "x$new_path" = x; then
29640    # Oops. Which didn't find the executable.
29641    # The splitting of arguments from the executable at a space might have been incorrect,
29642    # since paths with space are more likely in Windows. Give it another try with the whole
29643    # argument.
29644    path="$complete"
29645    arguments="EOL"
29646    new_path="$path"
29647
29648  windows_path="$new_path"
29649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29650    unix_path=`$CYGPATH -u "$windows_path"`
29651    new_path="$unix_path"
29652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29654    new_path="$unix_path"
29655  fi
29656
29657
29658    new_path=`$WHICH "$new_path" 2> /dev/null`
29659    # bat and cmd files are not always considered executable in MSYS causing which
29660    # to not find them
29661    if test "x$new_path" = x \
29662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29664      new_path="$path"
29665
29666  windows_path="$new_path"
29667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29668    unix_path=`$CYGPATH -u "$windows_path"`
29669    new_path="$unix_path"
29670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29672    new_path="$unix_path"
29673  fi
29674
29675    fi
29676
29677    if test "x$new_path" = x; then
29678      # It's still not found. Now this is an unrecoverable error.
29679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29680$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29681      has_space=`$ECHO "$complete" | $GREP " "`
29682      if test "x$has_space" != x; then
29683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29685      fi
29686      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29687    fi
29688  fi
29689
29690  # Now new_path has a complete unix path to the binary
29691  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29692    # Keep paths in /bin as-is, but remove trailing .exe if any
29693    new_path="${new_path/%.exe/}"
29694    # Do not save /bin paths to all_fixpath_prefixes!
29695  else
29696    # Not in mixed or Windows style, start by that.
29697    new_path=`cmd //c echo $new_path`
29698
29699  input_path="$new_path"
29700  # Check if we need to convert this using DOS-style short mode. If the path
29701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29702  # take no chances and rewrite it.
29703  # Note: m4 eats our [], so we need to use [ and ] instead.
29704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29705  if test "x$has_forbidden_chars" != x; then
29706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29708  fi
29709
29710    # Output is in $new_path
29711
29712  windows_path="$new_path"
29713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29714    unix_path=`$CYGPATH -u "$windows_path"`
29715    new_path="$unix_path"
29716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29718    new_path="$unix_path"
29719  fi
29720
29721    # remove trailing .exe if any
29722    new_path="${new_path/%.exe/}"
29723
29724    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29725    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29726  fi
29727
29728  else
29729    # We're on a unix platform. Hooray! :)
29730    # First separate the path from the arguments. This will split at the first
29731    # space.
29732    complete="$CXX"
29733    path="${complete%% *}"
29734    tmp="$complete EOL"
29735    arguments="${tmp#* }"
29736
29737    # Cannot rely on the command "which" here since it doesn't always work.
29738    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29739    if test -z "$is_absolute_path"; then
29740      # Path to executable is not absolute. Find it.
29741      IFS_save="$IFS"
29742      IFS=:
29743      for p in $PATH; do
29744        if test -f "$p/$path" && test -x "$p/$path"; then
29745          new_path="$p/$path"
29746          break
29747        fi
29748      done
29749      IFS="$IFS_save"
29750    else
29751      # This is an absolute path, we can use it without further modifications.
29752      new_path="$path"
29753    fi
29754
29755    if test "x$new_path" = x; then
29756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29757$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29758      has_space=`$ECHO "$complete" | $GREP " "`
29759      if test "x$has_space" != x; then
29760        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29761$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29762      fi
29763      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29764    fi
29765  fi
29766
29767  # Now join together the path and the arguments once again
29768  if test "x$arguments" != xEOL; then
29769    new_complete="$new_path ${arguments% *}"
29770  else
29771    new_complete="$new_path"
29772  fi
29773
29774  if test "x$complete" != "x$new_complete"; then
29775    CXX="$new_complete"
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29777$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29778  fi
29779
29780  TEST_COMPILER="$CXX"
29781  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29782  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29783  if test "x$OPENJDK_BUILD_OS" != xaix; then
29784    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29786$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29787
29788  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29789    # Follow a chain of symbolic links. Use readlink
29790    # where it exists, else fall back to horribly
29791    # complicated shell code.
29792    if test "x$READLINK_TESTED" != yes; then
29793      # On MacOSX there is a readlink tool with a different
29794      # purpose than the GNU readlink tool. Check the found readlink.
29795      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29796      if test "x$ISGNU" = x; then
29797        # A readlink that we do not know how to use.
29798        # Are there other non-GNU readlinks out there?
29799        READLINK_TESTED=yes
29800        READLINK=
29801      fi
29802    fi
29803
29804    if test "x$READLINK" != x; then
29805      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29806    else
29807      # Save the current directory for restoring afterwards
29808      STARTDIR=$PWD
29809      COUNTER=0
29810      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29811      sym_link_file=`$BASENAME $TEST_COMPILER`
29812      cd $sym_link_dir
29813      # Use -P flag to resolve symlinks in directories.
29814      cd `$THEPWDCMD -P`
29815      sym_link_dir=`$THEPWDCMD -P`
29816      # Resolve file symlinks
29817      while test $COUNTER -lt 20; do
29818        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29819        if test "x$ISLINK" == x; then
29820          # This is not a symbolic link! We are done!
29821          break
29822        fi
29823        # Again resolve directory symlinks since the target of the just found
29824        # link could be in a different directory
29825        cd `$DIRNAME $ISLINK`
29826        sym_link_dir=`$THEPWDCMD -P`
29827        sym_link_file=`$BASENAME $ISLINK`
29828        let COUNTER=COUNTER+1
29829      done
29830      cd $STARTDIR
29831      TEST_COMPILER=$sym_link_dir/$sym_link_file
29832    fi
29833  fi
29834
29835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29836$as_echo "$TEST_COMPILER" >&6; }
29837  fi
29838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29839$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29840
29841  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29842  if test "x$COMPILER_BASENAME" = "xccache"; then
29843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29844$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29845    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29846    # We want to control ccache invocation ourselves, so ignore this cc and try
29847    # searching again.
29848
29849    # Remove the path to the fake ccache cc from the PATH
29850    RETRY_COMPILER_SAVED_PATH="$PATH"
29851    COMPILER_DIRNAME=`$DIRNAME $CXX`
29852    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29853
29854    # Try again looking for our compiler
29855    if test -n "$ac_tool_prefix"; then
29856  for ac_prog in $TOOLCHAIN_CXX_BINARY
29857  do
29858    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29859set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29861$as_echo_n "checking for $ac_word... " >&6; }
29862if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29863  $as_echo_n "(cached) " >&6
29864else
29865  if test -n "$PROPER_COMPILER_CXX"; then
29866  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29867else
29868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29869for as_dir in $PATH
29870do
29871  IFS=$as_save_IFS
29872  test -z "$as_dir" && as_dir=.
29873    for ac_exec_ext in '' $ac_executable_extensions; do
29874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29875    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29877    break 2
29878  fi
29879done
29880  done
29881IFS=$as_save_IFS
29882
29883fi
29884fi
29885PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29886if test -n "$PROPER_COMPILER_CXX"; then
29887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29888$as_echo "$PROPER_COMPILER_CXX" >&6; }
29889else
29890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29891$as_echo "no" >&6; }
29892fi
29893
29894
29895    test -n "$PROPER_COMPILER_CXX" && break
29896  done
29897fi
29898if test -z "$PROPER_COMPILER_CXX"; then
29899  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29900  for ac_prog in $TOOLCHAIN_CXX_BINARY
29901do
29902  # Extract the first word of "$ac_prog", so it can be a program name with args.
29903set dummy $ac_prog; ac_word=$2
29904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29905$as_echo_n "checking for $ac_word... " >&6; }
29906if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29907  $as_echo_n "(cached) " >&6
29908else
29909  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29910  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29911else
29912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29913for as_dir in $PATH
29914do
29915  IFS=$as_save_IFS
29916  test -z "$as_dir" && as_dir=.
29917    for ac_exec_ext in '' $ac_executable_extensions; do
29918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29919    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29921    break 2
29922  fi
29923done
29924  done
29925IFS=$as_save_IFS
29926
29927fi
29928fi
29929ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29930if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29932$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29933else
29934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29935$as_echo "no" >&6; }
29936fi
29937
29938
29939  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29940done
29941
29942  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29943    PROPER_COMPILER_CXX=""
29944  else
29945    case $cross_compiling:$ac_tool_warned in
29946yes:)
29947{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29948$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29949ac_tool_warned=yes ;;
29950esac
29951    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29952  fi
29953fi
29954
29955
29956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29957
29958  # First separate the path from the arguments. This will split at the first
29959  # space.
29960  complete="$PROPER_COMPILER_CXX"
29961  path="${complete%% *}"
29962  tmp="$complete EOL"
29963  arguments="${tmp#* }"
29964
29965  # Input might be given as Windows format, start by converting to
29966  # unix format.
29967  new_path=`$CYGPATH -u "$path"`
29968
29969  # Now try to locate executable using which
29970  new_path=`$WHICH "$new_path" 2> /dev/null`
29971  # bat and cmd files are not always considered executable in cygwin causing which
29972  # to not find them
29973  if test "x$new_path" = x \
29974      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29975      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29976    new_path=`$CYGPATH -u "$path"`
29977  fi
29978  if test "x$new_path" = x; then
29979    # Oops. Which didn't find the executable.
29980    # The splitting of arguments from the executable at a space might have been incorrect,
29981    # since paths with space are more likely in Windows. Give it another try with the whole
29982    # argument.
29983    path="$complete"
29984    arguments="EOL"
29985    new_path=`$CYGPATH -u "$path"`
29986    new_path=`$WHICH "$new_path" 2> /dev/null`
29987    # bat and cmd files are not always considered executable in cygwin causing which
29988    # to not find them
29989    if test "x$new_path" = x \
29990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29992      new_path=`$CYGPATH -u "$path"`
29993    fi
29994    if test "x$new_path" = x; then
29995      # It's still not found. Now this is an unrecoverable error.
29996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29997$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29998      has_space=`$ECHO "$complete" | $GREP " "`
29999      if test "x$has_space" != x; then
30000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30002      fi
30003      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30004    fi
30005  fi
30006
30007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30010  # "foo.exe" is OK but "foo" is an error.
30011  #
30012  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30013  # It is also a way to make sure we got the proper file name for the real test later on.
30014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30015  if test "x$test_shortpath" = x; then
30016    # Short path failed, file does not exist as specified.
30017    # Try adding .exe or .cmd
30018    if test -f "${new_path}.exe"; then
30019      input_to_shortpath="${new_path}.exe"
30020    elif test -f "${new_path}.cmd"; then
30021      input_to_shortpath="${new_path}.cmd"
30022    else
30023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30024$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30025      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30026$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30027      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30028    fi
30029  else
30030    input_to_shortpath="$new_path"
30031  fi
30032
30033  # Call helper function which possibly converts this using DOS-style short mode.
30034  # If so, the updated path is stored in $new_path.
30035  new_path="$input_to_shortpath"
30036
30037  input_path="$input_to_shortpath"
30038  # Check if we need to convert this using DOS-style short mode. If the path
30039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30040  # take no chances and rewrite it.
30041  # Note: m4 eats our [], so we need to use [ and ] instead.
30042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30043  if test "x$has_forbidden_chars" != x; then
30044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30048      # Going to short mode and back again did indeed matter. Since short mode is
30049      # case insensitive, let's make it lowercase to improve readability.
30050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30051      # Now convert it back to Unix-stile (cygpath)
30052      input_path=`$CYGPATH -u "$shortmode_path"`
30053      new_path="$input_path"
30054    fi
30055  fi
30056
30057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30058  if test "x$test_cygdrive_prefix" = x; then
30059    # As a simple fix, exclude /usr/bin since it's not a real path.
30060    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30062      # a path prefixed by /cygdrive for fixpath to work.
30063      new_path="$CYGWIN_ROOT_PATH$input_path"
30064    fi
30065  fi
30066
30067  # remove trailing .exe if any
30068  new_path="${new_path/%.exe/}"
30069
30070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30071
30072  # First separate the path from the arguments. This will split at the first
30073  # space.
30074  complete="$PROPER_COMPILER_CXX"
30075  path="${complete%% *}"
30076  tmp="$complete EOL"
30077  arguments="${tmp#* }"
30078
30079  # Input might be given as Windows format, start by converting to
30080  # unix format.
30081  new_path="$path"
30082
30083  windows_path="$new_path"
30084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30085    unix_path=`$CYGPATH -u "$windows_path"`
30086    new_path="$unix_path"
30087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30089    new_path="$unix_path"
30090  fi
30091
30092
30093  # Now try to locate executable using which
30094  new_path=`$WHICH "$new_path" 2> /dev/null`
30095
30096  if test "x$new_path" = x; then
30097    # Oops. Which didn't find the executable.
30098    # The splitting of arguments from the executable at a space might have been incorrect,
30099    # since paths with space are more likely in Windows. Give it another try with the whole
30100    # argument.
30101    path="$complete"
30102    arguments="EOL"
30103    new_path="$path"
30104
30105  windows_path="$new_path"
30106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30107    unix_path=`$CYGPATH -u "$windows_path"`
30108    new_path="$unix_path"
30109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30111    new_path="$unix_path"
30112  fi
30113
30114
30115    new_path=`$WHICH "$new_path" 2> /dev/null`
30116    # bat and cmd files are not always considered executable in MSYS causing which
30117    # to not find them
30118    if test "x$new_path" = x \
30119        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30120        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30121      new_path="$path"
30122
30123  windows_path="$new_path"
30124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30125    unix_path=`$CYGPATH -u "$windows_path"`
30126    new_path="$unix_path"
30127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30129    new_path="$unix_path"
30130  fi
30131
30132    fi
30133
30134    if test "x$new_path" = x; then
30135      # It's still not found. Now this is an unrecoverable error.
30136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30137$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30138      has_space=`$ECHO "$complete" | $GREP " "`
30139      if test "x$has_space" != x; then
30140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30142      fi
30143      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30144    fi
30145  fi
30146
30147  # Now new_path has a complete unix path to the binary
30148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30149    # Keep paths in /bin as-is, but remove trailing .exe if any
30150    new_path="${new_path/%.exe/}"
30151    # Do not save /bin paths to all_fixpath_prefixes!
30152  else
30153    # Not in mixed or Windows style, start by that.
30154    new_path=`cmd //c echo $new_path`
30155
30156  input_path="$new_path"
30157  # Check if we need to convert this using DOS-style short mode. If the path
30158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30159  # take no chances and rewrite it.
30160  # Note: m4 eats our [], so we need to use [ and ] instead.
30161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30162  if test "x$has_forbidden_chars" != x; then
30163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30165  fi
30166
30167    # Output is in $new_path
30168
30169  windows_path="$new_path"
30170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30171    unix_path=`$CYGPATH -u "$windows_path"`
30172    new_path="$unix_path"
30173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30175    new_path="$unix_path"
30176  fi
30177
30178    # remove trailing .exe if any
30179    new_path="${new_path/%.exe/}"
30180
30181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30183  fi
30184
30185  else
30186    # We're on a unix platform. Hooray! :)
30187    # First separate the path from the arguments. This will split at the first
30188    # space.
30189    complete="$PROPER_COMPILER_CXX"
30190    path="${complete%% *}"
30191    tmp="$complete EOL"
30192    arguments="${tmp#* }"
30193
30194    # Cannot rely on the command "which" here since it doesn't always work.
30195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30196    if test -z "$is_absolute_path"; then
30197      # Path to executable is not absolute. Find it.
30198      IFS_save="$IFS"
30199      IFS=:
30200      for p in $PATH; do
30201        if test -f "$p/$path" && test -x "$p/$path"; then
30202          new_path="$p/$path"
30203          break
30204        fi
30205      done
30206      IFS="$IFS_save"
30207    else
30208      # This is an absolute path, we can use it without further modifications.
30209      new_path="$path"
30210    fi
30211
30212    if test "x$new_path" = x; then
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30214$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30215      has_space=`$ECHO "$complete" | $GREP " "`
30216      if test "x$has_space" != x; then
30217        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30219      fi
30220      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30221    fi
30222  fi
30223
30224  # Now join together the path and the arguments once again
30225  if test "x$arguments" != xEOL; then
30226    new_complete="$new_path ${arguments% *}"
30227  else
30228    new_complete="$new_path"
30229  fi
30230
30231  if test "x$complete" != "x$new_complete"; then
30232    PROPER_COMPILER_CXX="$new_complete"
30233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30234$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30235  fi
30236
30237    PATH="$RETRY_COMPILER_SAVED_PATH"
30238
30239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30240$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30241
30242  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30243    # Follow a chain of symbolic links. Use readlink
30244    # where it exists, else fall back to horribly
30245    # complicated shell code.
30246    if test "x$READLINK_TESTED" != yes; then
30247      # On MacOSX there is a readlink tool with a different
30248      # purpose than the GNU readlink tool. Check the found readlink.
30249      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30250      if test "x$ISGNU" = x; then
30251        # A readlink that we do not know how to use.
30252        # Are there other non-GNU readlinks out there?
30253        READLINK_TESTED=yes
30254        READLINK=
30255      fi
30256    fi
30257
30258    if test "x$READLINK" != x; then
30259      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30260    else
30261      # Save the current directory for restoring afterwards
30262      STARTDIR=$PWD
30263      COUNTER=0
30264      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30265      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30266      cd $sym_link_dir
30267      # Use -P flag to resolve symlinks in directories.
30268      cd `$THEPWDCMD -P`
30269      sym_link_dir=`$THEPWDCMD -P`
30270      # Resolve file symlinks
30271      while test $COUNTER -lt 20; do
30272        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30273        if test "x$ISLINK" == x; then
30274          # This is not a symbolic link! We are done!
30275          break
30276        fi
30277        # Again resolve directory symlinks since the target of the just found
30278        # link could be in a different directory
30279        cd `$DIRNAME $ISLINK`
30280        sym_link_dir=`$THEPWDCMD -P`
30281        sym_link_file=`$BASENAME $ISLINK`
30282        let COUNTER=COUNTER+1
30283      done
30284      cd $STARTDIR
30285      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30286    fi
30287  fi
30288
30289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30290$as_echo "$PROPER_COMPILER_CXX" >&6; }
30291    CXX="$PROPER_COMPILER_CXX"
30292  else
30293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30294$as_echo "no, keeping CXX" >&6; }
30295  fi
30296
30297
30298  COMPILER=$CXX
30299  COMPILER_NAME=$COMPILER_NAME
30300
30301  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30302    # cc -V output typically looks like
30303    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30304    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30305    # Check that this is likely to be the Solaris Studio cc.
30306    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30307    if test $? -ne 0; then
30308      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30309      { $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
30310$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30311      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30312$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30313      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30314$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30315      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30316    fi
30317    # Remove usage instructions (if present), and
30318    # collapse compiler output into a single line
30319    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30320        $SED -e 's/ *[Uu]sage:.*//'`
30321    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30322        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30323  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30324    # xlc -qversion output typically looks like
30325    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30326    #     Version: 11.01.0000.0015
30327    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30328    # Check that this is likely to be the IBM XL C compiler.
30329    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30330    if test $? -ne 0; then
30331      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30332      { $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
30333$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30334      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30335$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30336      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30337$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30338      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30339    fi
30340    # Collapse compiler output into a single line
30341    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30342    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30343        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30344  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30345    # There is no specific version flag, but all output starts with a version string.
30346    # First line typically looks something like:
30347    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30348    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30349    # Check that this is likely to be Microsoft CL.EXE.
30350    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30351    if test $? -ne 0; then
30352      { $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
30353$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30354      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30355$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30356      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30357    fi
30358    # Collapse compiler output into a single line
30359    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30360    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30361        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30362  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30363    # gcc --version output typically looks like
30364    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30365    #     Copyright (C) 2013 Free Software Foundation, Inc.
30366    #     This is free software; see the source for copying conditions.  There is NO
30367    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30368    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30369    # Check that this is likely to be GCC.
30370    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30371    if test $? -ne 0; then
30372      { $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
30373$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30374      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30375$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30376      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30377    fi
30378    # Remove Copyright and legalese from version string, and
30379    # collapse into a single line
30380    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30381        $SED -e 's/ *Copyright .*//'`
30382    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30383        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30384  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30385    # clang --version output typically looks like
30386    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30387    #    clang version 3.3 (tags/RELEASE_33/final)
30388    # or
30389    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30390    #    Target: x86_64-pc-linux-gnu
30391    #    Thread model: posix
30392    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30393    # Check that this is likely to be clang
30394    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30395    if test $? -ne 0; then
30396      { $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
30397$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30398      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30399$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30400      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30401    fi
30402    # Collapse compiler output into a single line
30403    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30404    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30405        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30406  else
30407      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30408  fi
30409  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30410  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30411  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30412  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30413
30414  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30415$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30416
30417
30418  # Now that we have resolved CXX ourself, let autoconf have its go at it
30419  ac_ext=cpp
30420ac_cpp='$CXXCPP $CPPFLAGS'
30421ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30422ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30423ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30424if test -z "$CXX"; then
30425  if test -n "$CCC"; then
30426    CXX=$CCC
30427  else
30428    if test -n "$ac_tool_prefix"; then
30429  for ac_prog in $CXX
30430  do
30431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30434$as_echo_n "checking for $ac_word... " >&6; }
30435if ${ac_cv_prog_CXX+:} false; then :
30436  $as_echo_n "(cached) " >&6
30437else
30438  if test -n "$CXX"; then
30439  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30440else
30441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30442for as_dir in $PATH
30443do
30444  IFS=$as_save_IFS
30445  test -z "$as_dir" && as_dir=.
30446    for ac_exec_ext in '' $ac_executable_extensions; do
30447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30448    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30450    break 2
30451  fi
30452done
30453  done
30454IFS=$as_save_IFS
30455
30456fi
30457fi
30458CXX=$ac_cv_prog_CXX
30459if test -n "$CXX"; then
30460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30461$as_echo "$CXX" >&6; }
30462else
30463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30464$as_echo "no" >&6; }
30465fi
30466
30467
30468    test -n "$CXX" && break
30469  done
30470fi
30471if test -z "$CXX"; then
30472  ac_ct_CXX=$CXX
30473  for ac_prog in $CXX
30474do
30475  # Extract the first word of "$ac_prog", so it can be a program name with args.
30476set dummy $ac_prog; ac_word=$2
30477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30478$as_echo_n "checking for $ac_word... " >&6; }
30479if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30480  $as_echo_n "(cached) " >&6
30481else
30482  if test -n "$ac_ct_CXX"; then
30483  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30484else
30485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30486for as_dir in $PATH
30487do
30488  IFS=$as_save_IFS
30489  test -z "$as_dir" && as_dir=.
30490    for ac_exec_ext in '' $ac_executable_extensions; do
30491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30492    ac_cv_prog_ac_ct_CXX="$ac_prog"
30493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30494    break 2
30495  fi
30496done
30497  done
30498IFS=$as_save_IFS
30499
30500fi
30501fi
30502ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30503if test -n "$ac_ct_CXX"; then
30504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30505$as_echo "$ac_ct_CXX" >&6; }
30506else
30507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30508$as_echo "no" >&6; }
30509fi
30510
30511
30512  test -n "$ac_ct_CXX" && break
30513done
30514
30515  if test "x$ac_ct_CXX" = x; then
30516    CXX="g++"
30517  else
30518    case $cross_compiling:$ac_tool_warned in
30519yes:)
30520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30522ac_tool_warned=yes ;;
30523esac
30524    CXX=$ac_ct_CXX
30525  fi
30526fi
30527
30528  fi
30529fi
30530# Provide some information about the compiler.
30531$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30532set X $ac_compile
30533ac_compiler=$2
30534for ac_option in --version -v -V -qversion; do
30535  { { ac_try="$ac_compiler $ac_option >&5"
30536case "(($ac_try" in
30537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30538  *) ac_try_echo=$ac_try;;
30539esac
30540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30541$as_echo "$ac_try_echo"; } >&5
30542  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30543  ac_status=$?
30544  if test -s conftest.err; then
30545    sed '10a\
30546... rest of stderr output deleted ...
30547         10q' conftest.err >conftest.er1
30548    cat conftest.er1 >&5
30549  fi
30550  rm -f conftest.er1 conftest.err
30551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30552  test $ac_status = 0; }
30553done
30554
30555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30556$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30557if ${ac_cv_cxx_compiler_gnu+:} false; then :
30558  $as_echo_n "(cached) " >&6
30559else
30560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30561/* end confdefs.h.  */
30562
30563int
30564main ()
30565{
30566#ifndef __GNUC__
30567       choke me
30568#endif
30569
30570  ;
30571  return 0;
30572}
30573_ACEOF
30574if ac_fn_cxx_try_compile "$LINENO"; then :
30575  ac_compiler_gnu=yes
30576else
30577  ac_compiler_gnu=no
30578fi
30579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30580ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30581
30582fi
30583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30584$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30585if test $ac_compiler_gnu = yes; then
30586  GXX=yes
30587else
30588  GXX=
30589fi
30590ac_test_CXXFLAGS=${CXXFLAGS+set}
30591ac_save_CXXFLAGS=$CXXFLAGS
30592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30593$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30594if ${ac_cv_prog_cxx_g+:} false; then :
30595  $as_echo_n "(cached) " >&6
30596else
30597  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30598   ac_cxx_werror_flag=yes
30599   ac_cv_prog_cxx_g=no
30600   CXXFLAGS="-g"
30601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30602/* end confdefs.h.  */
30603
30604int
30605main ()
30606{
30607
30608  ;
30609  return 0;
30610}
30611_ACEOF
30612if ac_fn_cxx_try_compile "$LINENO"; then :
30613  ac_cv_prog_cxx_g=yes
30614else
30615  CXXFLAGS=""
30616      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30617/* end confdefs.h.  */
30618
30619int
30620main ()
30621{
30622
30623  ;
30624  return 0;
30625}
30626_ACEOF
30627if ac_fn_cxx_try_compile "$LINENO"; then :
30628
30629else
30630  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30631	 CXXFLAGS="-g"
30632	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30633/* end confdefs.h.  */
30634
30635int
30636main ()
30637{
30638
30639  ;
30640  return 0;
30641}
30642_ACEOF
30643if ac_fn_cxx_try_compile "$LINENO"; then :
30644  ac_cv_prog_cxx_g=yes
30645fi
30646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30647fi
30648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30649fi
30650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30651   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30652fi
30653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30654$as_echo "$ac_cv_prog_cxx_g" >&6; }
30655if test "$ac_test_CXXFLAGS" = set; then
30656  CXXFLAGS=$ac_save_CXXFLAGS
30657elif test $ac_cv_prog_cxx_g = yes; then
30658  if test "$GXX" = yes; then
30659    CXXFLAGS="-g -O2"
30660  else
30661    CXXFLAGS="-g"
30662  fi
30663else
30664  if test "$GXX" = yes; then
30665    CXXFLAGS="-O2"
30666  else
30667    CXXFLAGS=
30668  fi
30669fi
30670ac_ext=cpp
30671ac_cpp='$CXXCPP $CPPFLAGS'
30672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30675
30676
30677  #
30678  # Setup the preprocessor (CPP and CXXCPP)
30679  #
30680  ac_ext=c
30681ac_cpp='$CPP $CPPFLAGS'
30682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30684ac_compiler_gnu=$ac_cv_c_compiler_gnu
30685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30686$as_echo_n "checking how to run the C preprocessor... " >&6; }
30687# On Suns, sometimes $CPP names a directory.
30688if test -n "$CPP" && test -d "$CPP"; then
30689  CPP=
30690fi
30691if test -z "$CPP"; then
30692  if ${ac_cv_prog_CPP+:} false; then :
30693  $as_echo_n "(cached) " >&6
30694else
30695      # Double quotes because CPP needs to be expanded
30696    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30697    do
30698      ac_preproc_ok=false
30699for ac_c_preproc_warn_flag in '' yes
30700do
30701  # Use a header file that comes with gcc, so configuring glibc
30702  # with a fresh cross-compiler works.
30703  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30704  # <limits.h> exists even on freestanding compilers.
30705  # On the NeXT, cc -E runs the code through the compiler's parser,
30706  # not just through cpp. "Syntax error" is here to catch this case.
30707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30708/* end confdefs.h.  */
30709#ifdef __STDC__
30710# include <limits.h>
30711#else
30712# include <assert.h>
30713#endif
30714		     Syntax error
30715_ACEOF
30716if ac_fn_c_try_cpp "$LINENO"; then :
30717
30718else
30719  # Broken: fails on valid input.
30720continue
30721fi
30722rm -f conftest.err conftest.i conftest.$ac_ext
30723
30724  # OK, works on sane cases.  Now check whether nonexistent headers
30725  # can be detected and how.
30726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30727/* end confdefs.h.  */
30728#include <ac_nonexistent.h>
30729_ACEOF
30730if ac_fn_c_try_cpp "$LINENO"; then :
30731  # Broken: success on invalid input.
30732continue
30733else
30734  # Passes both tests.
30735ac_preproc_ok=:
30736break
30737fi
30738rm -f conftest.err conftest.i conftest.$ac_ext
30739
30740done
30741# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30742rm -f conftest.i conftest.err conftest.$ac_ext
30743if $ac_preproc_ok; then :
30744  break
30745fi
30746
30747    done
30748    ac_cv_prog_CPP=$CPP
30749
30750fi
30751  CPP=$ac_cv_prog_CPP
30752else
30753  ac_cv_prog_CPP=$CPP
30754fi
30755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30756$as_echo "$CPP" >&6; }
30757ac_preproc_ok=false
30758for ac_c_preproc_warn_flag in '' yes
30759do
30760  # Use a header file that comes with gcc, so configuring glibc
30761  # with a fresh cross-compiler works.
30762  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30763  # <limits.h> exists even on freestanding compilers.
30764  # On the NeXT, cc -E runs the code through the compiler's parser,
30765  # not just through cpp. "Syntax error" is here to catch this case.
30766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30767/* end confdefs.h.  */
30768#ifdef __STDC__
30769# include <limits.h>
30770#else
30771# include <assert.h>
30772#endif
30773		     Syntax error
30774_ACEOF
30775if ac_fn_c_try_cpp "$LINENO"; then :
30776
30777else
30778  # Broken: fails on valid input.
30779continue
30780fi
30781rm -f conftest.err conftest.i conftest.$ac_ext
30782
30783  # OK, works on sane cases.  Now check whether nonexistent headers
30784  # can be detected and how.
30785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30786/* end confdefs.h.  */
30787#include <ac_nonexistent.h>
30788_ACEOF
30789if ac_fn_c_try_cpp "$LINENO"; then :
30790  # Broken: success on invalid input.
30791continue
30792else
30793  # Passes both tests.
30794ac_preproc_ok=:
30795break
30796fi
30797rm -f conftest.err conftest.i conftest.$ac_ext
30798
30799done
30800# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30801rm -f conftest.i conftest.err conftest.$ac_ext
30802if $ac_preproc_ok; then :
30803
30804else
30805  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30807as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30808See \`config.log' for more details" "$LINENO" 5; }
30809fi
30810
30811ac_ext=cpp
30812ac_cpp='$CXXCPP $CPPFLAGS'
30813ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30814ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30815ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30816
30817
30818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30819
30820  # First separate the path from the arguments. This will split at the first
30821  # space.
30822  complete="$CPP"
30823  path="${complete%% *}"
30824  tmp="$complete EOL"
30825  arguments="${tmp#* }"
30826
30827  # Input might be given as Windows format, start by converting to
30828  # unix format.
30829  new_path=`$CYGPATH -u "$path"`
30830
30831  # Now try to locate executable using which
30832  new_path=`$WHICH "$new_path" 2> /dev/null`
30833  # bat and cmd files are not always considered executable in cygwin causing which
30834  # to not find them
30835  if test "x$new_path" = x \
30836      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30837      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30838    new_path=`$CYGPATH -u "$path"`
30839  fi
30840  if test "x$new_path" = x; then
30841    # Oops. Which didn't find the executable.
30842    # The splitting of arguments from the executable at a space might have been incorrect,
30843    # since paths with space are more likely in Windows. Give it another try with the whole
30844    # argument.
30845    path="$complete"
30846    arguments="EOL"
30847    new_path=`$CYGPATH -u "$path"`
30848    new_path=`$WHICH "$new_path" 2> /dev/null`
30849    # bat and cmd files are not always considered executable in cygwin causing which
30850    # to not find them
30851    if test "x$new_path" = x \
30852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30854      new_path=`$CYGPATH -u "$path"`
30855    fi
30856    if test "x$new_path" = x; then
30857      # It's still not found. Now this is an unrecoverable error.
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30859$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30860      has_space=`$ECHO "$complete" | $GREP " "`
30861      if test "x$has_space" != x; then
30862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30864      fi
30865      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30866    fi
30867  fi
30868
30869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30872  # "foo.exe" is OK but "foo" is an error.
30873  #
30874  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30875  # It is also a way to make sure we got the proper file name for the real test later on.
30876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30877  if test "x$test_shortpath" = x; then
30878    # Short path failed, file does not exist as specified.
30879    # Try adding .exe or .cmd
30880    if test -f "${new_path}.exe"; then
30881      input_to_shortpath="${new_path}.exe"
30882    elif test -f "${new_path}.cmd"; then
30883      input_to_shortpath="${new_path}.cmd"
30884    else
30885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30886$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30887      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30888$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30889      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30890    fi
30891  else
30892    input_to_shortpath="$new_path"
30893  fi
30894
30895  # Call helper function which possibly converts this using DOS-style short mode.
30896  # If so, the updated path is stored in $new_path.
30897  new_path="$input_to_shortpath"
30898
30899  input_path="$input_to_shortpath"
30900  # Check if we need to convert this using DOS-style short mode. If the path
30901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30902  # take no chances and rewrite it.
30903  # Note: m4 eats our [], so we need to use [ and ] instead.
30904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30905  if test "x$has_forbidden_chars" != x; then
30906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30910      # Going to short mode and back again did indeed matter. Since short mode is
30911      # case insensitive, let's make it lowercase to improve readability.
30912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30913      # Now convert it back to Unix-stile (cygpath)
30914      input_path=`$CYGPATH -u "$shortmode_path"`
30915      new_path="$input_path"
30916    fi
30917  fi
30918
30919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30920  if test "x$test_cygdrive_prefix" = x; then
30921    # As a simple fix, exclude /usr/bin since it's not a real path.
30922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30924      # a path prefixed by /cygdrive for fixpath to work.
30925      new_path="$CYGWIN_ROOT_PATH$input_path"
30926    fi
30927  fi
30928
30929  # remove trailing .exe if any
30930  new_path="${new_path/%.exe/}"
30931
30932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30933
30934  # First separate the path from the arguments. This will split at the first
30935  # space.
30936  complete="$CPP"
30937  path="${complete%% *}"
30938  tmp="$complete EOL"
30939  arguments="${tmp#* }"
30940
30941  # Input might be given as Windows format, start by converting to
30942  # unix format.
30943  new_path="$path"
30944
30945  windows_path="$new_path"
30946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30947    unix_path=`$CYGPATH -u "$windows_path"`
30948    new_path="$unix_path"
30949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30951    new_path="$unix_path"
30952  fi
30953
30954
30955  # Now try to locate executable using which
30956  new_path=`$WHICH "$new_path" 2> /dev/null`
30957
30958  if test "x$new_path" = x; then
30959    # Oops. Which didn't find the executable.
30960    # The splitting of arguments from the executable at a space might have been incorrect,
30961    # since paths with space are more likely in Windows. Give it another try with the whole
30962    # argument.
30963    path="$complete"
30964    arguments="EOL"
30965    new_path="$path"
30966
30967  windows_path="$new_path"
30968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30969    unix_path=`$CYGPATH -u "$windows_path"`
30970    new_path="$unix_path"
30971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30973    new_path="$unix_path"
30974  fi
30975
30976
30977    new_path=`$WHICH "$new_path" 2> /dev/null`
30978    # bat and cmd files are not always considered executable in MSYS causing which
30979    # to not find them
30980    if test "x$new_path" = x \
30981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30983      new_path="$path"
30984
30985  windows_path="$new_path"
30986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30987    unix_path=`$CYGPATH -u "$windows_path"`
30988    new_path="$unix_path"
30989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30991    new_path="$unix_path"
30992  fi
30993
30994    fi
30995
30996    if test "x$new_path" = x; then
30997      # It's still not found. Now this is an unrecoverable error.
30998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30999$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31000      has_space=`$ECHO "$complete" | $GREP " "`
31001      if test "x$has_space" != x; then
31002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31004      fi
31005      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31006    fi
31007  fi
31008
31009  # Now new_path has a complete unix path to the binary
31010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31011    # Keep paths in /bin as-is, but remove trailing .exe if any
31012    new_path="${new_path/%.exe/}"
31013    # Do not save /bin paths to all_fixpath_prefixes!
31014  else
31015    # Not in mixed or Windows style, start by that.
31016    new_path=`cmd //c echo $new_path`
31017
31018  input_path="$new_path"
31019  # Check if we need to convert this using DOS-style short mode. If the path
31020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31021  # take no chances and rewrite it.
31022  # Note: m4 eats our [], so we need to use [ and ] instead.
31023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31024  if test "x$has_forbidden_chars" != x; then
31025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31027  fi
31028
31029    # Output is in $new_path
31030
31031  windows_path="$new_path"
31032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31033    unix_path=`$CYGPATH -u "$windows_path"`
31034    new_path="$unix_path"
31035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31037    new_path="$unix_path"
31038  fi
31039
31040    # remove trailing .exe if any
31041    new_path="${new_path/%.exe/}"
31042
31043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31045  fi
31046
31047  else
31048    # We're on a unix platform. Hooray! :)
31049    # First separate the path from the arguments. This will split at the first
31050    # space.
31051    complete="$CPP"
31052    path="${complete%% *}"
31053    tmp="$complete EOL"
31054    arguments="${tmp#* }"
31055
31056    # Cannot rely on the command "which" here since it doesn't always work.
31057    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31058    if test -z "$is_absolute_path"; then
31059      # Path to executable is not absolute. Find it.
31060      IFS_save="$IFS"
31061      IFS=:
31062      for p in $PATH; do
31063        if test -f "$p/$path" && test -x "$p/$path"; then
31064          new_path="$p/$path"
31065          break
31066        fi
31067      done
31068      IFS="$IFS_save"
31069    else
31070      # This is an absolute path, we can use it without further modifications.
31071      new_path="$path"
31072    fi
31073
31074    if test "x$new_path" = x; then
31075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31076$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31077      has_space=`$ECHO "$complete" | $GREP " "`
31078      if test "x$has_space" != x; then
31079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31081      fi
31082      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31083    fi
31084  fi
31085
31086  # Now join together the path and the arguments once again
31087  if test "x$arguments" != xEOL; then
31088    new_complete="$new_path ${arguments% *}"
31089  else
31090    new_complete="$new_path"
31091  fi
31092
31093  if test "x$complete" != "x$new_complete"; then
31094    CPP="$new_complete"
31095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31096$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31097  fi
31098
31099  ac_ext=cpp
31100ac_cpp='$CXXCPP $CPPFLAGS'
31101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31105$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31106if test -z "$CXXCPP"; then
31107  if ${ac_cv_prog_CXXCPP+:} false; then :
31108  $as_echo_n "(cached) " >&6
31109else
31110      # Double quotes because CXXCPP needs to be expanded
31111    for CXXCPP in "$CXX -E" "/lib/cpp"
31112    do
31113      ac_preproc_ok=false
31114for ac_cxx_preproc_warn_flag in '' yes
31115do
31116  # Use a header file that comes with gcc, so configuring glibc
31117  # with a fresh cross-compiler works.
31118  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31119  # <limits.h> exists even on freestanding compilers.
31120  # On the NeXT, cc -E runs the code through the compiler's parser,
31121  # not just through cpp. "Syntax error" is here to catch this case.
31122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31123/* end confdefs.h.  */
31124#ifdef __STDC__
31125# include <limits.h>
31126#else
31127# include <assert.h>
31128#endif
31129		     Syntax error
31130_ACEOF
31131if ac_fn_cxx_try_cpp "$LINENO"; then :
31132
31133else
31134  # Broken: fails on valid input.
31135continue
31136fi
31137rm -f conftest.err conftest.i conftest.$ac_ext
31138
31139  # OK, works on sane cases.  Now check whether nonexistent headers
31140  # can be detected and how.
31141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31142/* end confdefs.h.  */
31143#include <ac_nonexistent.h>
31144_ACEOF
31145if ac_fn_cxx_try_cpp "$LINENO"; then :
31146  # Broken: success on invalid input.
31147continue
31148else
31149  # Passes both tests.
31150ac_preproc_ok=:
31151break
31152fi
31153rm -f conftest.err conftest.i conftest.$ac_ext
31154
31155done
31156# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31157rm -f conftest.i conftest.err conftest.$ac_ext
31158if $ac_preproc_ok; then :
31159  break
31160fi
31161
31162    done
31163    ac_cv_prog_CXXCPP=$CXXCPP
31164
31165fi
31166  CXXCPP=$ac_cv_prog_CXXCPP
31167else
31168  ac_cv_prog_CXXCPP=$CXXCPP
31169fi
31170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31171$as_echo "$CXXCPP" >&6; }
31172ac_preproc_ok=false
31173for ac_cxx_preproc_warn_flag in '' yes
31174do
31175  # Use a header file that comes with gcc, so configuring glibc
31176  # with a fresh cross-compiler works.
31177  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31178  # <limits.h> exists even on freestanding compilers.
31179  # On the NeXT, cc -E runs the code through the compiler's parser,
31180  # not just through cpp. "Syntax error" is here to catch this case.
31181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31182/* end confdefs.h.  */
31183#ifdef __STDC__
31184# include <limits.h>
31185#else
31186# include <assert.h>
31187#endif
31188		     Syntax error
31189_ACEOF
31190if ac_fn_cxx_try_cpp "$LINENO"; then :
31191
31192else
31193  # Broken: fails on valid input.
31194continue
31195fi
31196rm -f conftest.err conftest.i conftest.$ac_ext
31197
31198  # OK, works on sane cases.  Now check whether nonexistent headers
31199  # can be detected and how.
31200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31201/* end confdefs.h.  */
31202#include <ac_nonexistent.h>
31203_ACEOF
31204if ac_fn_cxx_try_cpp "$LINENO"; then :
31205  # Broken: success on invalid input.
31206continue
31207else
31208  # Passes both tests.
31209ac_preproc_ok=:
31210break
31211fi
31212rm -f conftest.err conftest.i conftest.$ac_ext
31213
31214done
31215# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31216rm -f conftest.i conftest.err conftest.$ac_ext
31217if $ac_preproc_ok; then :
31218
31219else
31220  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31222as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31223See \`config.log' for more details" "$LINENO" 5; }
31224fi
31225
31226ac_ext=cpp
31227ac_cpp='$CXXCPP $CPPFLAGS'
31228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31231
31232
31233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31234
31235  # First separate the path from the arguments. This will split at the first
31236  # space.
31237  complete="$CXXCPP"
31238  path="${complete%% *}"
31239  tmp="$complete EOL"
31240  arguments="${tmp#* }"
31241
31242  # Input might be given as Windows format, start by converting to
31243  # unix format.
31244  new_path=`$CYGPATH -u "$path"`
31245
31246  # Now try to locate executable using which
31247  new_path=`$WHICH "$new_path" 2> /dev/null`
31248  # bat and cmd files are not always considered executable in cygwin causing which
31249  # to not find them
31250  if test "x$new_path" = x \
31251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31253    new_path=`$CYGPATH -u "$path"`
31254  fi
31255  if test "x$new_path" = x; then
31256    # Oops. Which didn't find the executable.
31257    # The splitting of arguments from the executable at a space might have been incorrect,
31258    # since paths with space are more likely in Windows. Give it another try with the whole
31259    # argument.
31260    path="$complete"
31261    arguments="EOL"
31262    new_path=`$CYGPATH -u "$path"`
31263    new_path=`$WHICH "$new_path" 2> /dev/null`
31264    # bat and cmd files are not always considered executable in cygwin causing which
31265    # to not find them
31266    if test "x$new_path" = x \
31267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31269      new_path=`$CYGPATH -u "$path"`
31270    fi
31271    if test "x$new_path" = x; then
31272      # It's still not found. Now this is an unrecoverable error.
31273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31274$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31275      has_space=`$ECHO "$complete" | $GREP " "`
31276      if test "x$has_space" != x; then
31277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31279      fi
31280      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31281    fi
31282  fi
31283
31284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31287  # "foo.exe" is OK but "foo" is an error.
31288  #
31289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31290  # It is also a way to make sure we got the proper file name for the real test later on.
31291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31292  if test "x$test_shortpath" = x; then
31293    # Short path failed, file does not exist as specified.
31294    # Try adding .exe or .cmd
31295    if test -f "${new_path}.exe"; then
31296      input_to_shortpath="${new_path}.exe"
31297    elif test -f "${new_path}.cmd"; then
31298      input_to_shortpath="${new_path}.cmd"
31299    else
31300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31301$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31304      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31305    fi
31306  else
31307    input_to_shortpath="$new_path"
31308  fi
31309
31310  # Call helper function which possibly converts this using DOS-style short mode.
31311  # If so, the updated path is stored in $new_path.
31312  new_path="$input_to_shortpath"
31313
31314  input_path="$input_to_shortpath"
31315  # Check if we need to convert this using DOS-style short mode. If the path
31316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31317  # take no chances and rewrite it.
31318  # Note: m4 eats our [], so we need to use [ and ] instead.
31319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31320  if test "x$has_forbidden_chars" != x; then
31321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31325      # Going to short mode and back again did indeed matter. Since short mode is
31326      # case insensitive, let's make it lowercase to improve readability.
31327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31328      # Now convert it back to Unix-stile (cygpath)
31329      input_path=`$CYGPATH -u "$shortmode_path"`
31330      new_path="$input_path"
31331    fi
31332  fi
31333
31334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31335  if test "x$test_cygdrive_prefix" = x; then
31336    # As a simple fix, exclude /usr/bin since it's not a real path.
31337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31339      # a path prefixed by /cygdrive for fixpath to work.
31340      new_path="$CYGWIN_ROOT_PATH$input_path"
31341    fi
31342  fi
31343
31344  # remove trailing .exe if any
31345  new_path="${new_path/%.exe/}"
31346
31347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31348
31349  # First separate the path from the arguments. This will split at the first
31350  # space.
31351  complete="$CXXCPP"
31352  path="${complete%% *}"
31353  tmp="$complete EOL"
31354  arguments="${tmp#* }"
31355
31356  # Input might be given as Windows format, start by converting to
31357  # unix format.
31358  new_path="$path"
31359
31360  windows_path="$new_path"
31361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31362    unix_path=`$CYGPATH -u "$windows_path"`
31363    new_path="$unix_path"
31364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31366    new_path="$unix_path"
31367  fi
31368
31369
31370  # Now try to locate executable using which
31371  new_path=`$WHICH "$new_path" 2> /dev/null`
31372
31373  if test "x$new_path" = x; then
31374    # Oops. Which didn't find the executable.
31375    # The splitting of arguments from the executable at a space might have been incorrect,
31376    # since paths with space are more likely in Windows. Give it another try with the whole
31377    # argument.
31378    path="$complete"
31379    arguments="EOL"
31380    new_path="$path"
31381
31382  windows_path="$new_path"
31383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31384    unix_path=`$CYGPATH -u "$windows_path"`
31385    new_path="$unix_path"
31386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31388    new_path="$unix_path"
31389  fi
31390
31391
31392    new_path=`$WHICH "$new_path" 2> /dev/null`
31393    # bat and cmd files are not always considered executable in MSYS causing which
31394    # to not find them
31395    if test "x$new_path" = x \
31396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31398      new_path="$path"
31399
31400  windows_path="$new_path"
31401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31402    unix_path=`$CYGPATH -u "$windows_path"`
31403    new_path="$unix_path"
31404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31406    new_path="$unix_path"
31407  fi
31408
31409    fi
31410
31411    if test "x$new_path" = x; then
31412      # It's still not found. Now this is an unrecoverable error.
31413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31414$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31415      has_space=`$ECHO "$complete" | $GREP " "`
31416      if test "x$has_space" != x; then
31417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31419      fi
31420      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31421    fi
31422  fi
31423
31424  # Now new_path has a complete unix path to the binary
31425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31426    # Keep paths in /bin as-is, but remove trailing .exe if any
31427    new_path="${new_path/%.exe/}"
31428    # Do not save /bin paths to all_fixpath_prefixes!
31429  else
31430    # Not in mixed or Windows style, start by that.
31431    new_path=`cmd //c echo $new_path`
31432
31433  input_path="$new_path"
31434  # Check if we need to convert this using DOS-style short mode. If the path
31435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31436  # take no chances and rewrite it.
31437  # Note: m4 eats our [], so we need to use [ and ] instead.
31438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31439  if test "x$has_forbidden_chars" != x; then
31440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31442  fi
31443
31444    # Output is in $new_path
31445
31446  windows_path="$new_path"
31447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31448    unix_path=`$CYGPATH -u "$windows_path"`
31449    new_path="$unix_path"
31450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31452    new_path="$unix_path"
31453  fi
31454
31455    # remove trailing .exe if any
31456    new_path="${new_path/%.exe/}"
31457
31458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31460  fi
31461
31462  else
31463    # We're on a unix platform. Hooray! :)
31464    # First separate the path from the arguments. This will split at the first
31465    # space.
31466    complete="$CXXCPP"
31467    path="${complete%% *}"
31468    tmp="$complete EOL"
31469    arguments="${tmp#* }"
31470
31471    # Cannot rely on the command "which" here since it doesn't always work.
31472    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31473    if test -z "$is_absolute_path"; then
31474      # Path to executable is not absolute. Find it.
31475      IFS_save="$IFS"
31476      IFS=:
31477      for p in $PATH; do
31478        if test -f "$p/$path" && test -x "$p/$path"; then
31479          new_path="$p/$path"
31480          break
31481        fi
31482      done
31483      IFS="$IFS_save"
31484    else
31485      # This is an absolute path, we can use it without further modifications.
31486      new_path="$path"
31487    fi
31488
31489    if test "x$new_path" = x; then
31490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31491$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31492      has_space=`$ECHO "$complete" | $GREP " "`
31493      if test "x$has_space" != x; then
31494        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31496      fi
31497      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31498    fi
31499  fi
31500
31501  # Now join together the path and the arguments once again
31502  if test "x$arguments" != xEOL; then
31503    new_complete="$new_path ${arguments% *}"
31504  else
31505    new_complete="$new_path"
31506  fi
31507
31508  if test "x$complete" != "x$new_complete"; then
31509    CXXCPP="$new_complete"
31510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31511$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31512  fi
31513
31514
31515  #
31516  # Setup the linker (LD)
31517  #
31518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31519    # In the Microsoft toolchain we have a separate LD command "link".
31520    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31521    # a cygwin program for something completely different.
31522    # Extract the first word of "link", so it can be a program name with args.
31523set dummy link; ac_word=$2
31524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31525$as_echo_n "checking for $ac_word... " >&6; }
31526if ${ac_cv_prog_LD+:} false; then :
31527  $as_echo_n "(cached) " >&6
31528else
31529  if test -n "$LD"; then
31530  ac_cv_prog_LD="$LD" # Let the user override the test.
31531else
31532  ac_prog_rejected=no
31533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31534for as_dir in $PATH
31535do
31536  IFS=$as_save_IFS
31537  test -z "$as_dir" && as_dir=.
31538    for ac_exec_ext in '' $ac_executable_extensions; do
31539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31540    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31541       ac_prog_rejected=yes
31542       continue
31543     fi
31544    ac_cv_prog_LD="link"
31545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31546    break 2
31547  fi
31548done
31549  done
31550IFS=$as_save_IFS
31551
31552if test $ac_prog_rejected = yes; then
31553  # We found a bogon in the path, so make sure we never use it.
31554  set dummy $ac_cv_prog_LD
31555  shift
31556  if test $# != 0; then
31557    # We chose a different compiler from the bogus one.
31558    # However, it has the same basename, so the bogon will be chosen
31559    # first if we set LD to just the basename; use the full file name.
31560    shift
31561    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31562  fi
31563fi
31564fi
31565fi
31566LD=$ac_cv_prog_LD
31567if test -n "$LD"; then
31568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31569$as_echo "$LD" >&6; }
31570else
31571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31572$as_echo "no" >&6; }
31573fi
31574
31575
31576
31577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578
31579  # First separate the path from the arguments. This will split at the first
31580  # space.
31581  complete="$LD"
31582  path="${complete%% *}"
31583  tmp="$complete EOL"
31584  arguments="${tmp#* }"
31585
31586  # Input might be given as Windows format, start by converting to
31587  # unix format.
31588  new_path=`$CYGPATH -u "$path"`
31589
31590  # Now try to locate executable using which
31591  new_path=`$WHICH "$new_path" 2> /dev/null`
31592  # bat and cmd files are not always considered executable in cygwin causing which
31593  # to not find them
31594  if test "x$new_path" = x \
31595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31597    new_path=`$CYGPATH -u "$path"`
31598  fi
31599  if test "x$new_path" = x; then
31600    # Oops. Which didn't find the executable.
31601    # The splitting of arguments from the executable at a space might have been incorrect,
31602    # since paths with space are more likely in Windows. Give it another try with the whole
31603    # argument.
31604    path="$complete"
31605    arguments="EOL"
31606    new_path=`$CYGPATH -u "$path"`
31607    new_path=`$WHICH "$new_path" 2> /dev/null`
31608    # bat and cmd files are not always considered executable in cygwin causing which
31609    # to not find them
31610    if test "x$new_path" = x \
31611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31613      new_path=`$CYGPATH -u "$path"`
31614    fi
31615    if test "x$new_path" = x; then
31616      # It's still not found. Now this is an unrecoverable error.
31617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31618$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31619      has_space=`$ECHO "$complete" | $GREP " "`
31620      if test "x$has_space" != x; then
31621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31623      fi
31624      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31625    fi
31626  fi
31627
31628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31631  # "foo.exe" is OK but "foo" is an error.
31632  #
31633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31634  # It is also a way to make sure we got the proper file name for the real test later on.
31635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31636  if test "x$test_shortpath" = x; then
31637    # Short path failed, file does not exist as specified.
31638    # Try adding .exe or .cmd
31639    if test -f "${new_path}.exe"; then
31640      input_to_shortpath="${new_path}.exe"
31641    elif test -f "${new_path}.cmd"; then
31642      input_to_shortpath="${new_path}.cmd"
31643    else
31644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31645$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31648      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31649    fi
31650  else
31651    input_to_shortpath="$new_path"
31652  fi
31653
31654  # Call helper function which possibly converts this using DOS-style short mode.
31655  # If so, the updated path is stored in $new_path.
31656  new_path="$input_to_shortpath"
31657
31658  input_path="$input_to_shortpath"
31659  # Check if we need to convert this using DOS-style short mode. If the path
31660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31661  # take no chances and rewrite it.
31662  # Note: m4 eats our [], so we need to use [ and ] instead.
31663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31664  if test "x$has_forbidden_chars" != x; then
31665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31669      # Going to short mode and back again did indeed matter. Since short mode is
31670      # case insensitive, let's make it lowercase to improve readability.
31671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31672      # Now convert it back to Unix-stile (cygpath)
31673      input_path=`$CYGPATH -u "$shortmode_path"`
31674      new_path="$input_path"
31675    fi
31676  fi
31677
31678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31679  if test "x$test_cygdrive_prefix" = x; then
31680    # As a simple fix, exclude /usr/bin since it's not a real path.
31681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31683      # a path prefixed by /cygdrive for fixpath to work.
31684      new_path="$CYGWIN_ROOT_PATH$input_path"
31685    fi
31686  fi
31687
31688  # remove trailing .exe if any
31689  new_path="${new_path/%.exe/}"
31690
31691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31692
31693  # First separate the path from the arguments. This will split at the first
31694  # space.
31695  complete="$LD"
31696  path="${complete%% *}"
31697  tmp="$complete EOL"
31698  arguments="${tmp#* }"
31699
31700  # Input might be given as Windows format, start by converting to
31701  # unix format.
31702  new_path="$path"
31703
31704  windows_path="$new_path"
31705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31706    unix_path=`$CYGPATH -u "$windows_path"`
31707    new_path="$unix_path"
31708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31710    new_path="$unix_path"
31711  fi
31712
31713
31714  # Now try to locate executable using which
31715  new_path=`$WHICH "$new_path" 2> /dev/null`
31716
31717  if test "x$new_path" = x; then
31718    # Oops. Which didn't find the executable.
31719    # The splitting of arguments from the executable at a space might have been incorrect,
31720    # since paths with space are more likely in Windows. Give it another try with the whole
31721    # argument.
31722    path="$complete"
31723    arguments="EOL"
31724    new_path="$path"
31725
31726  windows_path="$new_path"
31727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31728    unix_path=`$CYGPATH -u "$windows_path"`
31729    new_path="$unix_path"
31730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31732    new_path="$unix_path"
31733  fi
31734
31735
31736    new_path=`$WHICH "$new_path" 2> /dev/null`
31737    # bat and cmd files are not always considered executable in MSYS causing which
31738    # to not find them
31739    if test "x$new_path" = x \
31740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31742      new_path="$path"
31743
31744  windows_path="$new_path"
31745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31746    unix_path=`$CYGPATH -u "$windows_path"`
31747    new_path="$unix_path"
31748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31750    new_path="$unix_path"
31751  fi
31752
31753    fi
31754
31755    if test "x$new_path" = x; then
31756      # It's still not found. Now this is an unrecoverable error.
31757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31758$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31759      has_space=`$ECHO "$complete" | $GREP " "`
31760      if test "x$has_space" != x; then
31761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31763      fi
31764      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31765    fi
31766  fi
31767
31768  # Now new_path has a complete unix path to the binary
31769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31770    # Keep paths in /bin as-is, but remove trailing .exe if any
31771    new_path="${new_path/%.exe/}"
31772    # Do not save /bin paths to all_fixpath_prefixes!
31773  else
31774    # Not in mixed or Windows style, start by that.
31775    new_path=`cmd //c echo $new_path`
31776
31777  input_path="$new_path"
31778  # Check if we need to convert this using DOS-style short mode. If the path
31779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31780  # take no chances and rewrite it.
31781  # Note: m4 eats our [], so we need to use [ and ] instead.
31782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31783  if test "x$has_forbidden_chars" != x; then
31784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31786  fi
31787
31788    # Output is in $new_path
31789
31790  windows_path="$new_path"
31791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31792    unix_path=`$CYGPATH -u "$windows_path"`
31793    new_path="$unix_path"
31794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31796    new_path="$unix_path"
31797  fi
31798
31799    # remove trailing .exe if any
31800    new_path="${new_path/%.exe/}"
31801
31802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31804  fi
31805
31806  else
31807    # We're on a unix platform. Hooray! :)
31808    # First separate the path from the arguments. This will split at the first
31809    # space.
31810    complete="$LD"
31811    path="${complete%% *}"
31812    tmp="$complete EOL"
31813    arguments="${tmp#* }"
31814
31815    # Cannot rely on the command "which" here since it doesn't always work.
31816    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31817    if test -z "$is_absolute_path"; then
31818      # Path to executable is not absolute. Find it.
31819      IFS_save="$IFS"
31820      IFS=:
31821      for p in $PATH; do
31822        if test -f "$p/$path" && test -x "$p/$path"; then
31823          new_path="$p/$path"
31824          break
31825        fi
31826      done
31827      IFS="$IFS_save"
31828    else
31829      # This is an absolute path, we can use it without further modifications.
31830      new_path="$path"
31831    fi
31832
31833    if test "x$new_path" = x; then
31834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31835$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31836      has_space=`$ECHO "$complete" | $GREP " "`
31837      if test "x$has_space" != x; then
31838        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31839$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31840      fi
31841      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31842    fi
31843  fi
31844
31845  # Now join together the path and the arguments once again
31846  if test "x$arguments" != xEOL; then
31847    new_complete="$new_path ${arguments% *}"
31848  else
31849    new_complete="$new_path"
31850  fi
31851
31852  if test "x$complete" != "x$new_complete"; then
31853    LD="$new_complete"
31854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31855$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31856  fi
31857
31858    # Verify that we indeed succeeded with this trick.
31859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31860$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31861    "$LD" --version > /dev/null
31862    if test $? -eq 0 ; then
31863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31864$as_echo "no" >&6; }
31865      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31866    else
31867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31868$as_echo "yes" >&6; }
31869    fi
31870    LDCXX="$LD"
31871  else
31872    # All other toolchains use the compiler to link.
31873    LD="$CC"
31874    LDCXX="$CXX"
31875  fi
31876
31877  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31878
31879
31880  #
31881  # Setup the assembler (AS)
31882  #
31883  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31884    # FIXME: should this really be solaris, or solstudio?
31885
31886
31887  # Publish this variable in the help.
31888
31889
31890  if test "x$AS" = x; then
31891    # The variable is not set by user, try to locate tool using the code snippet
31892    for ac_prog in as
31893do
31894  # Extract the first word of "$ac_prog", so it can be a program name with args.
31895set dummy $ac_prog; ac_word=$2
31896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31897$as_echo_n "checking for $ac_word... " >&6; }
31898if ${ac_cv_path_AS+:} false; then :
31899  $as_echo_n "(cached) " >&6
31900else
31901  case $AS in
31902  [\\/]* | ?:[\\/]*)
31903  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31904  ;;
31905  *)
31906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31907for as_dir in $PATH
31908do
31909  IFS=$as_save_IFS
31910  test -z "$as_dir" && as_dir=.
31911    for ac_exec_ext in '' $ac_executable_extensions; do
31912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31913    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31915    break 2
31916  fi
31917done
31918  done
31919IFS=$as_save_IFS
31920
31921  ;;
31922esac
31923fi
31924AS=$ac_cv_path_AS
31925if test -n "$AS"; then
31926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31927$as_echo "$AS" >&6; }
31928else
31929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31930$as_echo "no" >&6; }
31931fi
31932
31933
31934  test -n "$AS" && break
31935done
31936
31937  else
31938    # The variable is set, but is it from the command line or the environment?
31939
31940    # Try to remove the string !AS! from our list.
31941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31943      # If it failed, the variable was not from the command line. Ignore it,
31944      # but warn the user (except for BASH, which is always set by the calling BASH).
31945      if test "xAS" != xBASH; then
31946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31947$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31948      fi
31949      # Try to locate tool using the code snippet
31950      for ac_prog in as
31951do
31952  # Extract the first word of "$ac_prog", so it can be a program name with args.
31953set dummy $ac_prog; ac_word=$2
31954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31955$as_echo_n "checking for $ac_word... " >&6; }
31956if ${ac_cv_path_AS+:} false; then :
31957  $as_echo_n "(cached) " >&6
31958else
31959  case $AS in
31960  [\\/]* | ?:[\\/]*)
31961  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31962  ;;
31963  *)
31964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31965for as_dir in $PATH
31966do
31967  IFS=$as_save_IFS
31968  test -z "$as_dir" && as_dir=.
31969    for ac_exec_ext in '' $ac_executable_extensions; do
31970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31971    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31973    break 2
31974  fi
31975done
31976  done
31977IFS=$as_save_IFS
31978
31979  ;;
31980esac
31981fi
31982AS=$ac_cv_path_AS
31983if test -n "$AS"; then
31984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31985$as_echo "$AS" >&6; }
31986else
31987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31988$as_echo "no" >&6; }
31989fi
31990
31991
31992  test -n "$AS" && break
31993done
31994
31995    else
31996      # If it succeeded, then it was overridden by the user. We will use it
31997      # for the tool.
31998
31999      # First remove it from the list of overridden variables, so we can test
32000      # for unknown variables in the end.
32001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32002
32003      # Check if the provided tool contains a complete path.
32004      tool_specified="$AS"
32005      tool_basename="${tool_specified##*/}"
32006      if test "x$tool_basename" = "x$tool_specified"; then
32007        # A command without a complete path is provided, search $PATH.
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32009$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32010        # Extract the first word of "$tool_basename", so it can be a program name with args.
32011set dummy $tool_basename; ac_word=$2
32012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32013$as_echo_n "checking for $ac_word... " >&6; }
32014if ${ac_cv_path_AS+:} false; then :
32015  $as_echo_n "(cached) " >&6
32016else
32017  case $AS in
32018  [\\/]* | ?:[\\/]*)
32019  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32020  ;;
32021  *)
32022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32023for as_dir in $PATH
32024do
32025  IFS=$as_save_IFS
32026  test -z "$as_dir" && as_dir=.
32027    for ac_exec_ext in '' $ac_executable_extensions; do
32028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32029    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32031    break 2
32032  fi
32033done
32034  done
32035IFS=$as_save_IFS
32036
32037  ;;
32038esac
32039fi
32040AS=$ac_cv_path_AS
32041if test -n "$AS"; then
32042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32043$as_echo "$AS" >&6; }
32044else
32045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32046$as_echo "no" >&6; }
32047fi
32048
32049
32050        if test "x$AS" = x; then
32051          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32052        fi
32053      else
32054        # Otherwise we believe it is a complete path. Use it as it is.
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32056$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32058$as_echo_n "checking for AS... " >&6; }
32059        if test ! -x "$tool_specified"; then
32060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32061$as_echo "not found" >&6; }
32062          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32063        fi
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32065$as_echo "$tool_specified" >&6; }
32066      fi
32067    fi
32068  fi
32069
32070
32071
32072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32073
32074  # First separate the path from the arguments. This will split at the first
32075  # space.
32076  complete="$AS"
32077  path="${complete%% *}"
32078  tmp="$complete EOL"
32079  arguments="${tmp#* }"
32080
32081  # Input might be given as Windows format, start by converting to
32082  # unix format.
32083  new_path=`$CYGPATH -u "$path"`
32084
32085  # Now try to locate executable using which
32086  new_path=`$WHICH "$new_path" 2> /dev/null`
32087  # bat and cmd files are not always considered executable in cygwin causing which
32088  # to not find them
32089  if test "x$new_path" = x \
32090      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32091      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32092    new_path=`$CYGPATH -u "$path"`
32093  fi
32094  if test "x$new_path" = x; then
32095    # Oops. Which didn't find the executable.
32096    # The splitting of arguments from the executable at a space might have been incorrect,
32097    # since paths with space are more likely in Windows. Give it another try with the whole
32098    # argument.
32099    path="$complete"
32100    arguments="EOL"
32101    new_path=`$CYGPATH -u "$path"`
32102    new_path=`$WHICH "$new_path" 2> /dev/null`
32103    # bat and cmd files are not always considered executable in cygwin causing which
32104    # to not find them
32105    if test "x$new_path" = x \
32106        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32107        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32108      new_path=`$CYGPATH -u "$path"`
32109    fi
32110    if test "x$new_path" = x; then
32111      # It's still not found. Now this is an unrecoverable error.
32112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32113$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32114      has_space=`$ECHO "$complete" | $GREP " "`
32115      if test "x$has_space" != x; then
32116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32118      fi
32119      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32120    fi
32121  fi
32122
32123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32126  # "foo.exe" is OK but "foo" is an error.
32127  #
32128  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32129  # It is also a way to make sure we got the proper file name for the real test later on.
32130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32131  if test "x$test_shortpath" = x; then
32132    # Short path failed, file does not exist as specified.
32133    # Try adding .exe or .cmd
32134    if test -f "${new_path}.exe"; then
32135      input_to_shortpath="${new_path}.exe"
32136    elif test -f "${new_path}.cmd"; then
32137      input_to_shortpath="${new_path}.cmd"
32138    else
32139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32140$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32141      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32142$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32143      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32144    fi
32145  else
32146    input_to_shortpath="$new_path"
32147  fi
32148
32149  # Call helper function which possibly converts this using DOS-style short mode.
32150  # If so, the updated path is stored in $new_path.
32151  new_path="$input_to_shortpath"
32152
32153  input_path="$input_to_shortpath"
32154  # Check if we need to convert this using DOS-style short mode. If the path
32155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32156  # take no chances and rewrite it.
32157  # Note: m4 eats our [], so we need to use [ and ] instead.
32158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32159  if test "x$has_forbidden_chars" != x; then
32160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32164      # Going to short mode and back again did indeed matter. Since short mode is
32165      # case insensitive, let's make it lowercase to improve readability.
32166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32167      # Now convert it back to Unix-stile (cygpath)
32168      input_path=`$CYGPATH -u "$shortmode_path"`
32169      new_path="$input_path"
32170    fi
32171  fi
32172
32173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32174  if test "x$test_cygdrive_prefix" = x; then
32175    # As a simple fix, exclude /usr/bin since it's not a real path.
32176    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32178      # a path prefixed by /cygdrive for fixpath to work.
32179      new_path="$CYGWIN_ROOT_PATH$input_path"
32180    fi
32181  fi
32182
32183  # remove trailing .exe if any
32184  new_path="${new_path/%.exe/}"
32185
32186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32187
32188  # First separate the path from the arguments. This will split at the first
32189  # space.
32190  complete="$AS"
32191  path="${complete%% *}"
32192  tmp="$complete EOL"
32193  arguments="${tmp#* }"
32194
32195  # Input might be given as Windows format, start by converting to
32196  # unix format.
32197  new_path="$path"
32198
32199  windows_path="$new_path"
32200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32201    unix_path=`$CYGPATH -u "$windows_path"`
32202    new_path="$unix_path"
32203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32205    new_path="$unix_path"
32206  fi
32207
32208
32209  # Now try to locate executable using which
32210  new_path=`$WHICH "$new_path" 2> /dev/null`
32211
32212  if test "x$new_path" = x; then
32213    # Oops. Which didn't find the executable.
32214    # The splitting of arguments from the executable at a space might have been incorrect,
32215    # since paths with space are more likely in Windows. Give it another try with the whole
32216    # argument.
32217    path="$complete"
32218    arguments="EOL"
32219    new_path="$path"
32220
32221  windows_path="$new_path"
32222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32223    unix_path=`$CYGPATH -u "$windows_path"`
32224    new_path="$unix_path"
32225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32227    new_path="$unix_path"
32228  fi
32229
32230
32231    new_path=`$WHICH "$new_path" 2> /dev/null`
32232    # bat and cmd files are not always considered executable in MSYS causing which
32233    # to not find them
32234    if test "x$new_path" = x \
32235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32237      new_path="$path"
32238
32239  windows_path="$new_path"
32240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32241    unix_path=`$CYGPATH -u "$windows_path"`
32242    new_path="$unix_path"
32243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32245    new_path="$unix_path"
32246  fi
32247
32248    fi
32249
32250    if test "x$new_path" = x; then
32251      # It's still not found. Now this is an unrecoverable error.
32252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32253$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32254      has_space=`$ECHO "$complete" | $GREP " "`
32255      if test "x$has_space" != x; then
32256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32258      fi
32259      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32260    fi
32261  fi
32262
32263  # Now new_path has a complete unix path to the binary
32264  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32265    # Keep paths in /bin as-is, but remove trailing .exe if any
32266    new_path="${new_path/%.exe/}"
32267    # Do not save /bin paths to all_fixpath_prefixes!
32268  else
32269    # Not in mixed or Windows style, start by that.
32270    new_path=`cmd //c echo $new_path`
32271
32272  input_path="$new_path"
32273  # Check if we need to convert this using DOS-style short mode. If the path
32274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32275  # take no chances and rewrite it.
32276  # Note: m4 eats our [], so we need to use [ and ] instead.
32277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32278  if test "x$has_forbidden_chars" != x; then
32279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32281  fi
32282
32283    # Output is in $new_path
32284
32285  windows_path="$new_path"
32286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32287    unix_path=`$CYGPATH -u "$windows_path"`
32288    new_path="$unix_path"
32289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32291    new_path="$unix_path"
32292  fi
32293
32294    # remove trailing .exe if any
32295    new_path="${new_path/%.exe/}"
32296
32297    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32298    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32299  fi
32300
32301  else
32302    # We're on a unix platform. Hooray! :)
32303    # First separate the path from the arguments. This will split at the first
32304    # space.
32305    complete="$AS"
32306    path="${complete%% *}"
32307    tmp="$complete EOL"
32308    arguments="${tmp#* }"
32309
32310    # Cannot rely on the command "which" here since it doesn't always work.
32311    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32312    if test -z "$is_absolute_path"; then
32313      # Path to executable is not absolute. Find it.
32314      IFS_save="$IFS"
32315      IFS=:
32316      for p in $PATH; do
32317        if test -f "$p/$path" && test -x "$p/$path"; then
32318          new_path="$p/$path"
32319          break
32320        fi
32321      done
32322      IFS="$IFS_save"
32323    else
32324      # This is an absolute path, we can use it without further modifications.
32325      new_path="$path"
32326    fi
32327
32328    if test "x$new_path" = x; then
32329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32330$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32331      has_space=`$ECHO "$complete" | $GREP " "`
32332      if test "x$has_space" != x; then
32333        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32334$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32335      fi
32336      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32337    fi
32338  fi
32339
32340  # Now join together the path and the arguments once again
32341  if test "x$arguments" != xEOL; then
32342    new_complete="$new_path ${arguments% *}"
32343  else
32344    new_complete="$new_path"
32345  fi
32346
32347  if test "x$complete" != "x$new_complete"; then
32348    AS="$new_complete"
32349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32350$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32351  fi
32352
32353  else
32354    # FIXME: is this correct for microsoft?
32355    AS="$CC -c"
32356  fi
32357
32358
32359  #
32360  # Setup the archiver (AR)
32361  #
32362  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32363    # The corresponding ar tool is lib.exe (used to create static libraries)
32364    # Extract the first word of "lib", so it can be a program name with args.
32365set dummy lib; ac_word=$2
32366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32367$as_echo_n "checking for $ac_word... " >&6; }
32368if ${ac_cv_prog_AR+:} false; then :
32369  $as_echo_n "(cached) " >&6
32370else
32371  if test -n "$AR"; then
32372  ac_cv_prog_AR="$AR" # Let the user override the test.
32373else
32374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32375for as_dir in $PATH
32376do
32377  IFS=$as_save_IFS
32378  test -z "$as_dir" && as_dir=.
32379    for ac_exec_ext in '' $ac_executable_extensions; do
32380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32381    ac_cv_prog_AR="lib"
32382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32383    break 2
32384  fi
32385done
32386  done
32387IFS=$as_save_IFS
32388
32389fi
32390fi
32391AR=$ac_cv_prog_AR
32392if test -n "$AR"; then
32393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32394$as_echo "$AR" >&6; }
32395else
32396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32397$as_echo "no" >&6; }
32398fi
32399
32400
32401  else
32402
32403
32404  # Publish this variable in the help.
32405
32406
32407  if test "x$AR" = x; then
32408    # The variable is not set by user, try to locate tool using the code snippet
32409    if test -n "$ac_tool_prefix"; then
32410  for ac_prog in ar
32411  do
32412    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32413set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32415$as_echo_n "checking for $ac_word... " >&6; }
32416if ${ac_cv_prog_AR+:} false; then :
32417  $as_echo_n "(cached) " >&6
32418else
32419  if test -n "$AR"; then
32420  ac_cv_prog_AR="$AR" # Let the user override the test.
32421else
32422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32423for as_dir in $PATH
32424do
32425  IFS=$as_save_IFS
32426  test -z "$as_dir" && as_dir=.
32427    for ac_exec_ext in '' $ac_executable_extensions; do
32428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32429    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32431    break 2
32432  fi
32433done
32434  done
32435IFS=$as_save_IFS
32436
32437fi
32438fi
32439AR=$ac_cv_prog_AR
32440if test -n "$AR"; then
32441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32442$as_echo "$AR" >&6; }
32443else
32444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32445$as_echo "no" >&6; }
32446fi
32447
32448
32449    test -n "$AR" && break
32450  done
32451fi
32452if test -z "$AR"; then
32453  ac_ct_AR=$AR
32454  for ac_prog in ar
32455do
32456  # Extract the first word of "$ac_prog", so it can be a program name with args.
32457set dummy $ac_prog; ac_word=$2
32458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32459$as_echo_n "checking for $ac_word... " >&6; }
32460if ${ac_cv_prog_ac_ct_AR+:} false; then :
32461  $as_echo_n "(cached) " >&6
32462else
32463  if test -n "$ac_ct_AR"; then
32464  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32465else
32466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32467for as_dir in $PATH
32468do
32469  IFS=$as_save_IFS
32470  test -z "$as_dir" && as_dir=.
32471    for ac_exec_ext in '' $ac_executable_extensions; do
32472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32473    ac_cv_prog_ac_ct_AR="$ac_prog"
32474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32475    break 2
32476  fi
32477done
32478  done
32479IFS=$as_save_IFS
32480
32481fi
32482fi
32483ac_ct_AR=$ac_cv_prog_ac_ct_AR
32484if test -n "$ac_ct_AR"; then
32485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32486$as_echo "$ac_ct_AR" >&6; }
32487else
32488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32489$as_echo "no" >&6; }
32490fi
32491
32492
32493  test -n "$ac_ct_AR" && break
32494done
32495
32496  if test "x$ac_ct_AR" = x; then
32497    AR=""
32498  else
32499    case $cross_compiling:$ac_tool_warned in
32500yes:)
32501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32503ac_tool_warned=yes ;;
32504esac
32505    AR=$ac_ct_AR
32506  fi
32507fi
32508
32509  else
32510    # The variable is set, but is it from the command line or the environment?
32511
32512    # Try to remove the string !AR! from our list.
32513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32515      # If it failed, the variable was not from the command line. Ignore it,
32516      # but warn the user (except for BASH, which is always set by the calling BASH).
32517      if test "xAR" != xBASH; then
32518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32519$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32520      fi
32521      # Try to locate tool using the code snippet
32522      if test -n "$ac_tool_prefix"; then
32523  for ac_prog in ar
32524  do
32525    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32526set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32528$as_echo_n "checking for $ac_word... " >&6; }
32529if ${ac_cv_prog_AR+:} false; then :
32530  $as_echo_n "(cached) " >&6
32531else
32532  if test -n "$AR"; then
32533  ac_cv_prog_AR="$AR" # Let the user override the test.
32534else
32535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32536for as_dir in $PATH
32537do
32538  IFS=$as_save_IFS
32539  test -z "$as_dir" && as_dir=.
32540    for ac_exec_ext in '' $ac_executable_extensions; do
32541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32542    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32544    break 2
32545  fi
32546done
32547  done
32548IFS=$as_save_IFS
32549
32550fi
32551fi
32552AR=$ac_cv_prog_AR
32553if test -n "$AR"; then
32554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32555$as_echo "$AR" >&6; }
32556else
32557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32558$as_echo "no" >&6; }
32559fi
32560
32561
32562    test -n "$AR" && break
32563  done
32564fi
32565if test -z "$AR"; then
32566  ac_ct_AR=$AR
32567  for ac_prog in ar
32568do
32569  # Extract the first word of "$ac_prog", so it can be a program name with args.
32570set dummy $ac_prog; ac_word=$2
32571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32572$as_echo_n "checking for $ac_word... " >&6; }
32573if ${ac_cv_prog_ac_ct_AR+:} false; then :
32574  $as_echo_n "(cached) " >&6
32575else
32576  if test -n "$ac_ct_AR"; then
32577  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32578else
32579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32580for as_dir in $PATH
32581do
32582  IFS=$as_save_IFS
32583  test -z "$as_dir" && as_dir=.
32584    for ac_exec_ext in '' $ac_executable_extensions; do
32585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32586    ac_cv_prog_ac_ct_AR="$ac_prog"
32587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32588    break 2
32589  fi
32590done
32591  done
32592IFS=$as_save_IFS
32593
32594fi
32595fi
32596ac_ct_AR=$ac_cv_prog_ac_ct_AR
32597if test -n "$ac_ct_AR"; then
32598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32599$as_echo "$ac_ct_AR" >&6; }
32600else
32601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32602$as_echo "no" >&6; }
32603fi
32604
32605
32606  test -n "$ac_ct_AR" && break
32607done
32608
32609  if test "x$ac_ct_AR" = x; then
32610    AR=""
32611  else
32612    case $cross_compiling:$ac_tool_warned in
32613yes:)
32614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32616ac_tool_warned=yes ;;
32617esac
32618    AR=$ac_ct_AR
32619  fi
32620fi
32621
32622    else
32623      # If it succeeded, then it was overridden by the user. We will use it
32624      # for the tool.
32625
32626      # First remove it from the list of overridden variables, so we can test
32627      # for unknown variables in the end.
32628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32629
32630      # Check if the provided tool contains a complete path.
32631      tool_specified="$AR"
32632      tool_basename="${tool_specified##*/}"
32633      if test "x$tool_basename" = "x$tool_specified"; then
32634        # A command without a complete path is provided, search $PATH.
32635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32636$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32637        # Extract the first word of "$tool_basename", so it can be a program name with args.
32638set dummy $tool_basename; ac_word=$2
32639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32640$as_echo_n "checking for $ac_word... " >&6; }
32641if ${ac_cv_path_AR+:} false; then :
32642  $as_echo_n "(cached) " >&6
32643else
32644  case $AR in
32645  [\\/]* | ?:[\\/]*)
32646  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32647  ;;
32648  *)
32649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32650for as_dir in $PATH
32651do
32652  IFS=$as_save_IFS
32653  test -z "$as_dir" && as_dir=.
32654    for ac_exec_ext in '' $ac_executable_extensions; do
32655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32656    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32658    break 2
32659  fi
32660done
32661  done
32662IFS=$as_save_IFS
32663
32664  ;;
32665esac
32666fi
32667AR=$ac_cv_path_AR
32668if test -n "$AR"; then
32669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32670$as_echo "$AR" >&6; }
32671else
32672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32673$as_echo "no" >&6; }
32674fi
32675
32676
32677        if test "x$AR" = x; then
32678          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32679        fi
32680      else
32681        # Otherwise we believe it is a complete path. Use it as it is.
32682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32683$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32685$as_echo_n "checking for AR... " >&6; }
32686        if test ! -x "$tool_specified"; then
32687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32688$as_echo "not found" >&6; }
32689          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32690        fi
32691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32692$as_echo "$tool_specified" >&6; }
32693      fi
32694    fi
32695  fi
32696
32697
32698  fi
32699
32700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32701
32702  # First separate the path from the arguments. This will split at the first
32703  # space.
32704  complete="$AR"
32705  path="${complete%% *}"
32706  tmp="$complete EOL"
32707  arguments="${tmp#* }"
32708
32709  # Input might be given as Windows format, start by converting to
32710  # unix format.
32711  new_path=`$CYGPATH -u "$path"`
32712
32713  # Now try to locate executable using which
32714  new_path=`$WHICH "$new_path" 2> /dev/null`
32715  # bat and cmd files are not always considered executable in cygwin causing which
32716  # to not find them
32717  if test "x$new_path" = x \
32718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32720    new_path=`$CYGPATH -u "$path"`
32721  fi
32722  if test "x$new_path" = x; then
32723    # Oops. Which didn't find the executable.
32724    # The splitting of arguments from the executable at a space might have been incorrect,
32725    # since paths with space are more likely in Windows. Give it another try with the whole
32726    # argument.
32727    path="$complete"
32728    arguments="EOL"
32729    new_path=`$CYGPATH -u "$path"`
32730    new_path=`$WHICH "$new_path" 2> /dev/null`
32731    # bat and cmd files are not always considered executable in cygwin causing which
32732    # to not find them
32733    if test "x$new_path" = x \
32734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32736      new_path=`$CYGPATH -u "$path"`
32737    fi
32738    if test "x$new_path" = x; then
32739      # It's still not found. Now this is an unrecoverable error.
32740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32741$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32742      has_space=`$ECHO "$complete" | $GREP " "`
32743      if test "x$has_space" != x; then
32744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32746      fi
32747      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32748    fi
32749  fi
32750
32751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32754  # "foo.exe" is OK but "foo" is an error.
32755  #
32756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32757  # It is also a way to make sure we got the proper file name for the real test later on.
32758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32759  if test "x$test_shortpath" = x; then
32760    # Short path failed, file does not exist as specified.
32761    # Try adding .exe or .cmd
32762    if test -f "${new_path}.exe"; then
32763      input_to_shortpath="${new_path}.exe"
32764    elif test -f "${new_path}.cmd"; then
32765      input_to_shortpath="${new_path}.cmd"
32766    else
32767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32768$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32771      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32772    fi
32773  else
32774    input_to_shortpath="$new_path"
32775  fi
32776
32777  # Call helper function which possibly converts this using DOS-style short mode.
32778  # If so, the updated path is stored in $new_path.
32779  new_path="$input_to_shortpath"
32780
32781  input_path="$input_to_shortpath"
32782  # Check if we need to convert this using DOS-style short mode. If the path
32783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32784  # take no chances and rewrite it.
32785  # Note: m4 eats our [], so we need to use [ and ] instead.
32786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32787  if test "x$has_forbidden_chars" != x; then
32788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32792      # Going to short mode and back again did indeed matter. Since short mode is
32793      # case insensitive, let's make it lowercase to improve readability.
32794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32795      # Now convert it back to Unix-stile (cygpath)
32796      input_path=`$CYGPATH -u "$shortmode_path"`
32797      new_path="$input_path"
32798    fi
32799  fi
32800
32801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32802  if test "x$test_cygdrive_prefix" = x; then
32803    # As a simple fix, exclude /usr/bin since it's not a real path.
32804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32806      # a path prefixed by /cygdrive for fixpath to work.
32807      new_path="$CYGWIN_ROOT_PATH$input_path"
32808    fi
32809  fi
32810
32811  # remove trailing .exe if any
32812  new_path="${new_path/%.exe/}"
32813
32814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32815
32816  # First separate the path from the arguments. This will split at the first
32817  # space.
32818  complete="$AR"
32819  path="${complete%% *}"
32820  tmp="$complete EOL"
32821  arguments="${tmp#* }"
32822
32823  # Input might be given as Windows format, start by converting to
32824  # unix format.
32825  new_path="$path"
32826
32827  windows_path="$new_path"
32828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32829    unix_path=`$CYGPATH -u "$windows_path"`
32830    new_path="$unix_path"
32831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32833    new_path="$unix_path"
32834  fi
32835
32836
32837  # Now try to locate executable using which
32838  new_path=`$WHICH "$new_path" 2> /dev/null`
32839
32840  if test "x$new_path" = x; then
32841    # Oops. Which didn't find the executable.
32842    # The splitting of arguments from the executable at a space might have been incorrect,
32843    # since paths with space are more likely in Windows. Give it another try with the whole
32844    # argument.
32845    path="$complete"
32846    arguments="EOL"
32847    new_path="$path"
32848
32849  windows_path="$new_path"
32850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32851    unix_path=`$CYGPATH -u "$windows_path"`
32852    new_path="$unix_path"
32853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32855    new_path="$unix_path"
32856  fi
32857
32858
32859    new_path=`$WHICH "$new_path" 2> /dev/null`
32860    # bat and cmd files are not always considered executable in MSYS causing which
32861    # to not find them
32862    if test "x$new_path" = x \
32863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32865      new_path="$path"
32866
32867  windows_path="$new_path"
32868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32869    unix_path=`$CYGPATH -u "$windows_path"`
32870    new_path="$unix_path"
32871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32873    new_path="$unix_path"
32874  fi
32875
32876    fi
32877
32878    if test "x$new_path" = x; then
32879      # It's still not found. Now this is an unrecoverable error.
32880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32881$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32882      has_space=`$ECHO "$complete" | $GREP " "`
32883      if test "x$has_space" != x; then
32884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32886      fi
32887      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32888    fi
32889  fi
32890
32891  # Now new_path has a complete unix path to the binary
32892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32893    # Keep paths in /bin as-is, but remove trailing .exe if any
32894    new_path="${new_path/%.exe/}"
32895    # Do not save /bin paths to all_fixpath_prefixes!
32896  else
32897    # Not in mixed or Windows style, start by that.
32898    new_path=`cmd //c echo $new_path`
32899
32900  input_path="$new_path"
32901  # Check if we need to convert this using DOS-style short mode. If the path
32902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32903  # take no chances and rewrite it.
32904  # Note: m4 eats our [], so we need to use [ and ] instead.
32905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32906  if test "x$has_forbidden_chars" != x; then
32907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32909  fi
32910
32911    # Output is in $new_path
32912
32913  windows_path="$new_path"
32914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32915    unix_path=`$CYGPATH -u "$windows_path"`
32916    new_path="$unix_path"
32917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32919    new_path="$unix_path"
32920  fi
32921
32922    # remove trailing .exe if any
32923    new_path="${new_path/%.exe/}"
32924
32925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32927  fi
32928
32929  else
32930    # We're on a unix platform. Hooray! :)
32931    # First separate the path from the arguments. This will split at the first
32932    # space.
32933    complete="$AR"
32934    path="${complete%% *}"
32935    tmp="$complete EOL"
32936    arguments="${tmp#* }"
32937
32938    # Cannot rely on the command "which" here since it doesn't always work.
32939    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32940    if test -z "$is_absolute_path"; then
32941      # Path to executable is not absolute. Find it.
32942      IFS_save="$IFS"
32943      IFS=:
32944      for p in $PATH; do
32945        if test -f "$p/$path" && test -x "$p/$path"; then
32946          new_path="$p/$path"
32947          break
32948        fi
32949      done
32950      IFS="$IFS_save"
32951    else
32952      # This is an absolute path, we can use it without further modifications.
32953      new_path="$path"
32954    fi
32955
32956    if test "x$new_path" = x; then
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32958$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32959      has_space=`$ECHO "$complete" | $GREP " "`
32960      if test "x$has_space" != x; then
32961        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32963      fi
32964      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32965    fi
32966  fi
32967
32968  # Now join together the path and the arguments once again
32969  if test "x$arguments" != xEOL; then
32970    new_complete="$new_path ${arguments% *}"
32971  else
32972    new_complete="$new_path"
32973  fi
32974
32975  if test "x$complete" != "x$new_complete"; then
32976    AR="$new_complete"
32977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32978$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32979  fi
32980
32981
32982
32983  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32984    ac_ext=m
32985ac_cpp='$OBJCPP $CPPFLAGS'
32986ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32987ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32988ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32989if test -n "$ac_tool_prefix"; then
32990  for ac_prog in gcc objcc objc cc CC
32991  do
32992    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32993set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32995$as_echo_n "checking for $ac_word... " >&6; }
32996if ${ac_cv_prog_OBJC+:} false; then :
32997  $as_echo_n "(cached) " >&6
32998else
32999  if test -n "$OBJC"; then
33000  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33001else
33002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33003for as_dir in $PATH
33004do
33005  IFS=$as_save_IFS
33006  test -z "$as_dir" && as_dir=.
33007    for ac_exec_ext in '' $ac_executable_extensions; do
33008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33009    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33011    break 2
33012  fi
33013done
33014  done
33015IFS=$as_save_IFS
33016
33017fi
33018fi
33019OBJC=$ac_cv_prog_OBJC
33020if test -n "$OBJC"; then
33021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33022$as_echo "$OBJC" >&6; }
33023else
33024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33025$as_echo "no" >&6; }
33026fi
33027
33028
33029    test -n "$OBJC" && break
33030  done
33031fi
33032if test -z "$OBJC"; then
33033  ac_ct_OBJC=$OBJC
33034  for ac_prog in gcc objcc objc cc CC
33035do
33036  # Extract the first word of "$ac_prog", so it can be a program name with args.
33037set dummy $ac_prog; ac_word=$2
33038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33039$as_echo_n "checking for $ac_word... " >&6; }
33040if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33041  $as_echo_n "(cached) " >&6
33042else
33043  if test -n "$ac_ct_OBJC"; then
33044  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33045else
33046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33047for as_dir in $PATH
33048do
33049  IFS=$as_save_IFS
33050  test -z "$as_dir" && as_dir=.
33051    for ac_exec_ext in '' $ac_executable_extensions; do
33052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33053    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33055    break 2
33056  fi
33057done
33058  done
33059IFS=$as_save_IFS
33060
33061fi
33062fi
33063ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33064if test -n "$ac_ct_OBJC"; then
33065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33066$as_echo "$ac_ct_OBJC" >&6; }
33067else
33068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33069$as_echo "no" >&6; }
33070fi
33071
33072
33073  test -n "$ac_ct_OBJC" && break
33074done
33075
33076  if test "x$ac_ct_OBJC" = x; then
33077    OBJC="gcc"
33078  else
33079    case $cross_compiling:$ac_tool_warned in
33080yes:)
33081{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33082$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33083ac_tool_warned=yes ;;
33084esac
33085    OBJC=$ac_ct_OBJC
33086  fi
33087fi
33088
33089# Provide some information about the compiler.
33090$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33091set X $ac_compile
33092ac_compiler=$2
33093for ac_option in --version -v -V -qversion; do
33094  { { ac_try="$ac_compiler $ac_option >&5"
33095case "(($ac_try" in
33096  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33097  *) ac_try_echo=$ac_try;;
33098esac
33099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33100$as_echo "$ac_try_echo"; } >&5
33101  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33102  ac_status=$?
33103  if test -s conftest.err; then
33104    sed '10a\
33105... rest of stderr output deleted ...
33106         10q' conftest.err >conftest.er1
33107    cat conftest.er1 >&5
33108  fi
33109  rm -f conftest.er1 conftest.err
33110  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33111  test $ac_status = 0; }
33112done
33113
33114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33115$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33116if ${ac_cv_objc_compiler_gnu+:} false; then :
33117  $as_echo_n "(cached) " >&6
33118else
33119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33120/* end confdefs.h.  */
33121
33122int
33123main ()
33124{
33125#ifndef __GNUC__
33126       choke me
33127#endif
33128
33129  ;
33130  return 0;
33131}
33132_ACEOF
33133if ac_fn_objc_try_compile "$LINENO"; then :
33134  ac_compiler_gnu=yes
33135else
33136  ac_compiler_gnu=no
33137fi
33138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33139ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33140
33141fi
33142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33143$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33144if test $ac_compiler_gnu = yes; then
33145  GOBJC=yes
33146else
33147  GOBJC=
33148fi
33149ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33150ac_save_OBJCFLAGS=$OBJCFLAGS
33151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33152$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33153if ${ac_cv_prog_objc_g+:} false; then :
33154  $as_echo_n "(cached) " >&6
33155else
33156  ac_save_objc_werror_flag=$ac_objc_werror_flag
33157   ac_objc_werror_flag=yes
33158   ac_cv_prog_objc_g=no
33159   OBJCFLAGS="-g"
33160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33161/* end confdefs.h.  */
33162
33163int
33164main ()
33165{
33166
33167  ;
33168  return 0;
33169}
33170_ACEOF
33171if ac_fn_objc_try_compile "$LINENO"; then :
33172  ac_cv_prog_objc_g=yes
33173else
33174  OBJCFLAGS=""
33175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33176/* end confdefs.h.  */
33177
33178int
33179main ()
33180{
33181
33182  ;
33183  return 0;
33184}
33185_ACEOF
33186if ac_fn_objc_try_compile "$LINENO"; then :
33187
33188else
33189  ac_objc_werror_flag=$ac_save_objc_werror_flag
33190	 OBJCFLAGS="-g"
33191	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33192/* end confdefs.h.  */
33193
33194int
33195main ()
33196{
33197
33198  ;
33199  return 0;
33200}
33201_ACEOF
33202if ac_fn_objc_try_compile "$LINENO"; then :
33203  ac_cv_prog_objc_g=yes
33204fi
33205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33206fi
33207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33208fi
33209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33210   ac_objc_werror_flag=$ac_save_objc_werror_flag
33211fi
33212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33213$as_echo "$ac_cv_prog_objc_g" >&6; }
33214if test "$ac_test_OBJCFLAGS" = set; then
33215  OBJCFLAGS=$ac_save_OBJCFLAGS
33216elif test $ac_cv_prog_objc_g = yes; then
33217  if test "$GOBJC" = yes; then
33218    OBJCFLAGS="-g -O2"
33219  else
33220    OBJCFLAGS="-g"
33221  fi
33222else
33223  if test "$GOBJC" = yes; then
33224    OBJCFLAGS="-O2"
33225  else
33226    OBJCFLAGS=
33227  fi
33228fi
33229ac_ext=cpp
33230ac_cpp='$CXXCPP $CPPFLAGS'
33231ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33232ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33233ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33234
33235
33236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33237
33238  # First separate the path from the arguments. This will split at the first
33239  # space.
33240  complete="$OBJC"
33241  path="${complete%% *}"
33242  tmp="$complete EOL"
33243  arguments="${tmp#* }"
33244
33245  # Input might be given as Windows format, start by converting to
33246  # unix format.
33247  new_path=`$CYGPATH -u "$path"`
33248
33249  # Now try to locate executable using which
33250  new_path=`$WHICH "$new_path" 2> /dev/null`
33251  # bat and cmd files are not always considered executable in cygwin causing which
33252  # to not find them
33253  if test "x$new_path" = x \
33254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33256    new_path=`$CYGPATH -u "$path"`
33257  fi
33258  if test "x$new_path" = x; then
33259    # Oops. Which didn't find the executable.
33260    # The splitting of arguments from the executable at a space might have been incorrect,
33261    # since paths with space are more likely in Windows. Give it another try with the whole
33262    # argument.
33263    path="$complete"
33264    arguments="EOL"
33265    new_path=`$CYGPATH -u "$path"`
33266    new_path=`$WHICH "$new_path" 2> /dev/null`
33267    # bat and cmd files are not always considered executable in cygwin causing which
33268    # to not find them
33269    if test "x$new_path" = x \
33270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33272      new_path=`$CYGPATH -u "$path"`
33273    fi
33274    if test "x$new_path" = x; then
33275      # It's still not found. Now this is an unrecoverable error.
33276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33277$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33278      has_space=`$ECHO "$complete" | $GREP " "`
33279      if test "x$has_space" != x; then
33280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33282      fi
33283      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33284    fi
33285  fi
33286
33287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33290  # "foo.exe" is OK but "foo" is an error.
33291  #
33292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33293  # It is also a way to make sure we got the proper file name for the real test later on.
33294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33295  if test "x$test_shortpath" = x; then
33296    # Short path failed, file does not exist as specified.
33297    # Try adding .exe or .cmd
33298    if test -f "${new_path}.exe"; then
33299      input_to_shortpath="${new_path}.exe"
33300    elif test -f "${new_path}.cmd"; then
33301      input_to_shortpath="${new_path}.cmd"
33302    else
33303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33304$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33307      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33308    fi
33309  else
33310    input_to_shortpath="$new_path"
33311  fi
33312
33313  # Call helper function which possibly converts this using DOS-style short mode.
33314  # If so, the updated path is stored in $new_path.
33315  new_path="$input_to_shortpath"
33316
33317  input_path="$input_to_shortpath"
33318  # Check if we need to convert this using DOS-style short mode. If the path
33319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33320  # take no chances and rewrite it.
33321  # Note: m4 eats our [], so we need to use [ and ] instead.
33322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33323  if test "x$has_forbidden_chars" != x; then
33324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33328      # Going to short mode and back again did indeed matter. Since short mode is
33329      # case insensitive, let's make it lowercase to improve readability.
33330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33331      # Now convert it back to Unix-stile (cygpath)
33332      input_path=`$CYGPATH -u "$shortmode_path"`
33333      new_path="$input_path"
33334    fi
33335  fi
33336
33337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33338  if test "x$test_cygdrive_prefix" = x; then
33339    # As a simple fix, exclude /usr/bin since it's not a real path.
33340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33342      # a path prefixed by /cygdrive for fixpath to work.
33343      new_path="$CYGWIN_ROOT_PATH$input_path"
33344    fi
33345  fi
33346
33347  # remove trailing .exe if any
33348  new_path="${new_path/%.exe/}"
33349
33350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33351
33352  # First separate the path from the arguments. This will split at the first
33353  # space.
33354  complete="$OBJC"
33355  path="${complete%% *}"
33356  tmp="$complete EOL"
33357  arguments="${tmp#* }"
33358
33359  # Input might be given as Windows format, start by converting to
33360  # unix format.
33361  new_path="$path"
33362
33363  windows_path="$new_path"
33364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33365    unix_path=`$CYGPATH -u "$windows_path"`
33366    new_path="$unix_path"
33367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33369    new_path="$unix_path"
33370  fi
33371
33372
33373  # Now try to locate executable using which
33374  new_path=`$WHICH "$new_path" 2> /dev/null`
33375
33376  if test "x$new_path" = x; then
33377    # Oops. Which didn't find the executable.
33378    # The splitting of arguments from the executable at a space might have been incorrect,
33379    # since paths with space are more likely in Windows. Give it another try with the whole
33380    # argument.
33381    path="$complete"
33382    arguments="EOL"
33383    new_path="$path"
33384
33385  windows_path="$new_path"
33386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33387    unix_path=`$CYGPATH -u "$windows_path"`
33388    new_path="$unix_path"
33389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33391    new_path="$unix_path"
33392  fi
33393
33394
33395    new_path=`$WHICH "$new_path" 2> /dev/null`
33396    # bat and cmd files are not always considered executable in MSYS causing which
33397    # to not find them
33398    if test "x$new_path" = x \
33399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33401      new_path="$path"
33402
33403  windows_path="$new_path"
33404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33405    unix_path=`$CYGPATH -u "$windows_path"`
33406    new_path="$unix_path"
33407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33409    new_path="$unix_path"
33410  fi
33411
33412    fi
33413
33414    if test "x$new_path" = x; then
33415      # It's still not found. Now this is an unrecoverable error.
33416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33417$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33418      has_space=`$ECHO "$complete" | $GREP " "`
33419      if test "x$has_space" != x; then
33420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33422      fi
33423      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33424    fi
33425  fi
33426
33427  # Now new_path has a complete unix path to the binary
33428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33429    # Keep paths in /bin as-is, but remove trailing .exe if any
33430    new_path="${new_path/%.exe/}"
33431    # Do not save /bin paths to all_fixpath_prefixes!
33432  else
33433    # Not in mixed or Windows style, start by that.
33434    new_path=`cmd //c echo $new_path`
33435
33436  input_path="$new_path"
33437  # Check if we need to convert this using DOS-style short mode. If the path
33438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33439  # take no chances and rewrite it.
33440  # Note: m4 eats our [], so we need to use [ and ] instead.
33441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33442  if test "x$has_forbidden_chars" != x; then
33443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33445  fi
33446
33447    # Output is in $new_path
33448
33449  windows_path="$new_path"
33450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33451    unix_path=`$CYGPATH -u "$windows_path"`
33452    new_path="$unix_path"
33453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33455    new_path="$unix_path"
33456  fi
33457
33458    # remove trailing .exe if any
33459    new_path="${new_path/%.exe/}"
33460
33461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33463  fi
33464
33465  else
33466    # We're on a unix platform. Hooray! :)
33467    # First separate the path from the arguments. This will split at the first
33468    # space.
33469    complete="$OBJC"
33470    path="${complete%% *}"
33471    tmp="$complete EOL"
33472    arguments="${tmp#* }"
33473
33474    # Cannot rely on the command "which" here since it doesn't always work.
33475    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33476    if test -z "$is_absolute_path"; then
33477      # Path to executable is not absolute. Find it.
33478      IFS_save="$IFS"
33479      IFS=:
33480      for p in $PATH; do
33481        if test -f "$p/$path" && test -x "$p/$path"; then
33482          new_path="$p/$path"
33483          break
33484        fi
33485      done
33486      IFS="$IFS_save"
33487    else
33488      # This is an absolute path, we can use it without further modifications.
33489      new_path="$path"
33490    fi
33491
33492    if test "x$new_path" = x; then
33493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33494$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33495      has_space=`$ECHO "$complete" | $GREP " "`
33496      if test "x$has_space" != x; then
33497        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33499      fi
33500      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33501    fi
33502  fi
33503
33504  # Now join together the path and the arguments once again
33505  if test "x$arguments" != xEOL; then
33506    new_complete="$new_path ${arguments% *}"
33507  else
33508    new_complete="$new_path"
33509  fi
33510
33511  if test "x$complete" != "x$new_complete"; then
33512    OBJC="$new_complete"
33513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33514$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33515  fi
33516
33517
33518
33519  # Publish this variable in the help.
33520
33521
33522  if test "x$LIPO" = x; then
33523    # The variable is not set by user, try to locate tool using the code snippet
33524    for ac_prog in lipo
33525do
33526  # Extract the first word of "$ac_prog", so it can be a program name with args.
33527set dummy $ac_prog; ac_word=$2
33528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33529$as_echo_n "checking for $ac_word... " >&6; }
33530if ${ac_cv_path_LIPO+:} false; then :
33531  $as_echo_n "(cached) " >&6
33532else
33533  case $LIPO in
33534  [\\/]* | ?:[\\/]*)
33535  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33536  ;;
33537  *)
33538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33539for as_dir in $PATH
33540do
33541  IFS=$as_save_IFS
33542  test -z "$as_dir" && as_dir=.
33543    for ac_exec_ext in '' $ac_executable_extensions; do
33544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33545    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33547    break 2
33548  fi
33549done
33550  done
33551IFS=$as_save_IFS
33552
33553  ;;
33554esac
33555fi
33556LIPO=$ac_cv_path_LIPO
33557if test -n "$LIPO"; then
33558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33559$as_echo "$LIPO" >&6; }
33560else
33561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33562$as_echo "no" >&6; }
33563fi
33564
33565
33566  test -n "$LIPO" && break
33567done
33568
33569  else
33570    # The variable is set, but is it from the command line or the environment?
33571
33572    # Try to remove the string !LIPO! from our list.
33573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33575      # If it failed, the variable was not from the command line. Ignore it,
33576      # but warn the user (except for BASH, which is always set by the calling BASH).
33577      if test "xLIPO" != xBASH; then
33578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33579$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33580      fi
33581      # Try to locate tool using the code snippet
33582      for ac_prog in lipo
33583do
33584  # Extract the first word of "$ac_prog", so it can be a program name with args.
33585set dummy $ac_prog; ac_word=$2
33586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33587$as_echo_n "checking for $ac_word... " >&6; }
33588if ${ac_cv_path_LIPO+:} false; then :
33589  $as_echo_n "(cached) " >&6
33590else
33591  case $LIPO in
33592  [\\/]* | ?:[\\/]*)
33593  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33594  ;;
33595  *)
33596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33597for as_dir in $PATH
33598do
33599  IFS=$as_save_IFS
33600  test -z "$as_dir" && as_dir=.
33601    for ac_exec_ext in '' $ac_executable_extensions; do
33602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33603    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33605    break 2
33606  fi
33607done
33608  done
33609IFS=$as_save_IFS
33610
33611  ;;
33612esac
33613fi
33614LIPO=$ac_cv_path_LIPO
33615if test -n "$LIPO"; then
33616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33617$as_echo "$LIPO" >&6; }
33618else
33619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33620$as_echo "no" >&6; }
33621fi
33622
33623
33624  test -n "$LIPO" && break
33625done
33626
33627    else
33628      # If it succeeded, then it was overridden by the user. We will use it
33629      # for the tool.
33630
33631      # First remove it from the list of overridden variables, so we can test
33632      # for unknown variables in the end.
33633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33634
33635      # Check if the provided tool contains a complete path.
33636      tool_specified="$LIPO"
33637      tool_basename="${tool_specified##*/}"
33638      if test "x$tool_basename" = "x$tool_specified"; then
33639        # A command without a complete path is provided, search $PATH.
33640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33641$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33642        # Extract the first word of "$tool_basename", so it can be a program name with args.
33643set dummy $tool_basename; ac_word=$2
33644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33645$as_echo_n "checking for $ac_word... " >&6; }
33646if ${ac_cv_path_LIPO+:} false; then :
33647  $as_echo_n "(cached) " >&6
33648else
33649  case $LIPO in
33650  [\\/]* | ?:[\\/]*)
33651  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33652  ;;
33653  *)
33654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33655for as_dir in $PATH
33656do
33657  IFS=$as_save_IFS
33658  test -z "$as_dir" && as_dir=.
33659    for ac_exec_ext in '' $ac_executable_extensions; do
33660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33661    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33663    break 2
33664  fi
33665done
33666  done
33667IFS=$as_save_IFS
33668
33669  ;;
33670esac
33671fi
33672LIPO=$ac_cv_path_LIPO
33673if test -n "$LIPO"; then
33674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33675$as_echo "$LIPO" >&6; }
33676else
33677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33678$as_echo "no" >&6; }
33679fi
33680
33681
33682        if test "x$LIPO" = x; then
33683          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33684        fi
33685      else
33686        # Otherwise we believe it is a complete path. Use it as it is.
33687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33688$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33690$as_echo_n "checking for LIPO... " >&6; }
33691        if test ! -x "$tool_specified"; then
33692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33693$as_echo "not found" >&6; }
33694          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33695        fi
33696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33697$as_echo "$tool_specified" >&6; }
33698      fi
33699    fi
33700  fi
33701
33702
33703
33704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33705
33706  # First separate the path from the arguments. This will split at the first
33707  # space.
33708  complete="$LIPO"
33709  path="${complete%% *}"
33710  tmp="$complete EOL"
33711  arguments="${tmp#* }"
33712
33713  # Input might be given as Windows format, start by converting to
33714  # unix format.
33715  new_path=`$CYGPATH -u "$path"`
33716
33717  # Now try to locate executable using which
33718  new_path=`$WHICH "$new_path" 2> /dev/null`
33719  # bat and cmd files are not always considered executable in cygwin causing which
33720  # to not find them
33721  if test "x$new_path" = x \
33722      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33723      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33724    new_path=`$CYGPATH -u "$path"`
33725  fi
33726  if test "x$new_path" = x; then
33727    # Oops. Which didn't find the executable.
33728    # The splitting of arguments from the executable at a space might have been incorrect,
33729    # since paths with space are more likely in Windows. Give it another try with the whole
33730    # argument.
33731    path="$complete"
33732    arguments="EOL"
33733    new_path=`$CYGPATH -u "$path"`
33734    new_path=`$WHICH "$new_path" 2> /dev/null`
33735    # bat and cmd files are not always considered executable in cygwin causing which
33736    # to not find them
33737    if test "x$new_path" = x \
33738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33740      new_path=`$CYGPATH -u "$path"`
33741    fi
33742    if test "x$new_path" = x; then
33743      # It's still not found. Now this is an unrecoverable error.
33744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33745$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33746      has_space=`$ECHO "$complete" | $GREP " "`
33747      if test "x$has_space" != x; then
33748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33750      fi
33751      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33752    fi
33753  fi
33754
33755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33758  # "foo.exe" is OK but "foo" is an error.
33759  #
33760  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33761  # It is also a way to make sure we got the proper file name for the real test later on.
33762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33763  if test "x$test_shortpath" = x; then
33764    # Short path failed, file does not exist as specified.
33765    # Try adding .exe or .cmd
33766    if test -f "${new_path}.exe"; then
33767      input_to_shortpath="${new_path}.exe"
33768    elif test -f "${new_path}.cmd"; then
33769      input_to_shortpath="${new_path}.cmd"
33770    else
33771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33772$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33775      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33776    fi
33777  else
33778    input_to_shortpath="$new_path"
33779  fi
33780
33781  # Call helper function which possibly converts this using DOS-style short mode.
33782  # If so, the updated path is stored in $new_path.
33783  new_path="$input_to_shortpath"
33784
33785  input_path="$input_to_shortpath"
33786  # Check if we need to convert this using DOS-style short mode. If the path
33787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33788  # take no chances and rewrite it.
33789  # Note: m4 eats our [], so we need to use [ and ] instead.
33790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33791  if test "x$has_forbidden_chars" != x; then
33792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33796      # Going to short mode and back again did indeed matter. Since short mode is
33797      # case insensitive, let's make it lowercase to improve readability.
33798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33799      # Now convert it back to Unix-stile (cygpath)
33800      input_path=`$CYGPATH -u "$shortmode_path"`
33801      new_path="$input_path"
33802    fi
33803  fi
33804
33805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33806  if test "x$test_cygdrive_prefix" = x; then
33807    # As a simple fix, exclude /usr/bin since it's not a real path.
33808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33810      # a path prefixed by /cygdrive for fixpath to work.
33811      new_path="$CYGWIN_ROOT_PATH$input_path"
33812    fi
33813  fi
33814
33815  # remove trailing .exe if any
33816  new_path="${new_path/%.exe/}"
33817
33818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33819
33820  # First separate the path from the arguments. This will split at the first
33821  # space.
33822  complete="$LIPO"
33823  path="${complete%% *}"
33824  tmp="$complete EOL"
33825  arguments="${tmp#* }"
33826
33827  # Input might be given as Windows format, start by converting to
33828  # unix format.
33829  new_path="$path"
33830
33831  windows_path="$new_path"
33832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33833    unix_path=`$CYGPATH -u "$windows_path"`
33834    new_path="$unix_path"
33835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33837    new_path="$unix_path"
33838  fi
33839
33840
33841  # Now try to locate executable using which
33842  new_path=`$WHICH "$new_path" 2> /dev/null`
33843
33844  if test "x$new_path" = x; then
33845    # Oops. Which didn't find the executable.
33846    # The splitting of arguments from the executable at a space might have been incorrect,
33847    # since paths with space are more likely in Windows. Give it another try with the whole
33848    # argument.
33849    path="$complete"
33850    arguments="EOL"
33851    new_path="$path"
33852
33853  windows_path="$new_path"
33854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33855    unix_path=`$CYGPATH -u "$windows_path"`
33856    new_path="$unix_path"
33857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33859    new_path="$unix_path"
33860  fi
33861
33862
33863    new_path=`$WHICH "$new_path" 2> /dev/null`
33864    # bat and cmd files are not always considered executable in MSYS causing which
33865    # to not find them
33866    if test "x$new_path" = x \
33867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33869      new_path="$path"
33870
33871  windows_path="$new_path"
33872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33873    unix_path=`$CYGPATH -u "$windows_path"`
33874    new_path="$unix_path"
33875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33877    new_path="$unix_path"
33878  fi
33879
33880    fi
33881
33882    if test "x$new_path" = x; then
33883      # It's still not found. Now this is an unrecoverable error.
33884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33885$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33886      has_space=`$ECHO "$complete" | $GREP " "`
33887      if test "x$has_space" != x; then
33888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33890      fi
33891      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33892    fi
33893  fi
33894
33895  # Now new_path has a complete unix path to the binary
33896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33897    # Keep paths in /bin as-is, but remove trailing .exe if any
33898    new_path="${new_path/%.exe/}"
33899    # Do not save /bin paths to all_fixpath_prefixes!
33900  else
33901    # Not in mixed or Windows style, start by that.
33902    new_path=`cmd //c echo $new_path`
33903
33904  input_path="$new_path"
33905  # Check if we need to convert this using DOS-style short mode. If the path
33906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33907  # take no chances and rewrite it.
33908  # Note: m4 eats our [], so we need to use [ and ] instead.
33909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33910  if test "x$has_forbidden_chars" != x; then
33911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33913  fi
33914
33915    # Output is in $new_path
33916
33917  windows_path="$new_path"
33918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33919    unix_path=`$CYGPATH -u "$windows_path"`
33920    new_path="$unix_path"
33921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33923    new_path="$unix_path"
33924  fi
33925
33926    # remove trailing .exe if any
33927    new_path="${new_path/%.exe/}"
33928
33929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33931  fi
33932
33933  else
33934    # We're on a unix platform. Hooray! :)
33935    # First separate the path from the arguments. This will split at the first
33936    # space.
33937    complete="$LIPO"
33938    path="${complete%% *}"
33939    tmp="$complete EOL"
33940    arguments="${tmp#* }"
33941
33942    # Cannot rely on the command "which" here since it doesn't always work.
33943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33944    if test -z "$is_absolute_path"; then
33945      # Path to executable is not absolute. Find it.
33946      IFS_save="$IFS"
33947      IFS=:
33948      for p in $PATH; do
33949        if test -f "$p/$path" && test -x "$p/$path"; then
33950          new_path="$p/$path"
33951          break
33952        fi
33953      done
33954      IFS="$IFS_save"
33955    else
33956      # This is an absolute path, we can use it without further modifications.
33957      new_path="$path"
33958    fi
33959
33960    if test "x$new_path" = x; then
33961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33962$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33963      has_space=`$ECHO "$complete" | $GREP " "`
33964      if test "x$has_space" != x; then
33965        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33967      fi
33968      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33969    fi
33970  fi
33971
33972  # Now join together the path and the arguments once again
33973  if test "x$arguments" != xEOL; then
33974    new_complete="$new_path ${arguments% *}"
33975  else
33976    new_complete="$new_path"
33977  fi
33978
33979  if test "x$complete" != "x$new_complete"; then
33980    LIPO="$new_complete"
33981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33982$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33983  fi
33984
33985  else
33986    OBJC=
33987  fi
33988
33989  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33990    # Extract the first word of "mt", so it can be a program name with args.
33991set dummy mt; ac_word=$2
33992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33993$as_echo_n "checking for $ac_word... " >&6; }
33994if ${ac_cv_prog_MT+:} false; then :
33995  $as_echo_n "(cached) " >&6
33996else
33997  if test -n "$MT"; then
33998  ac_cv_prog_MT="$MT" # Let the user override the test.
33999else
34000  ac_prog_rejected=no
34001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34002for as_dir in $PATH
34003do
34004  IFS=$as_save_IFS
34005  test -z "$as_dir" && as_dir=.
34006    for ac_exec_ext in '' $ac_executable_extensions; do
34007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34008    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34009       ac_prog_rejected=yes
34010       continue
34011     fi
34012    ac_cv_prog_MT="mt"
34013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34014    break 2
34015  fi
34016done
34017  done
34018IFS=$as_save_IFS
34019
34020if test $ac_prog_rejected = yes; then
34021  # We found a bogon in the path, so make sure we never use it.
34022  set dummy $ac_cv_prog_MT
34023  shift
34024  if test $# != 0; then
34025    # We chose a different compiler from the bogus one.
34026    # However, it has the same basename, so the bogon will be chosen
34027    # first if we set MT to just the basename; use the full file name.
34028    shift
34029    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34030  fi
34031fi
34032fi
34033fi
34034MT=$ac_cv_prog_MT
34035if test -n "$MT"; then
34036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34037$as_echo "$MT" >&6; }
34038else
34039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34040$as_echo "no" >&6; }
34041fi
34042
34043
34044
34045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34046
34047  # First separate the path from the arguments. This will split at the first
34048  # space.
34049  complete="$MT"
34050  path="${complete%% *}"
34051  tmp="$complete EOL"
34052  arguments="${tmp#* }"
34053
34054  # Input might be given as Windows format, start by converting to
34055  # unix format.
34056  new_path=`$CYGPATH -u "$path"`
34057
34058  # Now try to locate executable using which
34059  new_path=`$WHICH "$new_path" 2> /dev/null`
34060  # bat and cmd files are not always considered executable in cygwin causing which
34061  # to not find them
34062  if test "x$new_path" = x \
34063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34065    new_path=`$CYGPATH -u "$path"`
34066  fi
34067  if test "x$new_path" = x; then
34068    # Oops. Which didn't find the executable.
34069    # The splitting of arguments from the executable at a space might have been incorrect,
34070    # since paths with space are more likely in Windows. Give it another try with the whole
34071    # argument.
34072    path="$complete"
34073    arguments="EOL"
34074    new_path=`$CYGPATH -u "$path"`
34075    new_path=`$WHICH "$new_path" 2> /dev/null`
34076    # bat and cmd files are not always considered executable in cygwin causing which
34077    # to not find them
34078    if test "x$new_path" = x \
34079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34081      new_path=`$CYGPATH -u "$path"`
34082    fi
34083    if test "x$new_path" = x; then
34084      # It's still not found. Now this is an unrecoverable error.
34085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34086$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34087      has_space=`$ECHO "$complete" | $GREP " "`
34088      if test "x$has_space" != x; then
34089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34091      fi
34092      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34093    fi
34094  fi
34095
34096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34099  # "foo.exe" is OK but "foo" is an error.
34100  #
34101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34102  # It is also a way to make sure we got the proper file name for the real test later on.
34103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34104  if test "x$test_shortpath" = x; then
34105    # Short path failed, file does not exist as specified.
34106    # Try adding .exe or .cmd
34107    if test -f "${new_path}.exe"; then
34108      input_to_shortpath="${new_path}.exe"
34109    elif test -f "${new_path}.cmd"; then
34110      input_to_shortpath="${new_path}.cmd"
34111    else
34112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34113$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34116      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34117    fi
34118  else
34119    input_to_shortpath="$new_path"
34120  fi
34121
34122  # Call helper function which possibly converts this using DOS-style short mode.
34123  # If so, the updated path is stored in $new_path.
34124  new_path="$input_to_shortpath"
34125
34126  input_path="$input_to_shortpath"
34127  # Check if we need to convert this using DOS-style short mode. If the path
34128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34129  # take no chances and rewrite it.
34130  # Note: m4 eats our [], so we need to use [ and ] instead.
34131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34132  if test "x$has_forbidden_chars" != x; then
34133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34137      # Going to short mode and back again did indeed matter. Since short mode is
34138      # case insensitive, let's make it lowercase to improve readability.
34139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34140      # Now convert it back to Unix-stile (cygpath)
34141      input_path=`$CYGPATH -u "$shortmode_path"`
34142      new_path="$input_path"
34143    fi
34144  fi
34145
34146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34147  if test "x$test_cygdrive_prefix" = x; then
34148    # As a simple fix, exclude /usr/bin since it's not a real path.
34149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34151      # a path prefixed by /cygdrive for fixpath to work.
34152      new_path="$CYGWIN_ROOT_PATH$input_path"
34153    fi
34154  fi
34155
34156  # remove trailing .exe if any
34157  new_path="${new_path/%.exe/}"
34158
34159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34160
34161  # First separate the path from the arguments. This will split at the first
34162  # space.
34163  complete="$MT"
34164  path="${complete%% *}"
34165  tmp="$complete EOL"
34166  arguments="${tmp#* }"
34167
34168  # Input might be given as Windows format, start by converting to
34169  # unix format.
34170  new_path="$path"
34171
34172  windows_path="$new_path"
34173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174    unix_path=`$CYGPATH -u "$windows_path"`
34175    new_path="$unix_path"
34176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178    new_path="$unix_path"
34179  fi
34180
34181
34182  # Now try to locate executable using which
34183  new_path=`$WHICH "$new_path" 2> /dev/null`
34184
34185  if test "x$new_path" = x; then
34186    # Oops. Which didn't find the executable.
34187    # The splitting of arguments from the executable at a space might have been incorrect,
34188    # since paths with space are more likely in Windows. Give it another try with the whole
34189    # argument.
34190    path="$complete"
34191    arguments="EOL"
34192    new_path="$path"
34193
34194  windows_path="$new_path"
34195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34196    unix_path=`$CYGPATH -u "$windows_path"`
34197    new_path="$unix_path"
34198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34200    new_path="$unix_path"
34201  fi
34202
34203
34204    new_path=`$WHICH "$new_path" 2> /dev/null`
34205    # bat and cmd files are not always considered executable in MSYS causing which
34206    # to not find them
34207    if test "x$new_path" = x \
34208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34210      new_path="$path"
34211
34212  windows_path="$new_path"
34213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34214    unix_path=`$CYGPATH -u "$windows_path"`
34215    new_path="$unix_path"
34216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34218    new_path="$unix_path"
34219  fi
34220
34221    fi
34222
34223    if test "x$new_path" = x; then
34224      # It's still not found. Now this is an unrecoverable error.
34225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34226$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34227      has_space=`$ECHO "$complete" | $GREP " "`
34228      if test "x$has_space" != x; then
34229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34231      fi
34232      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34233    fi
34234  fi
34235
34236  # Now new_path has a complete unix path to the binary
34237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34238    # Keep paths in /bin as-is, but remove trailing .exe if any
34239    new_path="${new_path/%.exe/}"
34240    # Do not save /bin paths to all_fixpath_prefixes!
34241  else
34242    # Not in mixed or Windows style, start by that.
34243    new_path=`cmd //c echo $new_path`
34244
34245  input_path="$new_path"
34246  # Check if we need to convert this using DOS-style short mode. If the path
34247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34248  # take no chances and rewrite it.
34249  # Note: m4 eats our [], so we need to use [ and ] instead.
34250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34251  if test "x$has_forbidden_chars" != x; then
34252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34254  fi
34255
34256    # Output is in $new_path
34257
34258  windows_path="$new_path"
34259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34260    unix_path=`$CYGPATH -u "$windows_path"`
34261    new_path="$unix_path"
34262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34264    new_path="$unix_path"
34265  fi
34266
34267    # remove trailing .exe if any
34268    new_path="${new_path/%.exe/}"
34269
34270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34272  fi
34273
34274  else
34275    # We're on a unix platform. Hooray! :)
34276    # First separate the path from the arguments. This will split at the first
34277    # space.
34278    complete="$MT"
34279    path="${complete%% *}"
34280    tmp="$complete EOL"
34281    arguments="${tmp#* }"
34282
34283    # Cannot rely on the command "which" here since it doesn't always work.
34284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34285    if test -z "$is_absolute_path"; then
34286      # Path to executable is not absolute. Find it.
34287      IFS_save="$IFS"
34288      IFS=:
34289      for p in $PATH; do
34290        if test -f "$p/$path" && test -x "$p/$path"; then
34291          new_path="$p/$path"
34292          break
34293        fi
34294      done
34295      IFS="$IFS_save"
34296    else
34297      # This is an absolute path, we can use it without further modifications.
34298      new_path="$path"
34299    fi
34300
34301    if test "x$new_path" = x; then
34302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34303$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34304      has_space=`$ECHO "$complete" | $GREP " "`
34305      if test "x$has_space" != x; then
34306        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34308      fi
34309      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34310    fi
34311  fi
34312
34313  # Now join together the path and the arguments once again
34314  if test "x$arguments" != xEOL; then
34315    new_complete="$new_path ${arguments% *}"
34316  else
34317    new_complete="$new_path"
34318  fi
34319
34320  if test "x$complete" != "x$new_complete"; then
34321    MT="$new_complete"
34322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34323$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34324  fi
34325
34326    # Setup the resource compiler (RC)
34327    # Extract the first word of "rc", so it can be a program name with args.
34328set dummy rc; ac_word=$2
34329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34330$as_echo_n "checking for $ac_word... " >&6; }
34331if ${ac_cv_prog_RC+:} false; then :
34332  $as_echo_n "(cached) " >&6
34333else
34334  if test -n "$RC"; then
34335  ac_cv_prog_RC="$RC" # Let the user override the test.
34336else
34337  ac_prog_rejected=no
34338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34339for as_dir in $PATH
34340do
34341  IFS=$as_save_IFS
34342  test -z "$as_dir" && as_dir=.
34343    for ac_exec_ext in '' $ac_executable_extensions; do
34344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34345    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34346       ac_prog_rejected=yes
34347       continue
34348     fi
34349    ac_cv_prog_RC="rc"
34350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34351    break 2
34352  fi
34353done
34354  done
34355IFS=$as_save_IFS
34356
34357if test $ac_prog_rejected = yes; then
34358  # We found a bogon in the path, so make sure we never use it.
34359  set dummy $ac_cv_prog_RC
34360  shift
34361  if test $# != 0; then
34362    # We chose a different compiler from the bogus one.
34363    # However, it has the same basename, so the bogon will be chosen
34364    # first if we set RC to just the basename; use the full file name.
34365    shift
34366    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34367  fi
34368fi
34369fi
34370fi
34371RC=$ac_cv_prog_RC
34372if test -n "$RC"; then
34373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34374$as_echo "$RC" >&6; }
34375else
34376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34377$as_echo "no" >&6; }
34378fi
34379
34380
34381
34382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34383
34384  # First separate the path from the arguments. This will split at the first
34385  # space.
34386  complete="$RC"
34387  path="${complete%% *}"
34388  tmp="$complete EOL"
34389  arguments="${tmp#* }"
34390
34391  # Input might be given as Windows format, start by converting to
34392  # unix format.
34393  new_path=`$CYGPATH -u "$path"`
34394
34395  # Now try to locate executable using which
34396  new_path=`$WHICH "$new_path" 2> /dev/null`
34397  # bat and cmd files are not always considered executable in cygwin causing which
34398  # to not find them
34399  if test "x$new_path" = x \
34400      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34401      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34402    new_path=`$CYGPATH -u "$path"`
34403  fi
34404  if test "x$new_path" = x; then
34405    # Oops. Which didn't find the executable.
34406    # The splitting of arguments from the executable at a space might have been incorrect,
34407    # since paths with space are more likely in Windows. Give it another try with the whole
34408    # argument.
34409    path="$complete"
34410    arguments="EOL"
34411    new_path=`$CYGPATH -u "$path"`
34412    new_path=`$WHICH "$new_path" 2> /dev/null`
34413    # bat and cmd files are not always considered executable in cygwin causing which
34414    # to not find them
34415    if test "x$new_path" = x \
34416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34418      new_path=`$CYGPATH -u "$path"`
34419    fi
34420    if test "x$new_path" = x; then
34421      # It's still not found. Now this is an unrecoverable error.
34422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34423$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34424      has_space=`$ECHO "$complete" | $GREP " "`
34425      if test "x$has_space" != x; then
34426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34428      fi
34429      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34430    fi
34431  fi
34432
34433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34436  # "foo.exe" is OK but "foo" is an error.
34437  #
34438  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34439  # It is also a way to make sure we got the proper file name for the real test later on.
34440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34441  if test "x$test_shortpath" = x; then
34442    # Short path failed, file does not exist as specified.
34443    # Try adding .exe or .cmd
34444    if test -f "${new_path}.exe"; then
34445      input_to_shortpath="${new_path}.exe"
34446    elif test -f "${new_path}.cmd"; then
34447      input_to_shortpath="${new_path}.cmd"
34448    else
34449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34450$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34451      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34452$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34453      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34454    fi
34455  else
34456    input_to_shortpath="$new_path"
34457  fi
34458
34459  # Call helper function which possibly converts this using DOS-style short mode.
34460  # If so, the updated path is stored in $new_path.
34461  new_path="$input_to_shortpath"
34462
34463  input_path="$input_to_shortpath"
34464  # Check if we need to convert this using DOS-style short mode. If the path
34465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34466  # take no chances and rewrite it.
34467  # Note: m4 eats our [], so we need to use [ and ] instead.
34468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34469  if test "x$has_forbidden_chars" != x; then
34470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34474      # Going to short mode and back again did indeed matter. Since short mode is
34475      # case insensitive, let's make it lowercase to improve readability.
34476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34477      # Now convert it back to Unix-stile (cygpath)
34478      input_path=`$CYGPATH -u "$shortmode_path"`
34479      new_path="$input_path"
34480    fi
34481  fi
34482
34483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34484  if test "x$test_cygdrive_prefix" = x; then
34485    # As a simple fix, exclude /usr/bin since it's not a real path.
34486    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34488      # a path prefixed by /cygdrive for fixpath to work.
34489      new_path="$CYGWIN_ROOT_PATH$input_path"
34490    fi
34491  fi
34492
34493  # remove trailing .exe if any
34494  new_path="${new_path/%.exe/}"
34495
34496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34497
34498  # First separate the path from the arguments. This will split at the first
34499  # space.
34500  complete="$RC"
34501  path="${complete%% *}"
34502  tmp="$complete EOL"
34503  arguments="${tmp#* }"
34504
34505  # Input might be given as Windows format, start by converting to
34506  # unix format.
34507  new_path="$path"
34508
34509  windows_path="$new_path"
34510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34511    unix_path=`$CYGPATH -u "$windows_path"`
34512    new_path="$unix_path"
34513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34515    new_path="$unix_path"
34516  fi
34517
34518
34519  # Now try to locate executable using which
34520  new_path=`$WHICH "$new_path" 2> /dev/null`
34521
34522  if test "x$new_path" = x; then
34523    # Oops. Which didn't find the executable.
34524    # The splitting of arguments from the executable at a space might have been incorrect,
34525    # since paths with space are more likely in Windows. Give it another try with the whole
34526    # argument.
34527    path="$complete"
34528    arguments="EOL"
34529    new_path="$path"
34530
34531  windows_path="$new_path"
34532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34533    unix_path=`$CYGPATH -u "$windows_path"`
34534    new_path="$unix_path"
34535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34537    new_path="$unix_path"
34538  fi
34539
34540
34541    new_path=`$WHICH "$new_path" 2> /dev/null`
34542    # bat and cmd files are not always considered executable in MSYS causing which
34543    # to not find them
34544    if test "x$new_path" = x \
34545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34547      new_path="$path"
34548
34549  windows_path="$new_path"
34550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34551    unix_path=`$CYGPATH -u "$windows_path"`
34552    new_path="$unix_path"
34553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34555    new_path="$unix_path"
34556  fi
34557
34558    fi
34559
34560    if test "x$new_path" = x; then
34561      # It's still not found. Now this is an unrecoverable error.
34562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34563$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34564      has_space=`$ECHO "$complete" | $GREP " "`
34565      if test "x$has_space" != x; then
34566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34568      fi
34569      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34570    fi
34571  fi
34572
34573  # Now new_path has a complete unix path to the binary
34574  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34575    # Keep paths in /bin as-is, but remove trailing .exe if any
34576    new_path="${new_path/%.exe/}"
34577    # Do not save /bin paths to all_fixpath_prefixes!
34578  else
34579    # Not in mixed or Windows style, start by that.
34580    new_path=`cmd //c echo $new_path`
34581
34582  input_path="$new_path"
34583  # Check if we need to convert this using DOS-style short mode. If the path
34584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34585  # take no chances and rewrite it.
34586  # Note: m4 eats our [], so we need to use [ and ] instead.
34587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34588  if test "x$has_forbidden_chars" != x; then
34589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34591  fi
34592
34593    # Output is in $new_path
34594
34595  windows_path="$new_path"
34596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34597    unix_path=`$CYGPATH -u "$windows_path"`
34598    new_path="$unix_path"
34599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34601    new_path="$unix_path"
34602  fi
34603
34604    # remove trailing .exe if any
34605    new_path="${new_path/%.exe/}"
34606
34607    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34608    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34609  fi
34610
34611  else
34612    # We're on a unix platform. Hooray! :)
34613    # First separate the path from the arguments. This will split at the first
34614    # space.
34615    complete="$RC"
34616    path="${complete%% *}"
34617    tmp="$complete EOL"
34618    arguments="${tmp#* }"
34619
34620    # Cannot rely on the command "which" here since it doesn't always work.
34621    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34622    if test -z "$is_absolute_path"; then
34623      # Path to executable is not absolute. Find it.
34624      IFS_save="$IFS"
34625      IFS=:
34626      for p in $PATH; do
34627        if test -f "$p/$path" && test -x "$p/$path"; then
34628          new_path="$p/$path"
34629          break
34630        fi
34631      done
34632      IFS="$IFS_save"
34633    else
34634      # This is an absolute path, we can use it without further modifications.
34635      new_path="$path"
34636    fi
34637
34638    if test "x$new_path" = x; then
34639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34640$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34641      has_space=`$ECHO "$complete" | $GREP " "`
34642      if test "x$has_space" != x; then
34643        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34645      fi
34646      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34647    fi
34648  fi
34649
34650  # Now join together the path and the arguments once again
34651  if test "x$arguments" != xEOL; then
34652    new_complete="$new_path ${arguments% *}"
34653  else
34654    new_complete="$new_path"
34655  fi
34656
34657  if test "x$complete" != "x$new_complete"; then
34658    RC="$new_complete"
34659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34660$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34661  fi
34662
34663    # Extract the first word of "dumpbin", so it can be a program name with args.
34664set dummy dumpbin; ac_word=$2
34665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34666$as_echo_n "checking for $ac_word... " >&6; }
34667if ${ac_cv_prog_DUMPBIN+:} false; then :
34668  $as_echo_n "(cached) " >&6
34669else
34670  if test -n "$DUMPBIN"; then
34671  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34672else
34673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34674for as_dir in $PATH
34675do
34676  IFS=$as_save_IFS
34677  test -z "$as_dir" && as_dir=.
34678    for ac_exec_ext in '' $ac_executable_extensions; do
34679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34680    ac_cv_prog_DUMPBIN="dumpbin"
34681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34682    break 2
34683  fi
34684done
34685  done
34686IFS=$as_save_IFS
34687
34688fi
34689fi
34690DUMPBIN=$ac_cv_prog_DUMPBIN
34691if test -n "$DUMPBIN"; then
34692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34693$as_echo "$DUMPBIN" >&6; }
34694else
34695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34696$as_echo "no" >&6; }
34697fi
34698
34699
34700
34701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34702
34703  # First separate the path from the arguments. This will split at the first
34704  # space.
34705  complete="$DUMPBIN"
34706  path="${complete%% *}"
34707  tmp="$complete EOL"
34708  arguments="${tmp#* }"
34709
34710  # Input might be given as Windows format, start by converting to
34711  # unix format.
34712  new_path=`$CYGPATH -u "$path"`
34713
34714  # Now try to locate executable using which
34715  new_path=`$WHICH "$new_path" 2> /dev/null`
34716  # bat and cmd files are not always considered executable in cygwin causing which
34717  # to not find them
34718  if test "x$new_path" = x \
34719      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34720      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34721    new_path=`$CYGPATH -u "$path"`
34722  fi
34723  if test "x$new_path" = x; then
34724    # Oops. Which didn't find the executable.
34725    # The splitting of arguments from the executable at a space might have been incorrect,
34726    # since paths with space are more likely in Windows. Give it another try with the whole
34727    # argument.
34728    path="$complete"
34729    arguments="EOL"
34730    new_path=`$CYGPATH -u "$path"`
34731    new_path=`$WHICH "$new_path" 2> /dev/null`
34732    # bat and cmd files are not always considered executable in cygwin causing which
34733    # to not find them
34734    if test "x$new_path" = x \
34735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34737      new_path=`$CYGPATH -u "$path"`
34738    fi
34739    if test "x$new_path" = x; then
34740      # It's still not found. Now this is an unrecoverable error.
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34742$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34743      has_space=`$ECHO "$complete" | $GREP " "`
34744      if test "x$has_space" != x; then
34745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34747      fi
34748      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34749    fi
34750  fi
34751
34752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34755  # "foo.exe" is OK but "foo" is an error.
34756  #
34757  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34758  # It is also a way to make sure we got the proper file name for the real test later on.
34759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34760  if test "x$test_shortpath" = x; then
34761    # Short path failed, file does not exist as specified.
34762    # Try adding .exe or .cmd
34763    if test -f "${new_path}.exe"; then
34764      input_to_shortpath="${new_path}.exe"
34765    elif test -f "${new_path}.cmd"; then
34766      input_to_shortpath="${new_path}.cmd"
34767    else
34768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34769$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34772      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34773    fi
34774  else
34775    input_to_shortpath="$new_path"
34776  fi
34777
34778  # Call helper function which possibly converts this using DOS-style short mode.
34779  # If so, the updated path is stored in $new_path.
34780  new_path="$input_to_shortpath"
34781
34782  input_path="$input_to_shortpath"
34783  # Check if we need to convert this using DOS-style short mode. If the path
34784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34785  # take no chances and rewrite it.
34786  # Note: m4 eats our [], so we need to use [ and ] instead.
34787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34788  if test "x$has_forbidden_chars" != x; then
34789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34793      # Going to short mode and back again did indeed matter. Since short mode is
34794      # case insensitive, let's make it lowercase to improve readability.
34795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34796      # Now convert it back to Unix-stile (cygpath)
34797      input_path=`$CYGPATH -u "$shortmode_path"`
34798      new_path="$input_path"
34799    fi
34800  fi
34801
34802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34803  if test "x$test_cygdrive_prefix" = x; then
34804    # As a simple fix, exclude /usr/bin since it's not a real path.
34805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34807      # a path prefixed by /cygdrive for fixpath to work.
34808      new_path="$CYGWIN_ROOT_PATH$input_path"
34809    fi
34810  fi
34811
34812  # remove trailing .exe if any
34813  new_path="${new_path/%.exe/}"
34814
34815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34816
34817  # First separate the path from the arguments. This will split at the first
34818  # space.
34819  complete="$DUMPBIN"
34820  path="${complete%% *}"
34821  tmp="$complete EOL"
34822  arguments="${tmp#* }"
34823
34824  # Input might be given as Windows format, start by converting to
34825  # unix format.
34826  new_path="$path"
34827
34828  windows_path="$new_path"
34829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34830    unix_path=`$CYGPATH -u "$windows_path"`
34831    new_path="$unix_path"
34832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34834    new_path="$unix_path"
34835  fi
34836
34837
34838  # Now try to locate executable using which
34839  new_path=`$WHICH "$new_path" 2> /dev/null`
34840
34841  if test "x$new_path" = x; then
34842    # Oops. Which didn't find the executable.
34843    # The splitting of arguments from the executable at a space might have been incorrect,
34844    # since paths with space are more likely in Windows. Give it another try with the whole
34845    # argument.
34846    path="$complete"
34847    arguments="EOL"
34848    new_path="$path"
34849
34850  windows_path="$new_path"
34851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34852    unix_path=`$CYGPATH -u "$windows_path"`
34853    new_path="$unix_path"
34854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34856    new_path="$unix_path"
34857  fi
34858
34859
34860    new_path=`$WHICH "$new_path" 2> /dev/null`
34861    # bat and cmd files are not always considered executable in MSYS causing which
34862    # to not find them
34863    if test "x$new_path" = x \
34864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34866      new_path="$path"
34867
34868  windows_path="$new_path"
34869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34870    unix_path=`$CYGPATH -u "$windows_path"`
34871    new_path="$unix_path"
34872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34874    new_path="$unix_path"
34875  fi
34876
34877    fi
34878
34879    if test "x$new_path" = x; then
34880      # It's still not found. Now this is an unrecoverable error.
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34882$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34883      has_space=`$ECHO "$complete" | $GREP " "`
34884      if test "x$has_space" != x; then
34885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34887      fi
34888      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34889    fi
34890  fi
34891
34892  # Now new_path has a complete unix path to the binary
34893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34894    # Keep paths in /bin as-is, but remove trailing .exe if any
34895    new_path="${new_path/%.exe/}"
34896    # Do not save /bin paths to all_fixpath_prefixes!
34897  else
34898    # Not in mixed or Windows style, start by that.
34899    new_path=`cmd //c echo $new_path`
34900
34901  input_path="$new_path"
34902  # Check if we need to convert this using DOS-style short mode. If the path
34903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34904  # take no chances and rewrite it.
34905  # Note: m4 eats our [], so we need to use [ and ] instead.
34906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34907  if test "x$has_forbidden_chars" != x; then
34908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34910  fi
34911
34912    # Output is in $new_path
34913
34914  windows_path="$new_path"
34915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916    unix_path=`$CYGPATH -u "$windows_path"`
34917    new_path="$unix_path"
34918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34920    new_path="$unix_path"
34921  fi
34922
34923    # remove trailing .exe if any
34924    new_path="${new_path/%.exe/}"
34925
34926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34928  fi
34929
34930  else
34931    # We're on a unix platform. Hooray! :)
34932    # First separate the path from the arguments. This will split at the first
34933    # space.
34934    complete="$DUMPBIN"
34935    path="${complete%% *}"
34936    tmp="$complete EOL"
34937    arguments="${tmp#* }"
34938
34939    # Cannot rely on the command "which" here since it doesn't always work.
34940    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34941    if test -z "$is_absolute_path"; then
34942      # Path to executable is not absolute. Find it.
34943      IFS_save="$IFS"
34944      IFS=:
34945      for p in $PATH; do
34946        if test -f "$p/$path" && test -x "$p/$path"; then
34947          new_path="$p/$path"
34948          break
34949        fi
34950      done
34951      IFS="$IFS_save"
34952    else
34953      # This is an absolute path, we can use it without further modifications.
34954      new_path="$path"
34955    fi
34956
34957    if test "x$new_path" = x; then
34958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34959$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34960      has_space=`$ECHO "$complete" | $GREP " "`
34961      if test "x$has_space" != x; then
34962        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34964      fi
34965      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34966    fi
34967  fi
34968
34969  # Now join together the path and the arguments once again
34970  if test "x$arguments" != xEOL; then
34971    new_complete="$new_path ${arguments% *}"
34972  else
34973    new_complete="$new_path"
34974  fi
34975
34976  if test "x$complete" != "x$new_complete"; then
34977    DUMPBIN="$new_complete"
34978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34979$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34980  fi
34981
34982    # We need to check for 'msbuild.exe' because at the place where we expect to
34983    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34984    # won't find the 'msbuild.exe' executable in that case (and the
34985    # 'ac_executable_extensions' is unusable due to performance reasons).
34986    # Notice that we intentionally don't fix up the path to MSBUILD because we
34987    # will call it in a DOS shell during freetype detection on Windows (see
34988    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34989    # Extract the first word of "msbuild.exe", so it can be a program name with args.
34990set dummy msbuild.exe; ac_word=$2
34991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34992$as_echo_n "checking for $ac_word... " >&6; }
34993if ${ac_cv_prog_MSBUILD+:} false; then :
34994  $as_echo_n "(cached) " >&6
34995else
34996  if test -n "$MSBUILD"; then
34997  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34998else
34999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35000for as_dir in $PATH
35001do
35002  IFS=$as_save_IFS
35003  test -z "$as_dir" && as_dir=.
35004    for ac_exec_ext in '' $ac_executable_extensions; do
35005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35006    ac_cv_prog_MSBUILD="msbuild.exe"
35007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35008    break 2
35009  fi
35010done
35011  done
35012IFS=$as_save_IFS
35013
35014fi
35015fi
35016MSBUILD=$ac_cv_prog_MSBUILD
35017if test -n "$MSBUILD"; then
35018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35019$as_echo "$MSBUILD" >&6; }
35020else
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35022$as_echo "no" >&6; }
35023fi
35024
35025
35026  fi
35027
35028  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35029
35030
35031  # Publish this variable in the help.
35032
35033
35034  if test "x$STRIP" = x; then
35035    # The variable is not set by user, try to locate tool using the code snippet
35036    for ac_prog in strip
35037do
35038  # Extract the first word of "$ac_prog", so it can be a program name with args.
35039set dummy $ac_prog; ac_word=$2
35040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35041$as_echo_n "checking for $ac_word... " >&6; }
35042if ${ac_cv_path_STRIP+:} false; then :
35043  $as_echo_n "(cached) " >&6
35044else
35045  case $STRIP in
35046  [\\/]* | ?:[\\/]*)
35047  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35048  ;;
35049  *)
35050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35051for as_dir in $PATH
35052do
35053  IFS=$as_save_IFS
35054  test -z "$as_dir" && as_dir=.
35055    for ac_exec_ext in '' $ac_executable_extensions; do
35056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35057    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35059    break 2
35060  fi
35061done
35062  done
35063IFS=$as_save_IFS
35064
35065  ;;
35066esac
35067fi
35068STRIP=$ac_cv_path_STRIP
35069if test -n "$STRIP"; then
35070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35071$as_echo "$STRIP" >&6; }
35072else
35073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35074$as_echo "no" >&6; }
35075fi
35076
35077
35078  test -n "$STRIP" && break
35079done
35080
35081  else
35082    # The variable is set, but is it from the command line or the environment?
35083
35084    # Try to remove the string !STRIP! from our list.
35085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35087      # If it failed, the variable was not from the command line. Ignore it,
35088      # but warn the user (except for BASH, which is always set by the calling BASH).
35089      if test "xSTRIP" != xBASH; then
35090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35091$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35092      fi
35093      # Try to locate tool using the code snippet
35094      for ac_prog in strip
35095do
35096  # Extract the first word of "$ac_prog", so it can be a program name with args.
35097set dummy $ac_prog; ac_word=$2
35098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35099$as_echo_n "checking for $ac_word... " >&6; }
35100if ${ac_cv_path_STRIP+:} false; then :
35101  $as_echo_n "(cached) " >&6
35102else
35103  case $STRIP in
35104  [\\/]* | ?:[\\/]*)
35105  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35106  ;;
35107  *)
35108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35109for as_dir in $PATH
35110do
35111  IFS=$as_save_IFS
35112  test -z "$as_dir" && as_dir=.
35113    for ac_exec_ext in '' $ac_executable_extensions; do
35114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35115    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35117    break 2
35118  fi
35119done
35120  done
35121IFS=$as_save_IFS
35122
35123  ;;
35124esac
35125fi
35126STRIP=$ac_cv_path_STRIP
35127if test -n "$STRIP"; then
35128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35129$as_echo "$STRIP" >&6; }
35130else
35131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35132$as_echo "no" >&6; }
35133fi
35134
35135
35136  test -n "$STRIP" && break
35137done
35138
35139    else
35140      # If it succeeded, then it was overridden by the user. We will use it
35141      # for the tool.
35142
35143      # First remove it from the list of overridden variables, so we can test
35144      # for unknown variables in the end.
35145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35146
35147      # Check if the provided tool contains a complete path.
35148      tool_specified="$STRIP"
35149      tool_basename="${tool_specified##*/}"
35150      if test "x$tool_basename" = "x$tool_specified"; then
35151        # A command without a complete path is provided, search $PATH.
35152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35153$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35154        # Extract the first word of "$tool_basename", so it can be a program name with args.
35155set dummy $tool_basename; ac_word=$2
35156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35157$as_echo_n "checking for $ac_word... " >&6; }
35158if ${ac_cv_path_STRIP+:} false; then :
35159  $as_echo_n "(cached) " >&6
35160else
35161  case $STRIP in
35162  [\\/]* | ?:[\\/]*)
35163  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35164  ;;
35165  *)
35166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35167for as_dir in $PATH
35168do
35169  IFS=$as_save_IFS
35170  test -z "$as_dir" && as_dir=.
35171    for ac_exec_ext in '' $ac_executable_extensions; do
35172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35173    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35175    break 2
35176  fi
35177done
35178  done
35179IFS=$as_save_IFS
35180
35181  ;;
35182esac
35183fi
35184STRIP=$ac_cv_path_STRIP
35185if test -n "$STRIP"; then
35186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35187$as_echo "$STRIP" >&6; }
35188else
35189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35190$as_echo "no" >&6; }
35191fi
35192
35193
35194        if test "x$STRIP" = x; then
35195          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35196        fi
35197      else
35198        # Otherwise we believe it is a complete path. Use it as it is.
35199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35200$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35202$as_echo_n "checking for STRIP... " >&6; }
35203        if test ! -x "$tool_specified"; then
35204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35205$as_echo "not found" >&6; }
35206          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35207        fi
35208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35209$as_echo "$tool_specified" >&6; }
35210      fi
35211    fi
35212  fi
35213
35214
35215
35216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35217
35218  # First separate the path from the arguments. This will split at the first
35219  # space.
35220  complete="$STRIP"
35221  path="${complete%% *}"
35222  tmp="$complete EOL"
35223  arguments="${tmp#* }"
35224
35225  # Input might be given as Windows format, start by converting to
35226  # unix format.
35227  new_path=`$CYGPATH -u "$path"`
35228
35229  # Now try to locate executable using which
35230  new_path=`$WHICH "$new_path" 2> /dev/null`
35231  # bat and cmd files are not always considered executable in cygwin causing which
35232  # to not find them
35233  if test "x$new_path" = x \
35234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35236    new_path=`$CYGPATH -u "$path"`
35237  fi
35238  if test "x$new_path" = x; then
35239    # Oops. Which didn't find the executable.
35240    # The splitting of arguments from the executable at a space might have been incorrect,
35241    # since paths with space are more likely in Windows. Give it another try with the whole
35242    # argument.
35243    path="$complete"
35244    arguments="EOL"
35245    new_path=`$CYGPATH -u "$path"`
35246    new_path=`$WHICH "$new_path" 2> /dev/null`
35247    # bat and cmd files are not always considered executable in cygwin causing which
35248    # to not find them
35249    if test "x$new_path" = x \
35250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35252      new_path=`$CYGPATH -u "$path"`
35253    fi
35254    if test "x$new_path" = x; then
35255      # It's still not found. Now this is an unrecoverable error.
35256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35257$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35258      has_space=`$ECHO "$complete" | $GREP " "`
35259      if test "x$has_space" != x; then
35260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35262      fi
35263      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35264    fi
35265  fi
35266
35267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35270  # "foo.exe" is OK but "foo" is an error.
35271  #
35272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35273  # It is also a way to make sure we got the proper file name for the real test later on.
35274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35275  if test "x$test_shortpath" = x; then
35276    # Short path failed, file does not exist as specified.
35277    # Try adding .exe or .cmd
35278    if test -f "${new_path}.exe"; then
35279      input_to_shortpath="${new_path}.exe"
35280    elif test -f "${new_path}.cmd"; then
35281      input_to_shortpath="${new_path}.cmd"
35282    else
35283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35284$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35287      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35288    fi
35289  else
35290    input_to_shortpath="$new_path"
35291  fi
35292
35293  # Call helper function which possibly converts this using DOS-style short mode.
35294  # If so, the updated path is stored in $new_path.
35295  new_path="$input_to_shortpath"
35296
35297  input_path="$input_to_shortpath"
35298  # Check if we need to convert this using DOS-style short mode. If the path
35299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35300  # take no chances and rewrite it.
35301  # Note: m4 eats our [], so we need to use [ and ] instead.
35302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35303  if test "x$has_forbidden_chars" != x; then
35304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35308      # Going to short mode and back again did indeed matter. Since short mode is
35309      # case insensitive, let's make it lowercase to improve readability.
35310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35311      # Now convert it back to Unix-stile (cygpath)
35312      input_path=`$CYGPATH -u "$shortmode_path"`
35313      new_path="$input_path"
35314    fi
35315  fi
35316
35317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35318  if test "x$test_cygdrive_prefix" = x; then
35319    # As a simple fix, exclude /usr/bin since it's not a real path.
35320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35322      # a path prefixed by /cygdrive for fixpath to work.
35323      new_path="$CYGWIN_ROOT_PATH$input_path"
35324    fi
35325  fi
35326
35327  # remove trailing .exe if any
35328  new_path="${new_path/%.exe/}"
35329
35330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35331
35332  # First separate the path from the arguments. This will split at the first
35333  # space.
35334  complete="$STRIP"
35335  path="${complete%% *}"
35336  tmp="$complete EOL"
35337  arguments="${tmp#* }"
35338
35339  # Input might be given as Windows format, start by converting to
35340  # unix format.
35341  new_path="$path"
35342
35343  windows_path="$new_path"
35344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35345    unix_path=`$CYGPATH -u "$windows_path"`
35346    new_path="$unix_path"
35347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35349    new_path="$unix_path"
35350  fi
35351
35352
35353  # Now try to locate executable using which
35354  new_path=`$WHICH "$new_path" 2> /dev/null`
35355
35356  if test "x$new_path" = x; then
35357    # Oops. Which didn't find the executable.
35358    # The splitting of arguments from the executable at a space might have been incorrect,
35359    # since paths with space are more likely in Windows. Give it another try with the whole
35360    # argument.
35361    path="$complete"
35362    arguments="EOL"
35363    new_path="$path"
35364
35365  windows_path="$new_path"
35366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35367    unix_path=`$CYGPATH -u "$windows_path"`
35368    new_path="$unix_path"
35369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35371    new_path="$unix_path"
35372  fi
35373
35374
35375    new_path=`$WHICH "$new_path" 2> /dev/null`
35376    # bat and cmd files are not always considered executable in MSYS causing which
35377    # to not find them
35378    if test "x$new_path" = x \
35379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35381      new_path="$path"
35382
35383  windows_path="$new_path"
35384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35385    unix_path=`$CYGPATH -u "$windows_path"`
35386    new_path="$unix_path"
35387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35389    new_path="$unix_path"
35390  fi
35391
35392    fi
35393
35394    if test "x$new_path" = x; then
35395      # It's still not found. Now this is an unrecoverable error.
35396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35397$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35398      has_space=`$ECHO "$complete" | $GREP " "`
35399      if test "x$has_space" != x; then
35400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35402      fi
35403      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35404    fi
35405  fi
35406
35407  # Now new_path has a complete unix path to the binary
35408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35409    # Keep paths in /bin as-is, but remove trailing .exe if any
35410    new_path="${new_path/%.exe/}"
35411    # Do not save /bin paths to all_fixpath_prefixes!
35412  else
35413    # Not in mixed or Windows style, start by that.
35414    new_path=`cmd //c echo $new_path`
35415
35416  input_path="$new_path"
35417  # Check if we need to convert this using DOS-style short mode. If the path
35418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35419  # take no chances and rewrite it.
35420  # Note: m4 eats our [], so we need to use [ and ] instead.
35421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35422  if test "x$has_forbidden_chars" != x; then
35423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35425  fi
35426
35427    # Output is in $new_path
35428
35429  windows_path="$new_path"
35430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35431    unix_path=`$CYGPATH -u "$windows_path"`
35432    new_path="$unix_path"
35433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35435    new_path="$unix_path"
35436  fi
35437
35438    # remove trailing .exe if any
35439    new_path="${new_path/%.exe/}"
35440
35441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35443  fi
35444
35445  else
35446    # We're on a unix platform. Hooray! :)
35447    # First separate the path from the arguments. This will split at the first
35448    # space.
35449    complete="$STRIP"
35450    path="${complete%% *}"
35451    tmp="$complete EOL"
35452    arguments="${tmp#* }"
35453
35454    # Cannot rely on the command "which" here since it doesn't always work.
35455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35456    if test -z "$is_absolute_path"; then
35457      # Path to executable is not absolute. Find it.
35458      IFS_save="$IFS"
35459      IFS=:
35460      for p in $PATH; do
35461        if test -f "$p/$path" && test -x "$p/$path"; then
35462          new_path="$p/$path"
35463          break
35464        fi
35465      done
35466      IFS="$IFS_save"
35467    else
35468      # This is an absolute path, we can use it without further modifications.
35469      new_path="$path"
35470    fi
35471
35472    if test "x$new_path" = x; then
35473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35474$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35475      has_space=`$ECHO "$complete" | $GREP " "`
35476      if test "x$has_space" != x; then
35477        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35479      fi
35480      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35481    fi
35482  fi
35483
35484  # Now join together the path and the arguments once again
35485  if test "x$arguments" != xEOL; then
35486    new_complete="$new_path ${arguments% *}"
35487  else
35488    new_complete="$new_path"
35489  fi
35490
35491  if test "x$complete" != "x$new_complete"; then
35492    STRIP="$new_complete"
35493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35494$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35495  fi
35496
35497
35498
35499  # Publish this variable in the help.
35500
35501
35502  if test "x$NM" = x; then
35503    # The variable is not set by user, try to locate tool using the code snippet
35504    for ac_prog in nm
35505do
35506  # Extract the first word of "$ac_prog", so it can be a program name with args.
35507set dummy $ac_prog; ac_word=$2
35508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35509$as_echo_n "checking for $ac_word... " >&6; }
35510if ${ac_cv_path_NM+:} false; then :
35511  $as_echo_n "(cached) " >&6
35512else
35513  case $NM in
35514  [\\/]* | ?:[\\/]*)
35515  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35516  ;;
35517  *)
35518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35519for as_dir in $PATH
35520do
35521  IFS=$as_save_IFS
35522  test -z "$as_dir" && as_dir=.
35523    for ac_exec_ext in '' $ac_executable_extensions; do
35524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35525    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35527    break 2
35528  fi
35529done
35530  done
35531IFS=$as_save_IFS
35532
35533  ;;
35534esac
35535fi
35536NM=$ac_cv_path_NM
35537if test -n "$NM"; then
35538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35539$as_echo "$NM" >&6; }
35540else
35541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35542$as_echo "no" >&6; }
35543fi
35544
35545
35546  test -n "$NM" && break
35547done
35548
35549  else
35550    # The variable is set, but is it from the command line or the environment?
35551
35552    # Try to remove the string !NM! from our list.
35553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35555      # If it failed, the variable was not from the command line. Ignore it,
35556      # but warn the user (except for BASH, which is always set by the calling BASH).
35557      if test "xNM" != xBASH; then
35558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35559$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35560      fi
35561      # Try to locate tool using the code snippet
35562      for ac_prog in nm
35563do
35564  # Extract the first word of "$ac_prog", so it can be a program name with args.
35565set dummy $ac_prog; ac_word=$2
35566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35567$as_echo_n "checking for $ac_word... " >&6; }
35568if ${ac_cv_path_NM+:} false; then :
35569  $as_echo_n "(cached) " >&6
35570else
35571  case $NM in
35572  [\\/]* | ?:[\\/]*)
35573  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35574  ;;
35575  *)
35576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35577for as_dir in $PATH
35578do
35579  IFS=$as_save_IFS
35580  test -z "$as_dir" && as_dir=.
35581    for ac_exec_ext in '' $ac_executable_extensions; do
35582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35583    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35585    break 2
35586  fi
35587done
35588  done
35589IFS=$as_save_IFS
35590
35591  ;;
35592esac
35593fi
35594NM=$ac_cv_path_NM
35595if test -n "$NM"; then
35596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35597$as_echo "$NM" >&6; }
35598else
35599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35600$as_echo "no" >&6; }
35601fi
35602
35603
35604  test -n "$NM" && break
35605done
35606
35607    else
35608      # If it succeeded, then it was overridden by the user. We will use it
35609      # for the tool.
35610
35611      # First remove it from the list of overridden variables, so we can test
35612      # for unknown variables in the end.
35613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35614
35615      # Check if the provided tool contains a complete path.
35616      tool_specified="$NM"
35617      tool_basename="${tool_specified##*/}"
35618      if test "x$tool_basename" = "x$tool_specified"; then
35619        # A command without a complete path is provided, search $PATH.
35620        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35621$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35622        # Extract the first word of "$tool_basename", so it can be a program name with args.
35623set dummy $tool_basename; ac_word=$2
35624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35625$as_echo_n "checking for $ac_word... " >&6; }
35626if ${ac_cv_path_NM+:} false; then :
35627  $as_echo_n "(cached) " >&6
35628else
35629  case $NM in
35630  [\\/]* | ?:[\\/]*)
35631  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35632  ;;
35633  *)
35634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35635for as_dir in $PATH
35636do
35637  IFS=$as_save_IFS
35638  test -z "$as_dir" && as_dir=.
35639    for ac_exec_ext in '' $ac_executable_extensions; do
35640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35641    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35643    break 2
35644  fi
35645done
35646  done
35647IFS=$as_save_IFS
35648
35649  ;;
35650esac
35651fi
35652NM=$ac_cv_path_NM
35653if test -n "$NM"; then
35654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35655$as_echo "$NM" >&6; }
35656else
35657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35658$as_echo "no" >&6; }
35659fi
35660
35661
35662        if test "x$NM" = x; then
35663          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35664        fi
35665      else
35666        # Otherwise we believe it is a complete path. Use it as it is.
35667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35668$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35670$as_echo_n "checking for NM... " >&6; }
35671        if test ! -x "$tool_specified"; then
35672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35673$as_echo "not found" >&6; }
35674          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35675        fi
35676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35677$as_echo "$tool_specified" >&6; }
35678      fi
35679    fi
35680  fi
35681
35682
35683
35684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35685
35686  # First separate the path from the arguments. This will split at the first
35687  # space.
35688  complete="$NM"
35689  path="${complete%% *}"
35690  tmp="$complete EOL"
35691  arguments="${tmp#* }"
35692
35693  # Input might be given as Windows format, start by converting to
35694  # unix format.
35695  new_path=`$CYGPATH -u "$path"`
35696
35697  # Now try to locate executable using which
35698  new_path=`$WHICH "$new_path" 2> /dev/null`
35699  # bat and cmd files are not always considered executable in cygwin causing which
35700  # to not find them
35701  if test "x$new_path" = x \
35702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35704    new_path=`$CYGPATH -u "$path"`
35705  fi
35706  if test "x$new_path" = x; then
35707    # Oops. Which didn't find the executable.
35708    # The splitting of arguments from the executable at a space might have been incorrect,
35709    # since paths with space are more likely in Windows. Give it another try with the whole
35710    # argument.
35711    path="$complete"
35712    arguments="EOL"
35713    new_path=`$CYGPATH -u "$path"`
35714    new_path=`$WHICH "$new_path" 2> /dev/null`
35715    # bat and cmd files are not always considered executable in cygwin causing which
35716    # to not find them
35717    if test "x$new_path" = x \
35718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35720      new_path=`$CYGPATH -u "$path"`
35721    fi
35722    if test "x$new_path" = x; then
35723      # It's still not found. Now this is an unrecoverable error.
35724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35725$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35726      has_space=`$ECHO "$complete" | $GREP " "`
35727      if test "x$has_space" != x; then
35728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35730      fi
35731      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35732    fi
35733  fi
35734
35735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35738  # "foo.exe" is OK but "foo" is an error.
35739  #
35740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35741  # It is also a way to make sure we got the proper file name for the real test later on.
35742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35743  if test "x$test_shortpath" = x; then
35744    # Short path failed, file does not exist as specified.
35745    # Try adding .exe or .cmd
35746    if test -f "${new_path}.exe"; then
35747      input_to_shortpath="${new_path}.exe"
35748    elif test -f "${new_path}.cmd"; then
35749      input_to_shortpath="${new_path}.cmd"
35750    else
35751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35752$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35755      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35756    fi
35757  else
35758    input_to_shortpath="$new_path"
35759  fi
35760
35761  # Call helper function which possibly converts this using DOS-style short mode.
35762  # If so, the updated path is stored in $new_path.
35763  new_path="$input_to_shortpath"
35764
35765  input_path="$input_to_shortpath"
35766  # Check if we need to convert this using DOS-style short mode. If the path
35767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35768  # take no chances and rewrite it.
35769  # Note: m4 eats our [], so we need to use [ and ] instead.
35770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35771  if test "x$has_forbidden_chars" != x; then
35772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35776      # Going to short mode and back again did indeed matter. Since short mode is
35777      # case insensitive, let's make it lowercase to improve readability.
35778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35779      # Now convert it back to Unix-stile (cygpath)
35780      input_path=`$CYGPATH -u "$shortmode_path"`
35781      new_path="$input_path"
35782    fi
35783  fi
35784
35785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35786  if test "x$test_cygdrive_prefix" = x; then
35787    # As a simple fix, exclude /usr/bin since it's not a real path.
35788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35790      # a path prefixed by /cygdrive for fixpath to work.
35791      new_path="$CYGWIN_ROOT_PATH$input_path"
35792    fi
35793  fi
35794
35795  # remove trailing .exe if any
35796  new_path="${new_path/%.exe/}"
35797
35798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35799
35800  # First separate the path from the arguments. This will split at the first
35801  # space.
35802  complete="$NM"
35803  path="${complete%% *}"
35804  tmp="$complete EOL"
35805  arguments="${tmp#* }"
35806
35807  # Input might be given as Windows format, start by converting to
35808  # unix format.
35809  new_path="$path"
35810
35811  windows_path="$new_path"
35812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35813    unix_path=`$CYGPATH -u "$windows_path"`
35814    new_path="$unix_path"
35815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35817    new_path="$unix_path"
35818  fi
35819
35820
35821  # Now try to locate executable using which
35822  new_path=`$WHICH "$new_path" 2> /dev/null`
35823
35824  if test "x$new_path" = x; then
35825    # Oops. Which didn't find the executable.
35826    # The splitting of arguments from the executable at a space might have been incorrect,
35827    # since paths with space are more likely in Windows. Give it another try with the whole
35828    # argument.
35829    path="$complete"
35830    arguments="EOL"
35831    new_path="$path"
35832
35833  windows_path="$new_path"
35834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35835    unix_path=`$CYGPATH -u "$windows_path"`
35836    new_path="$unix_path"
35837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35839    new_path="$unix_path"
35840  fi
35841
35842
35843    new_path=`$WHICH "$new_path" 2> /dev/null`
35844    # bat and cmd files are not always considered executable in MSYS causing which
35845    # to not find them
35846    if test "x$new_path" = x \
35847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35849      new_path="$path"
35850
35851  windows_path="$new_path"
35852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35853    unix_path=`$CYGPATH -u "$windows_path"`
35854    new_path="$unix_path"
35855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35857    new_path="$unix_path"
35858  fi
35859
35860    fi
35861
35862    if test "x$new_path" = x; then
35863      # It's still not found. Now this is an unrecoverable error.
35864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35865$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35866      has_space=`$ECHO "$complete" | $GREP " "`
35867      if test "x$has_space" != x; then
35868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35870      fi
35871      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35872    fi
35873  fi
35874
35875  # Now new_path has a complete unix path to the binary
35876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35877    # Keep paths in /bin as-is, but remove trailing .exe if any
35878    new_path="${new_path/%.exe/}"
35879    # Do not save /bin paths to all_fixpath_prefixes!
35880  else
35881    # Not in mixed or Windows style, start by that.
35882    new_path=`cmd //c echo $new_path`
35883
35884  input_path="$new_path"
35885  # Check if we need to convert this using DOS-style short mode. If the path
35886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35887  # take no chances and rewrite it.
35888  # Note: m4 eats our [], so we need to use [ and ] instead.
35889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35890  if test "x$has_forbidden_chars" != x; then
35891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35893  fi
35894
35895    # Output is in $new_path
35896
35897  windows_path="$new_path"
35898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35899    unix_path=`$CYGPATH -u "$windows_path"`
35900    new_path="$unix_path"
35901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35903    new_path="$unix_path"
35904  fi
35905
35906    # remove trailing .exe if any
35907    new_path="${new_path/%.exe/}"
35908
35909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35911  fi
35912
35913  else
35914    # We're on a unix platform. Hooray! :)
35915    # First separate the path from the arguments. This will split at the first
35916    # space.
35917    complete="$NM"
35918    path="${complete%% *}"
35919    tmp="$complete EOL"
35920    arguments="${tmp#* }"
35921
35922    # Cannot rely on the command "which" here since it doesn't always work.
35923    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35924    if test -z "$is_absolute_path"; then
35925      # Path to executable is not absolute. Find it.
35926      IFS_save="$IFS"
35927      IFS=:
35928      for p in $PATH; do
35929        if test -f "$p/$path" && test -x "$p/$path"; then
35930          new_path="$p/$path"
35931          break
35932        fi
35933      done
35934      IFS="$IFS_save"
35935    else
35936      # This is an absolute path, we can use it without further modifications.
35937      new_path="$path"
35938    fi
35939
35940    if test "x$new_path" = x; then
35941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35942$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35943      has_space=`$ECHO "$complete" | $GREP " "`
35944      if test "x$has_space" != x; then
35945        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35947      fi
35948      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35949    fi
35950  fi
35951
35952  # Now join together the path and the arguments once again
35953  if test "x$arguments" != xEOL; then
35954    new_complete="$new_path ${arguments% *}"
35955  else
35956    new_complete="$new_path"
35957  fi
35958
35959  if test "x$complete" != "x$new_complete"; then
35960    NM="$new_complete"
35961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35962$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35963  fi
35964
35965
35966
35967  # Publish this variable in the help.
35968
35969
35970  if test "x$GNM" = x; then
35971    # The variable is not set by user, try to locate tool using the code snippet
35972    for ac_prog in gnm
35973do
35974  # Extract the first word of "$ac_prog", so it can be a program name with args.
35975set dummy $ac_prog; ac_word=$2
35976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35977$as_echo_n "checking for $ac_word... " >&6; }
35978if ${ac_cv_path_GNM+:} false; then :
35979  $as_echo_n "(cached) " >&6
35980else
35981  case $GNM in
35982  [\\/]* | ?:[\\/]*)
35983  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35984  ;;
35985  *)
35986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35987for as_dir in $PATH
35988do
35989  IFS=$as_save_IFS
35990  test -z "$as_dir" && as_dir=.
35991    for ac_exec_ext in '' $ac_executable_extensions; do
35992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35993    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35995    break 2
35996  fi
35997done
35998  done
35999IFS=$as_save_IFS
36000
36001  ;;
36002esac
36003fi
36004GNM=$ac_cv_path_GNM
36005if test -n "$GNM"; then
36006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36007$as_echo "$GNM" >&6; }
36008else
36009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36010$as_echo "no" >&6; }
36011fi
36012
36013
36014  test -n "$GNM" && break
36015done
36016
36017  else
36018    # The variable is set, but is it from the command line or the environment?
36019
36020    # Try to remove the string !GNM! from our list.
36021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36023      # If it failed, the variable was not from the command line. Ignore it,
36024      # but warn the user (except for BASH, which is always set by the calling BASH).
36025      if test "xGNM" != xBASH; then
36026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36027$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36028      fi
36029      # Try to locate tool using the code snippet
36030      for ac_prog in gnm
36031do
36032  # Extract the first word of "$ac_prog", so it can be a program name with args.
36033set dummy $ac_prog; ac_word=$2
36034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36035$as_echo_n "checking for $ac_word... " >&6; }
36036if ${ac_cv_path_GNM+:} false; then :
36037  $as_echo_n "(cached) " >&6
36038else
36039  case $GNM in
36040  [\\/]* | ?:[\\/]*)
36041  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36042  ;;
36043  *)
36044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36045for as_dir in $PATH
36046do
36047  IFS=$as_save_IFS
36048  test -z "$as_dir" && as_dir=.
36049    for ac_exec_ext in '' $ac_executable_extensions; do
36050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36051    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36053    break 2
36054  fi
36055done
36056  done
36057IFS=$as_save_IFS
36058
36059  ;;
36060esac
36061fi
36062GNM=$ac_cv_path_GNM
36063if test -n "$GNM"; then
36064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36065$as_echo "$GNM" >&6; }
36066else
36067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36068$as_echo "no" >&6; }
36069fi
36070
36071
36072  test -n "$GNM" && break
36073done
36074
36075    else
36076      # If it succeeded, then it was overridden by the user. We will use it
36077      # for the tool.
36078
36079      # First remove it from the list of overridden variables, so we can test
36080      # for unknown variables in the end.
36081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36082
36083      # Check if the provided tool contains a complete path.
36084      tool_specified="$GNM"
36085      tool_basename="${tool_specified##*/}"
36086      if test "x$tool_basename" = "x$tool_specified"; then
36087        # A command without a complete path is provided, search $PATH.
36088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36089$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36090        # Extract the first word of "$tool_basename", so it can be a program name with args.
36091set dummy $tool_basename; ac_word=$2
36092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36093$as_echo_n "checking for $ac_word... " >&6; }
36094if ${ac_cv_path_GNM+:} false; then :
36095  $as_echo_n "(cached) " >&6
36096else
36097  case $GNM in
36098  [\\/]* | ?:[\\/]*)
36099  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36100  ;;
36101  *)
36102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36103for as_dir in $PATH
36104do
36105  IFS=$as_save_IFS
36106  test -z "$as_dir" && as_dir=.
36107    for ac_exec_ext in '' $ac_executable_extensions; do
36108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36109    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36111    break 2
36112  fi
36113done
36114  done
36115IFS=$as_save_IFS
36116
36117  ;;
36118esac
36119fi
36120GNM=$ac_cv_path_GNM
36121if test -n "$GNM"; then
36122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36123$as_echo "$GNM" >&6; }
36124else
36125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36126$as_echo "no" >&6; }
36127fi
36128
36129
36130        if test "x$GNM" = x; then
36131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36132        fi
36133      else
36134        # Otherwise we believe it is a complete path. Use it as it is.
36135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36136$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36138$as_echo_n "checking for GNM... " >&6; }
36139        if test ! -x "$tool_specified"; then
36140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36141$as_echo "not found" >&6; }
36142          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36143        fi
36144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36145$as_echo "$tool_specified" >&6; }
36146      fi
36147    fi
36148  fi
36149
36150
36151
36152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36153
36154  # First separate the path from the arguments. This will split at the first
36155  # space.
36156  complete="$GNM"
36157  path="${complete%% *}"
36158  tmp="$complete EOL"
36159  arguments="${tmp#* }"
36160
36161  # Input might be given as Windows format, start by converting to
36162  # unix format.
36163  new_path=`$CYGPATH -u "$path"`
36164
36165  # Now try to locate executable using which
36166  new_path=`$WHICH "$new_path" 2> /dev/null`
36167  # bat and cmd files are not always considered executable in cygwin causing which
36168  # to not find them
36169  if test "x$new_path" = x \
36170      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36171      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36172    new_path=`$CYGPATH -u "$path"`
36173  fi
36174  if test "x$new_path" = x; then
36175    # Oops. Which didn't find the executable.
36176    # The splitting of arguments from the executable at a space might have been incorrect,
36177    # since paths with space are more likely in Windows. Give it another try with the whole
36178    # argument.
36179    path="$complete"
36180    arguments="EOL"
36181    new_path=`$CYGPATH -u "$path"`
36182    new_path=`$WHICH "$new_path" 2> /dev/null`
36183    # bat and cmd files are not always considered executable in cygwin causing which
36184    # to not find them
36185    if test "x$new_path" = x \
36186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36188      new_path=`$CYGPATH -u "$path"`
36189    fi
36190    if test "x$new_path" = x; then
36191      # It's still not found. Now this is an unrecoverable error.
36192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36193$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36194      has_space=`$ECHO "$complete" | $GREP " "`
36195      if test "x$has_space" != x; then
36196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36198      fi
36199      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36200    fi
36201  fi
36202
36203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36206  # "foo.exe" is OK but "foo" is an error.
36207  #
36208  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36209  # It is also a way to make sure we got the proper file name for the real test later on.
36210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36211  if test "x$test_shortpath" = x; then
36212    # Short path failed, file does not exist as specified.
36213    # Try adding .exe or .cmd
36214    if test -f "${new_path}.exe"; then
36215      input_to_shortpath="${new_path}.exe"
36216    elif test -f "${new_path}.cmd"; then
36217      input_to_shortpath="${new_path}.cmd"
36218    else
36219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36220$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36223      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36224    fi
36225  else
36226    input_to_shortpath="$new_path"
36227  fi
36228
36229  # Call helper function which possibly converts this using DOS-style short mode.
36230  # If so, the updated path is stored in $new_path.
36231  new_path="$input_to_shortpath"
36232
36233  input_path="$input_to_shortpath"
36234  # Check if we need to convert this using DOS-style short mode. If the path
36235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36236  # take no chances and rewrite it.
36237  # Note: m4 eats our [], so we need to use [ and ] instead.
36238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36239  if test "x$has_forbidden_chars" != x; then
36240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36244      # Going to short mode and back again did indeed matter. Since short mode is
36245      # case insensitive, let's make it lowercase to improve readability.
36246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36247      # Now convert it back to Unix-stile (cygpath)
36248      input_path=`$CYGPATH -u "$shortmode_path"`
36249      new_path="$input_path"
36250    fi
36251  fi
36252
36253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36254  if test "x$test_cygdrive_prefix" = x; then
36255    # As a simple fix, exclude /usr/bin since it's not a real path.
36256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36258      # a path prefixed by /cygdrive for fixpath to work.
36259      new_path="$CYGWIN_ROOT_PATH$input_path"
36260    fi
36261  fi
36262
36263  # remove trailing .exe if any
36264  new_path="${new_path/%.exe/}"
36265
36266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36267
36268  # First separate the path from the arguments. This will split at the first
36269  # space.
36270  complete="$GNM"
36271  path="${complete%% *}"
36272  tmp="$complete EOL"
36273  arguments="${tmp#* }"
36274
36275  # Input might be given as Windows format, start by converting to
36276  # unix format.
36277  new_path="$path"
36278
36279  windows_path="$new_path"
36280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36281    unix_path=`$CYGPATH -u "$windows_path"`
36282    new_path="$unix_path"
36283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36285    new_path="$unix_path"
36286  fi
36287
36288
36289  # Now try to locate executable using which
36290  new_path=`$WHICH "$new_path" 2> /dev/null`
36291
36292  if test "x$new_path" = x; then
36293    # Oops. Which didn't find the executable.
36294    # The splitting of arguments from the executable at a space might have been incorrect,
36295    # since paths with space are more likely in Windows. Give it another try with the whole
36296    # argument.
36297    path="$complete"
36298    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
36312    # bat and cmd files are not always considered executable in MSYS causing which
36313    # to not find them
36314    if test "x$new_path" = x \
36315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36317      new_path="$path"
36318
36319  windows_path="$new_path"
36320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36321    unix_path=`$CYGPATH -u "$windows_path"`
36322    new_path="$unix_path"
36323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36325    new_path="$unix_path"
36326  fi
36327
36328    fi
36329
36330    if test "x$new_path" = x; then
36331      # It's still not found. Now this is an unrecoverable error.
36332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36333$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36334      has_space=`$ECHO "$complete" | $GREP " "`
36335      if test "x$has_space" != x; then
36336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36338      fi
36339      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36340    fi
36341  fi
36342
36343  # Now new_path has a complete unix path to the binary
36344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36345    # Keep paths in /bin as-is, but remove trailing .exe if any
36346    new_path="${new_path/%.exe/}"
36347    # Do not save /bin paths to all_fixpath_prefixes!
36348  else
36349    # Not in mixed or Windows style, start by that.
36350    new_path=`cmd //c echo $new_path`
36351
36352  input_path="$new_path"
36353  # Check if we need to convert this using DOS-style short mode. If the path
36354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36355  # take no chances and rewrite it.
36356  # Note: m4 eats our [], so we need to use [ and ] instead.
36357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36358  if test "x$has_forbidden_chars" != x; then
36359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36361  fi
36362
36363    # Output is in $new_path
36364
36365  windows_path="$new_path"
36366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36367    unix_path=`$CYGPATH -u "$windows_path"`
36368    new_path="$unix_path"
36369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36371    new_path="$unix_path"
36372  fi
36373
36374    # remove trailing .exe if any
36375    new_path="${new_path/%.exe/}"
36376
36377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36379  fi
36380
36381  else
36382    # We're on a unix platform. Hooray! :)
36383    # First separate the path from the arguments. This will split at the first
36384    # space.
36385    complete="$GNM"
36386    path="${complete%% *}"
36387    tmp="$complete EOL"
36388    arguments="${tmp#* }"
36389
36390    # Cannot rely on the command "which" here since it doesn't always work.
36391    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36392    if test -z "$is_absolute_path"; then
36393      # Path to executable is not absolute. Find it.
36394      IFS_save="$IFS"
36395      IFS=:
36396      for p in $PATH; do
36397        if test -f "$p/$path" && test -x "$p/$path"; then
36398          new_path="$p/$path"
36399          break
36400        fi
36401      done
36402      IFS="$IFS_save"
36403    else
36404      # This is an absolute path, we can use it without further modifications.
36405      new_path="$path"
36406    fi
36407
36408    if test "x$new_path" = x; then
36409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36410$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36411      has_space=`$ECHO "$complete" | $GREP " "`
36412      if test "x$has_space" != x; then
36413        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36415      fi
36416      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36417    fi
36418  fi
36419
36420  # Now join together the path and the arguments once again
36421  if test "x$arguments" != xEOL; then
36422    new_complete="$new_path ${arguments% *}"
36423  else
36424    new_complete="$new_path"
36425  fi
36426
36427  if test "x$complete" != "x$new_complete"; then
36428    GNM="$new_complete"
36429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36430$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36431  fi
36432
36433
36434
36435
36436  # Publish this variable in the help.
36437
36438
36439  if test "x$MCS" = x; then
36440    # The variable is not set by user, try to locate tool using the code snippet
36441    for ac_prog in mcs
36442do
36443  # Extract the first word of "$ac_prog", so it can be a program name with args.
36444set dummy $ac_prog; ac_word=$2
36445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36446$as_echo_n "checking for $ac_word... " >&6; }
36447if ${ac_cv_path_MCS+:} false; then :
36448  $as_echo_n "(cached) " >&6
36449else
36450  case $MCS in
36451  [\\/]* | ?:[\\/]*)
36452  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36453  ;;
36454  *)
36455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36456for as_dir in $PATH
36457do
36458  IFS=$as_save_IFS
36459  test -z "$as_dir" && as_dir=.
36460    for ac_exec_ext in '' $ac_executable_extensions; do
36461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36462    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36464    break 2
36465  fi
36466done
36467  done
36468IFS=$as_save_IFS
36469
36470  ;;
36471esac
36472fi
36473MCS=$ac_cv_path_MCS
36474if test -n "$MCS"; then
36475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36476$as_echo "$MCS" >&6; }
36477else
36478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36479$as_echo "no" >&6; }
36480fi
36481
36482
36483  test -n "$MCS" && break
36484done
36485
36486  else
36487    # The variable is set, but is it from the command line or the environment?
36488
36489    # Try to remove the string !MCS! from our list.
36490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36492      # If it failed, the variable was not from the command line. Ignore it,
36493      # but warn the user (except for BASH, which is always set by the calling BASH).
36494      if test "xMCS" != xBASH; then
36495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36496$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36497      fi
36498      # Try to locate tool using the code snippet
36499      for ac_prog in mcs
36500do
36501  # Extract the first word of "$ac_prog", so it can be a program name with args.
36502set dummy $ac_prog; ac_word=$2
36503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36504$as_echo_n "checking for $ac_word... " >&6; }
36505if ${ac_cv_path_MCS+:} false; then :
36506  $as_echo_n "(cached) " >&6
36507else
36508  case $MCS in
36509  [\\/]* | ?:[\\/]*)
36510  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36511  ;;
36512  *)
36513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36514for as_dir in $PATH
36515do
36516  IFS=$as_save_IFS
36517  test -z "$as_dir" && as_dir=.
36518    for ac_exec_ext in '' $ac_executable_extensions; do
36519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36520    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36522    break 2
36523  fi
36524done
36525  done
36526IFS=$as_save_IFS
36527
36528  ;;
36529esac
36530fi
36531MCS=$ac_cv_path_MCS
36532if test -n "$MCS"; then
36533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36534$as_echo "$MCS" >&6; }
36535else
36536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36537$as_echo "no" >&6; }
36538fi
36539
36540
36541  test -n "$MCS" && break
36542done
36543
36544    else
36545      # If it succeeded, then it was overridden by the user. We will use it
36546      # for the tool.
36547
36548      # First remove it from the list of overridden variables, so we can test
36549      # for unknown variables in the end.
36550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36551
36552      # Check if the provided tool contains a complete path.
36553      tool_specified="$MCS"
36554      tool_basename="${tool_specified##*/}"
36555      if test "x$tool_basename" = "x$tool_specified"; then
36556        # A command without a complete path is provided, search $PATH.
36557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36558$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36559        # Extract the first word of "$tool_basename", so it can be a program name with args.
36560set dummy $tool_basename; ac_word=$2
36561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36562$as_echo_n "checking for $ac_word... " >&6; }
36563if ${ac_cv_path_MCS+:} false; then :
36564  $as_echo_n "(cached) " >&6
36565else
36566  case $MCS in
36567  [\\/]* | ?:[\\/]*)
36568  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36569  ;;
36570  *)
36571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36572for as_dir in $PATH
36573do
36574  IFS=$as_save_IFS
36575  test -z "$as_dir" && as_dir=.
36576    for ac_exec_ext in '' $ac_executable_extensions; do
36577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36578    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36580    break 2
36581  fi
36582done
36583  done
36584IFS=$as_save_IFS
36585
36586  ;;
36587esac
36588fi
36589MCS=$ac_cv_path_MCS
36590if test -n "$MCS"; then
36591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36592$as_echo "$MCS" >&6; }
36593else
36594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36595$as_echo "no" >&6; }
36596fi
36597
36598
36599        if test "x$MCS" = x; then
36600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36601        fi
36602      else
36603        # Otherwise we believe it is a complete path. Use it as it is.
36604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36605$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36607$as_echo_n "checking for MCS... " >&6; }
36608        if test ! -x "$tool_specified"; then
36609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36610$as_echo "not found" >&6; }
36611          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36612        fi
36613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36614$as_echo "$tool_specified" >&6; }
36615      fi
36616    fi
36617  fi
36618
36619
36620
36621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36622
36623  # First separate the path from the arguments. This will split at the first
36624  # space.
36625  complete="$MCS"
36626  path="${complete%% *}"
36627  tmp="$complete EOL"
36628  arguments="${tmp#* }"
36629
36630  # Input might be given as Windows format, start by converting to
36631  # unix format.
36632  new_path=`$CYGPATH -u "$path"`
36633
36634  # Now try to locate executable using which
36635  new_path=`$WHICH "$new_path" 2> /dev/null`
36636  # bat and cmd files are not always considered executable in cygwin causing which
36637  # to not find them
36638  if test "x$new_path" = x \
36639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36641    new_path=`$CYGPATH -u "$path"`
36642  fi
36643  if test "x$new_path" = x; then
36644    # Oops. Which didn't find the executable.
36645    # The splitting of arguments from the executable at a space might have been incorrect,
36646    # since paths with space are more likely in Windows. Give it another try with the whole
36647    # argument.
36648    path="$complete"
36649    arguments="EOL"
36650    new_path=`$CYGPATH -u "$path"`
36651    new_path=`$WHICH "$new_path" 2> /dev/null`
36652    # bat and cmd files are not always considered executable in cygwin causing which
36653    # to not find them
36654    if test "x$new_path" = x \
36655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36657      new_path=`$CYGPATH -u "$path"`
36658    fi
36659    if test "x$new_path" = x; then
36660      # It's still not found. Now this is an unrecoverable error.
36661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36662$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36663      has_space=`$ECHO "$complete" | $GREP " "`
36664      if test "x$has_space" != x; then
36665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36667      fi
36668      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36669    fi
36670  fi
36671
36672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36675  # "foo.exe" is OK but "foo" is an error.
36676  #
36677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36678  # It is also a way to make sure we got the proper file name for the real test later on.
36679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36680  if test "x$test_shortpath" = x; then
36681    # Short path failed, file does not exist as specified.
36682    # Try adding .exe or .cmd
36683    if test -f "${new_path}.exe"; then
36684      input_to_shortpath="${new_path}.exe"
36685    elif test -f "${new_path}.cmd"; then
36686      input_to_shortpath="${new_path}.cmd"
36687    else
36688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36689$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36692      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36693    fi
36694  else
36695    input_to_shortpath="$new_path"
36696  fi
36697
36698  # Call helper function which possibly converts this using DOS-style short mode.
36699  # If so, the updated path is stored in $new_path.
36700  new_path="$input_to_shortpath"
36701
36702  input_path="$input_to_shortpath"
36703  # Check if we need to convert this using DOS-style short mode. If the path
36704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36705  # take no chances and rewrite it.
36706  # Note: m4 eats our [], so we need to use [ and ] instead.
36707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36708  if test "x$has_forbidden_chars" != x; then
36709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36713      # Going to short mode and back again did indeed matter. Since short mode is
36714      # case insensitive, let's make it lowercase to improve readability.
36715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36716      # Now convert it back to Unix-stile (cygpath)
36717      input_path=`$CYGPATH -u "$shortmode_path"`
36718      new_path="$input_path"
36719    fi
36720  fi
36721
36722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36723  if test "x$test_cygdrive_prefix" = x; then
36724    # As a simple fix, exclude /usr/bin since it's not a real path.
36725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36727      # a path prefixed by /cygdrive for fixpath to work.
36728      new_path="$CYGWIN_ROOT_PATH$input_path"
36729    fi
36730  fi
36731
36732  # remove trailing .exe if any
36733  new_path="${new_path/%.exe/}"
36734
36735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36736
36737  # First separate the path from the arguments. This will split at the first
36738  # space.
36739  complete="$MCS"
36740  path="${complete%% *}"
36741  tmp="$complete EOL"
36742  arguments="${tmp#* }"
36743
36744  # Input might be given as Windows format, start by converting to
36745  # unix format.
36746  new_path="$path"
36747
36748  windows_path="$new_path"
36749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36750    unix_path=`$CYGPATH -u "$windows_path"`
36751    new_path="$unix_path"
36752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36754    new_path="$unix_path"
36755  fi
36756
36757
36758  # Now try to locate executable using which
36759  new_path=`$WHICH "$new_path" 2> /dev/null`
36760
36761  if test "x$new_path" = x; then
36762    # Oops. Which didn't find the executable.
36763    # The splitting of arguments from the executable at a space might have been incorrect,
36764    # since paths with space are more likely in Windows. Give it another try with the whole
36765    # argument.
36766    path="$complete"
36767    arguments="EOL"
36768    new_path="$path"
36769
36770  windows_path="$new_path"
36771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36772    unix_path=`$CYGPATH -u "$windows_path"`
36773    new_path="$unix_path"
36774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36776    new_path="$unix_path"
36777  fi
36778
36779
36780    new_path=`$WHICH "$new_path" 2> /dev/null`
36781    # bat and cmd files are not always considered executable in MSYS causing which
36782    # to not find them
36783    if test "x$new_path" = x \
36784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36786      new_path="$path"
36787
36788  windows_path="$new_path"
36789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36790    unix_path=`$CYGPATH -u "$windows_path"`
36791    new_path="$unix_path"
36792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36794    new_path="$unix_path"
36795  fi
36796
36797    fi
36798
36799    if test "x$new_path" = x; then
36800      # It's still not found. Now this is an unrecoverable error.
36801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36802$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36803      has_space=`$ECHO "$complete" | $GREP " "`
36804      if test "x$has_space" != x; then
36805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36807      fi
36808      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36809    fi
36810  fi
36811
36812  # Now new_path has a complete unix path to the binary
36813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36814    # Keep paths in /bin as-is, but remove trailing .exe if any
36815    new_path="${new_path/%.exe/}"
36816    # Do not save /bin paths to all_fixpath_prefixes!
36817  else
36818    # Not in mixed or Windows style, start by that.
36819    new_path=`cmd //c echo $new_path`
36820
36821  input_path="$new_path"
36822  # Check if we need to convert this using DOS-style short mode. If the path
36823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36824  # take no chances and rewrite it.
36825  # Note: m4 eats our [], so we need to use [ and ] instead.
36826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36827  if test "x$has_forbidden_chars" != x; then
36828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36830  fi
36831
36832    # Output is in $new_path
36833
36834  windows_path="$new_path"
36835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36836    unix_path=`$CYGPATH -u "$windows_path"`
36837    new_path="$unix_path"
36838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36840    new_path="$unix_path"
36841  fi
36842
36843    # remove trailing .exe if any
36844    new_path="${new_path/%.exe/}"
36845
36846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36848  fi
36849
36850  else
36851    # We're on a unix platform. Hooray! :)
36852    # First separate the path from the arguments. This will split at the first
36853    # space.
36854    complete="$MCS"
36855    path="${complete%% *}"
36856    tmp="$complete EOL"
36857    arguments="${tmp#* }"
36858
36859    # Cannot rely on the command "which" here since it doesn't always work.
36860    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36861    if test -z "$is_absolute_path"; then
36862      # Path to executable is not absolute. Find it.
36863      IFS_save="$IFS"
36864      IFS=:
36865      for p in $PATH; do
36866        if test -f "$p/$path" && test -x "$p/$path"; then
36867          new_path="$p/$path"
36868          break
36869        fi
36870      done
36871      IFS="$IFS_save"
36872    else
36873      # This is an absolute path, we can use it without further modifications.
36874      new_path="$path"
36875    fi
36876
36877    if test "x$new_path" = x; then
36878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36879$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36880      has_space=`$ECHO "$complete" | $GREP " "`
36881      if test "x$has_space" != x; then
36882        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36884      fi
36885      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36886    fi
36887  fi
36888
36889  # Now join together the path and the arguments once again
36890  if test "x$arguments" != xEOL; then
36891    new_complete="$new_path ${arguments% *}"
36892  else
36893    new_complete="$new_path"
36894  fi
36895
36896  if test "x$complete" != "x$new_complete"; then
36897    MCS="$new_complete"
36898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36899$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36900  fi
36901
36902  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36903    # FIXME: we should unify this with the solaris case above.
36904
36905
36906  # Publish this variable in the help.
36907
36908
36909  if test "x$STRIP" = x; then
36910    # The variable is not set by user, try to locate tool using the code snippet
36911    if test -n "$ac_tool_prefix"; then
36912  for ac_prog in strip
36913  do
36914    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36915set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36917$as_echo_n "checking for $ac_word... " >&6; }
36918if ${ac_cv_prog_STRIP+:} false; then :
36919  $as_echo_n "(cached) " >&6
36920else
36921  if test -n "$STRIP"; then
36922  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36923else
36924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36925for as_dir in $PATH
36926do
36927  IFS=$as_save_IFS
36928  test -z "$as_dir" && as_dir=.
36929    for ac_exec_ext in '' $ac_executable_extensions; do
36930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36931    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36933    break 2
36934  fi
36935done
36936  done
36937IFS=$as_save_IFS
36938
36939fi
36940fi
36941STRIP=$ac_cv_prog_STRIP
36942if test -n "$STRIP"; then
36943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36944$as_echo "$STRIP" >&6; }
36945else
36946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36947$as_echo "no" >&6; }
36948fi
36949
36950
36951    test -n "$STRIP" && break
36952  done
36953fi
36954if test -z "$STRIP"; then
36955  ac_ct_STRIP=$STRIP
36956  for ac_prog in strip
36957do
36958  # Extract the first word of "$ac_prog", so it can be a program name with args.
36959set dummy $ac_prog; ac_word=$2
36960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36961$as_echo_n "checking for $ac_word... " >&6; }
36962if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36963  $as_echo_n "(cached) " >&6
36964else
36965  if test -n "$ac_ct_STRIP"; then
36966  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36967else
36968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36969for as_dir in $PATH
36970do
36971  IFS=$as_save_IFS
36972  test -z "$as_dir" && as_dir=.
36973    for ac_exec_ext in '' $ac_executable_extensions; do
36974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36975    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36977    break 2
36978  fi
36979done
36980  done
36981IFS=$as_save_IFS
36982
36983fi
36984fi
36985ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36986if test -n "$ac_ct_STRIP"; then
36987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36988$as_echo "$ac_ct_STRIP" >&6; }
36989else
36990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36991$as_echo "no" >&6; }
36992fi
36993
36994
36995  test -n "$ac_ct_STRIP" && break
36996done
36997
36998  if test "x$ac_ct_STRIP" = x; then
36999    STRIP=""
37000  else
37001    case $cross_compiling:$ac_tool_warned in
37002yes:)
37003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37005ac_tool_warned=yes ;;
37006esac
37007    STRIP=$ac_ct_STRIP
37008  fi
37009fi
37010
37011  else
37012    # The variable is set, but is it from the command line or the environment?
37013
37014    # Try to remove the string !STRIP! from our list.
37015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37017      # If it failed, the variable was not from the command line. Ignore it,
37018      # but warn the user (except for BASH, which is always set by the calling BASH).
37019      if test "xSTRIP" != xBASH; then
37020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37021$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37022      fi
37023      # Try to locate tool using the code snippet
37024      if test -n "$ac_tool_prefix"; then
37025  for ac_prog in strip
37026  do
37027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37030$as_echo_n "checking for $ac_word... " >&6; }
37031if ${ac_cv_prog_STRIP+:} false; then :
37032  $as_echo_n "(cached) " >&6
37033else
37034  if test -n "$STRIP"; then
37035  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37036else
37037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37038for as_dir in $PATH
37039do
37040  IFS=$as_save_IFS
37041  test -z "$as_dir" && as_dir=.
37042    for ac_exec_ext in '' $ac_executable_extensions; do
37043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37044    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37046    break 2
37047  fi
37048done
37049  done
37050IFS=$as_save_IFS
37051
37052fi
37053fi
37054STRIP=$ac_cv_prog_STRIP
37055if test -n "$STRIP"; then
37056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37057$as_echo "$STRIP" >&6; }
37058else
37059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37060$as_echo "no" >&6; }
37061fi
37062
37063
37064    test -n "$STRIP" && break
37065  done
37066fi
37067if test -z "$STRIP"; then
37068  ac_ct_STRIP=$STRIP
37069  for ac_prog in strip
37070do
37071  # Extract the first word of "$ac_prog", so it can be a program name with args.
37072set dummy $ac_prog; ac_word=$2
37073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37074$as_echo_n "checking for $ac_word... " >&6; }
37075if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37076  $as_echo_n "(cached) " >&6
37077else
37078  if test -n "$ac_ct_STRIP"; then
37079  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37080else
37081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37082for as_dir in $PATH
37083do
37084  IFS=$as_save_IFS
37085  test -z "$as_dir" && as_dir=.
37086    for ac_exec_ext in '' $ac_executable_extensions; do
37087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37088    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37090    break 2
37091  fi
37092done
37093  done
37094IFS=$as_save_IFS
37095
37096fi
37097fi
37098ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37099if test -n "$ac_ct_STRIP"; then
37100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37101$as_echo "$ac_ct_STRIP" >&6; }
37102else
37103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37104$as_echo "no" >&6; }
37105fi
37106
37107
37108  test -n "$ac_ct_STRIP" && break
37109done
37110
37111  if test "x$ac_ct_STRIP" = x; then
37112    STRIP=""
37113  else
37114    case $cross_compiling:$ac_tool_warned in
37115yes:)
37116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37118ac_tool_warned=yes ;;
37119esac
37120    STRIP=$ac_ct_STRIP
37121  fi
37122fi
37123
37124    else
37125      # If it succeeded, then it was overridden by the user. We will use it
37126      # for the tool.
37127
37128      # First remove it from the list of overridden variables, so we can test
37129      # for unknown variables in the end.
37130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37131
37132      # Check if the provided tool contains a complete path.
37133      tool_specified="$STRIP"
37134      tool_basename="${tool_specified##*/}"
37135      if test "x$tool_basename" = "x$tool_specified"; then
37136        # A command without a complete path is provided, search $PATH.
37137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37138$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37139        # Extract the first word of "$tool_basename", so it can be a program name with args.
37140set dummy $tool_basename; ac_word=$2
37141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37142$as_echo_n "checking for $ac_word... " >&6; }
37143if ${ac_cv_path_STRIP+:} false; then :
37144  $as_echo_n "(cached) " >&6
37145else
37146  case $STRIP in
37147  [\\/]* | ?:[\\/]*)
37148  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37149  ;;
37150  *)
37151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37152for as_dir in $PATH
37153do
37154  IFS=$as_save_IFS
37155  test -z "$as_dir" && as_dir=.
37156    for ac_exec_ext in '' $ac_executable_extensions; do
37157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37158    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37160    break 2
37161  fi
37162done
37163  done
37164IFS=$as_save_IFS
37165
37166  ;;
37167esac
37168fi
37169STRIP=$ac_cv_path_STRIP
37170if test -n "$STRIP"; then
37171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37172$as_echo "$STRIP" >&6; }
37173else
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37175$as_echo "no" >&6; }
37176fi
37177
37178
37179        if test "x$STRIP" = x; then
37180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37181        fi
37182      else
37183        # Otherwise we believe it is a complete path. Use it as it is.
37184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37185$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37187$as_echo_n "checking for STRIP... " >&6; }
37188        if test ! -x "$tool_specified"; then
37189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37190$as_echo "not found" >&6; }
37191          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37192        fi
37193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37194$as_echo "$tool_specified" >&6; }
37195      fi
37196    fi
37197  fi
37198
37199
37200
37201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37202
37203  # First separate the path from the arguments. This will split at the first
37204  # space.
37205  complete="$STRIP"
37206  path="${complete%% *}"
37207  tmp="$complete EOL"
37208  arguments="${tmp#* }"
37209
37210  # Input might be given as Windows format, start by converting to
37211  # unix format.
37212  new_path=`$CYGPATH -u "$path"`
37213
37214  # Now try to locate executable using which
37215  new_path=`$WHICH "$new_path" 2> /dev/null`
37216  # bat and cmd files are not always considered executable in cygwin causing which
37217  # to not find them
37218  if test "x$new_path" = x \
37219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37221    new_path=`$CYGPATH -u "$path"`
37222  fi
37223  if test "x$new_path" = x; then
37224    # Oops. Which didn't find the executable.
37225    # The splitting of arguments from the executable at a space might have been incorrect,
37226    # since paths with space are more likely in Windows. Give it another try with the whole
37227    # argument.
37228    path="$complete"
37229    arguments="EOL"
37230    new_path=`$CYGPATH -u "$path"`
37231    new_path=`$WHICH "$new_path" 2> /dev/null`
37232    # bat and cmd files are not always considered executable in cygwin causing which
37233    # to not find them
37234    if test "x$new_path" = x \
37235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37237      new_path=`$CYGPATH -u "$path"`
37238    fi
37239    if test "x$new_path" = x; then
37240      # It's still not found. Now this is an unrecoverable error.
37241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37242$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37243      has_space=`$ECHO "$complete" | $GREP " "`
37244      if test "x$has_space" != x; then
37245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37247      fi
37248      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37249    fi
37250  fi
37251
37252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37255  # "foo.exe" is OK but "foo" is an error.
37256  #
37257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37258  # It is also a way to make sure we got the proper file name for the real test later on.
37259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37260  if test "x$test_shortpath" = x; then
37261    # Short path failed, file does not exist as specified.
37262    # Try adding .exe or .cmd
37263    if test -f "${new_path}.exe"; then
37264      input_to_shortpath="${new_path}.exe"
37265    elif test -f "${new_path}.cmd"; then
37266      input_to_shortpath="${new_path}.cmd"
37267    else
37268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37269$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37272      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37273    fi
37274  else
37275    input_to_shortpath="$new_path"
37276  fi
37277
37278  # Call helper function which possibly converts this using DOS-style short mode.
37279  # If so, the updated path is stored in $new_path.
37280  new_path="$input_to_shortpath"
37281
37282  input_path="$input_to_shortpath"
37283  # Check if we need to convert this using DOS-style short mode. If the path
37284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37285  # take no chances and rewrite it.
37286  # Note: m4 eats our [], so we need to use [ and ] instead.
37287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37288  if test "x$has_forbidden_chars" != x; then
37289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37293      # Going to short mode and back again did indeed matter. Since short mode is
37294      # case insensitive, let's make it lowercase to improve readability.
37295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37296      # Now convert it back to Unix-stile (cygpath)
37297      input_path=`$CYGPATH -u "$shortmode_path"`
37298      new_path="$input_path"
37299    fi
37300  fi
37301
37302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37303  if test "x$test_cygdrive_prefix" = x; then
37304    # As a simple fix, exclude /usr/bin since it's not a real path.
37305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37307      # a path prefixed by /cygdrive for fixpath to work.
37308      new_path="$CYGWIN_ROOT_PATH$input_path"
37309    fi
37310  fi
37311
37312  # remove trailing .exe if any
37313  new_path="${new_path/%.exe/}"
37314
37315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37316
37317  # First separate the path from the arguments. This will split at the first
37318  # space.
37319  complete="$STRIP"
37320  path="${complete%% *}"
37321  tmp="$complete EOL"
37322  arguments="${tmp#* }"
37323
37324  # Input might be given as Windows format, start by converting to
37325  # unix format.
37326  new_path="$path"
37327
37328  windows_path="$new_path"
37329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37330    unix_path=`$CYGPATH -u "$windows_path"`
37331    new_path="$unix_path"
37332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37334    new_path="$unix_path"
37335  fi
37336
37337
37338  # Now try to locate executable using which
37339  new_path=`$WHICH "$new_path" 2> /dev/null`
37340
37341  if test "x$new_path" = x; then
37342    # Oops. Which didn't find the executable.
37343    # The splitting of arguments from the executable at a space might have been incorrect,
37344    # since paths with space are more likely in Windows. Give it another try with the whole
37345    # argument.
37346    path="$complete"
37347    arguments="EOL"
37348    new_path="$path"
37349
37350  windows_path="$new_path"
37351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37352    unix_path=`$CYGPATH -u "$windows_path"`
37353    new_path="$unix_path"
37354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37356    new_path="$unix_path"
37357  fi
37358
37359
37360    new_path=`$WHICH "$new_path" 2> /dev/null`
37361    # bat and cmd files are not always considered executable in MSYS causing which
37362    # to not find them
37363    if test "x$new_path" = x \
37364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37366      new_path="$path"
37367
37368  windows_path="$new_path"
37369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37370    unix_path=`$CYGPATH -u "$windows_path"`
37371    new_path="$unix_path"
37372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37374    new_path="$unix_path"
37375  fi
37376
37377    fi
37378
37379    if test "x$new_path" = x; then
37380      # It's still not found. Now this is an unrecoverable error.
37381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37382$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37383      has_space=`$ECHO "$complete" | $GREP " "`
37384      if test "x$has_space" != x; then
37385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37387      fi
37388      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37389    fi
37390  fi
37391
37392  # Now new_path has a complete unix path to the binary
37393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37394    # Keep paths in /bin as-is, but remove trailing .exe if any
37395    new_path="${new_path/%.exe/}"
37396    # Do not save /bin paths to all_fixpath_prefixes!
37397  else
37398    # Not in mixed or Windows style, start by that.
37399    new_path=`cmd //c echo $new_path`
37400
37401  input_path="$new_path"
37402  # Check if we need to convert this using DOS-style short mode. If the path
37403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37404  # take no chances and rewrite it.
37405  # Note: m4 eats our [], so we need to use [ and ] instead.
37406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37407  if test "x$has_forbidden_chars" != x; then
37408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37410  fi
37411
37412    # Output is in $new_path
37413
37414  windows_path="$new_path"
37415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37416    unix_path=`$CYGPATH -u "$windows_path"`
37417    new_path="$unix_path"
37418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37420    new_path="$unix_path"
37421  fi
37422
37423    # remove trailing .exe if any
37424    new_path="${new_path/%.exe/}"
37425
37426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37428  fi
37429
37430  else
37431    # We're on a unix platform. Hooray! :)
37432    # First separate the path from the arguments. This will split at the first
37433    # space.
37434    complete="$STRIP"
37435    path="${complete%% *}"
37436    tmp="$complete EOL"
37437    arguments="${tmp#* }"
37438
37439    # Cannot rely on the command "which" here since it doesn't always work.
37440    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37441    if test -z "$is_absolute_path"; then
37442      # Path to executable is not absolute. Find it.
37443      IFS_save="$IFS"
37444      IFS=:
37445      for p in $PATH; do
37446        if test -f "$p/$path" && test -x "$p/$path"; then
37447          new_path="$p/$path"
37448          break
37449        fi
37450      done
37451      IFS="$IFS_save"
37452    else
37453      # This is an absolute path, we can use it without further modifications.
37454      new_path="$path"
37455    fi
37456
37457    if test "x$new_path" = x; then
37458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37459$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37460      has_space=`$ECHO "$complete" | $GREP " "`
37461      if test "x$has_space" != x; then
37462        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37464      fi
37465      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37466    fi
37467  fi
37468
37469  # Now join together the path and the arguments once again
37470  if test "x$arguments" != xEOL; then
37471    new_complete="$new_path ${arguments% *}"
37472  else
37473    new_complete="$new_path"
37474  fi
37475
37476  if test "x$complete" != "x$new_complete"; then
37477    STRIP="$new_complete"
37478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37479$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37480  fi
37481
37482
37483
37484  # Publish this variable in the help.
37485
37486
37487  if test "x$NM" = x; then
37488    # The variable is not set by user, try to locate tool using the code snippet
37489    if test -n "$ac_tool_prefix"; then
37490  for ac_prog in nm
37491  do
37492    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37493set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37495$as_echo_n "checking for $ac_word... " >&6; }
37496if ${ac_cv_prog_NM+:} false; then :
37497  $as_echo_n "(cached) " >&6
37498else
37499  if test -n "$NM"; then
37500  ac_cv_prog_NM="$NM" # Let the user override the test.
37501else
37502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37503for as_dir in $PATH
37504do
37505  IFS=$as_save_IFS
37506  test -z "$as_dir" && as_dir=.
37507    for ac_exec_ext in '' $ac_executable_extensions; do
37508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37509    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37511    break 2
37512  fi
37513done
37514  done
37515IFS=$as_save_IFS
37516
37517fi
37518fi
37519NM=$ac_cv_prog_NM
37520if test -n "$NM"; then
37521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37522$as_echo "$NM" >&6; }
37523else
37524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37525$as_echo "no" >&6; }
37526fi
37527
37528
37529    test -n "$NM" && break
37530  done
37531fi
37532if test -z "$NM"; then
37533  ac_ct_NM=$NM
37534  for ac_prog in nm
37535do
37536  # Extract the first word of "$ac_prog", so it can be a program name with args.
37537set dummy $ac_prog; ac_word=$2
37538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37539$as_echo_n "checking for $ac_word... " >&6; }
37540if ${ac_cv_prog_ac_ct_NM+:} false; then :
37541  $as_echo_n "(cached) " >&6
37542else
37543  if test -n "$ac_ct_NM"; then
37544  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37545else
37546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37547for as_dir in $PATH
37548do
37549  IFS=$as_save_IFS
37550  test -z "$as_dir" && as_dir=.
37551    for ac_exec_ext in '' $ac_executable_extensions; do
37552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37553    ac_cv_prog_ac_ct_NM="$ac_prog"
37554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37555    break 2
37556  fi
37557done
37558  done
37559IFS=$as_save_IFS
37560
37561fi
37562fi
37563ac_ct_NM=$ac_cv_prog_ac_ct_NM
37564if test -n "$ac_ct_NM"; then
37565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37566$as_echo "$ac_ct_NM" >&6; }
37567else
37568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37569$as_echo "no" >&6; }
37570fi
37571
37572
37573  test -n "$ac_ct_NM" && break
37574done
37575
37576  if test "x$ac_ct_NM" = x; then
37577    NM=""
37578  else
37579    case $cross_compiling:$ac_tool_warned in
37580yes:)
37581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37583ac_tool_warned=yes ;;
37584esac
37585    NM=$ac_ct_NM
37586  fi
37587fi
37588
37589  else
37590    # The variable is set, but is it from the command line or the environment?
37591
37592    # Try to remove the string !NM! from our list.
37593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37595      # If it failed, the variable was not from the command line. Ignore it,
37596      # but warn the user (except for BASH, which is always set by the calling BASH).
37597      if test "xNM" != xBASH; then
37598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37599$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37600      fi
37601      # Try to locate tool using the code snippet
37602      if test -n "$ac_tool_prefix"; then
37603  for ac_prog in nm
37604  do
37605    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37606set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37608$as_echo_n "checking for $ac_word... " >&6; }
37609if ${ac_cv_prog_NM+:} false; then :
37610  $as_echo_n "(cached) " >&6
37611else
37612  if test -n "$NM"; then
37613  ac_cv_prog_NM="$NM" # Let the user override the test.
37614else
37615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37616for as_dir in $PATH
37617do
37618  IFS=$as_save_IFS
37619  test -z "$as_dir" && as_dir=.
37620    for ac_exec_ext in '' $ac_executable_extensions; do
37621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37622    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37624    break 2
37625  fi
37626done
37627  done
37628IFS=$as_save_IFS
37629
37630fi
37631fi
37632NM=$ac_cv_prog_NM
37633if test -n "$NM"; then
37634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37635$as_echo "$NM" >&6; }
37636else
37637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37638$as_echo "no" >&6; }
37639fi
37640
37641
37642    test -n "$NM" && break
37643  done
37644fi
37645if test -z "$NM"; then
37646  ac_ct_NM=$NM
37647  for ac_prog in nm
37648do
37649  # Extract the first word of "$ac_prog", so it can be a program name with args.
37650set dummy $ac_prog; ac_word=$2
37651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37652$as_echo_n "checking for $ac_word... " >&6; }
37653if ${ac_cv_prog_ac_ct_NM+:} false; then :
37654  $as_echo_n "(cached) " >&6
37655else
37656  if test -n "$ac_ct_NM"; then
37657  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37658else
37659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37660for as_dir in $PATH
37661do
37662  IFS=$as_save_IFS
37663  test -z "$as_dir" && as_dir=.
37664    for ac_exec_ext in '' $ac_executable_extensions; do
37665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37666    ac_cv_prog_ac_ct_NM="$ac_prog"
37667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37668    break 2
37669  fi
37670done
37671  done
37672IFS=$as_save_IFS
37673
37674fi
37675fi
37676ac_ct_NM=$ac_cv_prog_ac_ct_NM
37677if test -n "$ac_ct_NM"; then
37678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37679$as_echo "$ac_ct_NM" >&6; }
37680else
37681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37682$as_echo "no" >&6; }
37683fi
37684
37685
37686  test -n "$ac_ct_NM" && break
37687done
37688
37689  if test "x$ac_ct_NM" = x; then
37690    NM=""
37691  else
37692    case $cross_compiling:$ac_tool_warned in
37693yes:)
37694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37696ac_tool_warned=yes ;;
37697esac
37698    NM=$ac_ct_NM
37699  fi
37700fi
37701
37702    else
37703      # If it succeeded, then it was overridden by the user. We will use it
37704      # for the tool.
37705
37706      # First remove it from the list of overridden variables, so we can test
37707      # for unknown variables in the end.
37708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37709
37710      # Check if the provided tool contains a complete path.
37711      tool_specified="$NM"
37712      tool_basename="${tool_specified##*/}"
37713      if test "x$tool_basename" = "x$tool_specified"; then
37714        # A command without a complete path is provided, search $PATH.
37715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37716$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37717        # Extract the first word of "$tool_basename", so it can be a program name with args.
37718set dummy $tool_basename; ac_word=$2
37719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37720$as_echo_n "checking for $ac_word... " >&6; }
37721if ${ac_cv_path_NM+:} false; then :
37722  $as_echo_n "(cached) " >&6
37723else
37724  case $NM in
37725  [\\/]* | ?:[\\/]*)
37726  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37727  ;;
37728  *)
37729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37730for as_dir in $PATH
37731do
37732  IFS=$as_save_IFS
37733  test -z "$as_dir" && as_dir=.
37734    for ac_exec_ext in '' $ac_executable_extensions; do
37735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37736    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37738    break 2
37739  fi
37740done
37741  done
37742IFS=$as_save_IFS
37743
37744  ;;
37745esac
37746fi
37747NM=$ac_cv_path_NM
37748if test -n "$NM"; then
37749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37750$as_echo "$NM" >&6; }
37751else
37752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37753$as_echo "no" >&6; }
37754fi
37755
37756
37757        if test "x$NM" = x; then
37758          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37759        fi
37760      else
37761        # Otherwise we believe it is a complete path. Use it as it is.
37762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37763$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37765$as_echo_n "checking for NM... " >&6; }
37766        if test ! -x "$tool_specified"; then
37767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37768$as_echo "not found" >&6; }
37769          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37770        fi
37771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37772$as_echo "$tool_specified" >&6; }
37773      fi
37774    fi
37775  fi
37776
37777
37778
37779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37780
37781  # First separate the path from the arguments. This will split at the first
37782  # space.
37783  complete="$NM"
37784  path="${complete%% *}"
37785  tmp="$complete EOL"
37786  arguments="${tmp#* }"
37787
37788  # Input might be given as Windows format, start by converting to
37789  # unix format.
37790  new_path=`$CYGPATH -u "$path"`
37791
37792  # Now try to locate executable using which
37793  new_path=`$WHICH "$new_path" 2> /dev/null`
37794  # bat and cmd files are not always considered executable in cygwin causing which
37795  # to not find them
37796  if test "x$new_path" = x \
37797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37799    new_path=`$CYGPATH -u "$path"`
37800  fi
37801  if test "x$new_path" = x; then
37802    # Oops. Which didn't find the executable.
37803    # The splitting of arguments from the executable at a space might have been incorrect,
37804    # since paths with space are more likely in Windows. Give it another try with the whole
37805    # argument.
37806    path="$complete"
37807    arguments="EOL"
37808    new_path=`$CYGPATH -u "$path"`
37809    new_path=`$WHICH "$new_path" 2> /dev/null`
37810    # bat and cmd files are not always considered executable in cygwin causing which
37811    # to not find them
37812    if test "x$new_path" = x \
37813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37815      new_path=`$CYGPATH -u "$path"`
37816    fi
37817    if test "x$new_path" = x; then
37818      # It's still not found. Now this is an unrecoverable error.
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37820$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37821      has_space=`$ECHO "$complete" | $GREP " "`
37822      if test "x$has_space" != x; then
37823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37825      fi
37826      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37827    fi
37828  fi
37829
37830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37833  # "foo.exe" is OK but "foo" is an error.
37834  #
37835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37836  # It is also a way to make sure we got the proper file name for the real test later on.
37837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37838  if test "x$test_shortpath" = x; then
37839    # Short path failed, file does not exist as specified.
37840    # Try adding .exe or .cmd
37841    if test -f "${new_path}.exe"; then
37842      input_to_shortpath="${new_path}.exe"
37843    elif test -f "${new_path}.cmd"; then
37844      input_to_shortpath="${new_path}.cmd"
37845    else
37846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37847$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37850      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37851    fi
37852  else
37853    input_to_shortpath="$new_path"
37854  fi
37855
37856  # Call helper function which possibly converts this using DOS-style short mode.
37857  # If so, the updated path is stored in $new_path.
37858  new_path="$input_to_shortpath"
37859
37860  input_path="$input_to_shortpath"
37861  # Check if we need to convert this using DOS-style short mode. If the path
37862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37863  # take no chances and rewrite it.
37864  # Note: m4 eats our [], so we need to use [ and ] instead.
37865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37866  if test "x$has_forbidden_chars" != x; then
37867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37871      # Going to short mode and back again did indeed matter. Since short mode is
37872      # case insensitive, let's make it lowercase to improve readability.
37873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37874      # Now convert it back to Unix-stile (cygpath)
37875      input_path=`$CYGPATH -u "$shortmode_path"`
37876      new_path="$input_path"
37877    fi
37878  fi
37879
37880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37881  if test "x$test_cygdrive_prefix" = x; then
37882    # As a simple fix, exclude /usr/bin since it's not a real path.
37883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37885      # a path prefixed by /cygdrive for fixpath to work.
37886      new_path="$CYGWIN_ROOT_PATH$input_path"
37887    fi
37888  fi
37889
37890  # remove trailing .exe if any
37891  new_path="${new_path/%.exe/}"
37892
37893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37894
37895  # First separate the path from the arguments. This will split at the first
37896  # space.
37897  complete="$NM"
37898  path="${complete%% *}"
37899  tmp="$complete EOL"
37900  arguments="${tmp#* }"
37901
37902  # Input might be given as Windows format, start by converting to
37903  # unix format.
37904  new_path="$path"
37905
37906  windows_path="$new_path"
37907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37908    unix_path=`$CYGPATH -u "$windows_path"`
37909    new_path="$unix_path"
37910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37912    new_path="$unix_path"
37913  fi
37914
37915
37916  # Now try to locate executable using which
37917  new_path=`$WHICH "$new_path" 2> /dev/null`
37918
37919  if test "x$new_path" = x; then
37920    # Oops. Which didn't find the executable.
37921    # The splitting of arguments from the executable at a space might have been incorrect,
37922    # since paths with space are more likely in Windows. Give it another try with the whole
37923    # argument.
37924    path="$complete"
37925    arguments="EOL"
37926    new_path="$path"
37927
37928  windows_path="$new_path"
37929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37930    unix_path=`$CYGPATH -u "$windows_path"`
37931    new_path="$unix_path"
37932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37934    new_path="$unix_path"
37935  fi
37936
37937
37938    new_path=`$WHICH "$new_path" 2> /dev/null`
37939    # bat and cmd files are not always considered executable in MSYS causing which
37940    # to not find them
37941    if test "x$new_path" = x \
37942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37944      new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955    fi
37956
37957    if test "x$new_path" = x; then
37958      # It's still not found. Now this is an unrecoverable error.
37959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37960$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37961      has_space=`$ECHO "$complete" | $GREP " "`
37962      if test "x$has_space" != x; then
37963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37965      fi
37966      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37967    fi
37968  fi
37969
37970  # Now new_path has a complete unix path to the binary
37971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37972    # Keep paths in /bin as-is, but remove trailing .exe if any
37973    new_path="${new_path/%.exe/}"
37974    # Do not save /bin paths to all_fixpath_prefixes!
37975  else
37976    # Not in mixed or Windows style, start by that.
37977    new_path=`cmd //c echo $new_path`
37978
37979  input_path="$new_path"
37980  # Check if we need to convert this using DOS-style short mode. If the path
37981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37982  # take no chances and rewrite it.
37983  # Note: m4 eats our [], so we need to use [ and ] instead.
37984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37985  if test "x$has_forbidden_chars" != x; then
37986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37988  fi
37989
37990    # Output is in $new_path
37991
37992  windows_path="$new_path"
37993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37994    unix_path=`$CYGPATH -u "$windows_path"`
37995    new_path="$unix_path"
37996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37998    new_path="$unix_path"
37999  fi
38000
38001    # remove trailing .exe if any
38002    new_path="${new_path/%.exe/}"
38003
38004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38006  fi
38007
38008  else
38009    # We're on a unix platform. Hooray! :)
38010    # First separate the path from the arguments. This will split at the first
38011    # space.
38012    complete="$NM"
38013    path="${complete%% *}"
38014    tmp="$complete EOL"
38015    arguments="${tmp#* }"
38016
38017    # Cannot rely on the command "which" here since it doesn't always work.
38018    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38019    if test -z "$is_absolute_path"; then
38020      # Path to executable is not absolute. Find it.
38021      IFS_save="$IFS"
38022      IFS=:
38023      for p in $PATH; do
38024        if test -f "$p/$path" && test -x "$p/$path"; then
38025          new_path="$p/$path"
38026          break
38027        fi
38028      done
38029      IFS="$IFS_save"
38030    else
38031      # This is an absolute path, we can use it without further modifications.
38032      new_path="$path"
38033    fi
38034
38035    if test "x$new_path" = x; then
38036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38037$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38038      has_space=`$ECHO "$complete" | $GREP " "`
38039      if test "x$has_space" != x; then
38040        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38042      fi
38043      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38044    fi
38045  fi
38046
38047  # Now join together the path and the arguments once again
38048  if test "x$arguments" != xEOL; then
38049    new_complete="$new_path ${arguments% *}"
38050  else
38051    new_complete="$new_path"
38052  fi
38053
38054  if test "x$complete" != "x$new_complete"; then
38055    NM="$new_complete"
38056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38057$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38058  fi
38059
38060    GNM="$NM"
38061
38062  fi
38063
38064  # objcopy is used for moving debug symbols to separate files when
38065  # full debug symbols are enabled.
38066  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38067
38068
38069  # Publish this variable in the help.
38070
38071
38072  if test "x$OBJCOPY" = x; then
38073    # The variable is not set by user, try to locate tool using the code snippet
38074    if test -n "$ac_tool_prefix"; then
38075  for ac_prog in gobjcopy objcopy
38076  do
38077    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38080$as_echo_n "checking for $ac_word... " >&6; }
38081if ${ac_cv_prog_OBJCOPY+:} false; then :
38082  $as_echo_n "(cached) " >&6
38083else
38084  if test -n "$OBJCOPY"; then
38085  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38086else
38087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38088for as_dir in $PATH
38089do
38090  IFS=$as_save_IFS
38091  test -z "$as_dir" && as_dir=.
38092    for ac_exec_ext in '' $ac_executable_extensions; do
38093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38094    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38096    break 2
38097  fi
38098done
38099  done
38100IFS=$as_save_IFS
38101
38102fi
38103fi
38104OBJCOPY=$ac_cv_prog_OBJCOPY
38105if test -n "$OBJCOPY"; then
38106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38107$as_echo "$OBJCOPY" >&6; }
38108else
38109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38110$as_echo "no" >&6; }
38111fi
38112
38113
38114    test -n "$OBJCOPY" && break
38115  done
38116fi
38117if test -z "$OBJCOPY"; then
38118  ac_ct_OBJCOPY=$OBJCOPY
38119  for ac_prog in gobjcopy objcopy
38120do
38121  # Extract the first word of "$ac_prog", so it can be a program name with args.
38122set dummy $ac_prog; ac_word=$2
38123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38124$as_echo_n "checking for $ac_word... " >&6; }
38125if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38126  $as_echo_n "(cached) " >&6
38127else
38128  if test -n "$ac_ct_OBJCOPY"; then
38129  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38130else
38131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38132for as_dir in $PATH
38133do
38134  IFS=$as_save_IFS
38135  test -z "$as_dir" && as_dir=.
38136    for ac_exec_ext in '' $ac_executable_extensions; do
38137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38138    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38140    break 2
38141  fi
38142done
38143  done
38144IFS=$as_save_IFS
38145
38146fi
38147fi
38148ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38149if test -n "$ac_ct_OBJCOPY"; then
38150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38151$as_echo "$ac_ct_OBJCOPY" >&6; }
38152else
38153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38154$as_echo "no" >&6; }
38155fi
38156
38157
38158  test -n "$ac_ct_OBJCOPY" && break
38159done
38160
38161  if test "x$ac_ct_OBJCOPY" = x; then
38162    OBJCOPY=""
38163  else
38164    case $cross_compiling:$ac_tool_warned in
38165yes:)
38166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38168ac_tool_warned=yes ;;
38169esac
38170    OBJCOPY=$ac_ct_OBJCOPY
38171  fi
38172fi
38173
38174  else
38175    # The variable is set, but is it from the command line or the environment?
38176
38177    # Try to remove the string !OBJCOPY! from our list.
38178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38180      # If it failed, the variable was not from the command line. Ignore it,
38181      # but warn the user (except for BASH, which is always set by the calling BASH).
38182      if test "xOBJCOPY" != xBASH; then
38183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38184$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38185      fi
38186      # Try to locate tool using the code snippet
38187      if test -n "$ac_tool_prefix"; then
38188  for ac_prog in gobjcopy objcopy
38189  do
38190    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38191set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38193$as_echo_n "checking for $ac_word... " >&6; }
38194if ${ac_cv_prog_OBJCOPY+:} false; then :
38195  $as_echo_n "(cached) " >&6
38196else
38197  if test -n "$OBJCOPY"; then
38198  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38199else
38200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38201for as_dir in $PATH
38202do
38203  IFS=$as_save_IFS
38204  test -z "$as_dir" && as_dir=.
38205    for ac_exec_ext in '' $ac_executable_extensions; do
38206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38207    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38209    break 2
38210  fi
38211done
38212  done
38213IFS=$as_save_IFS
38214
38215fi
38216fi
38217OBJCOPY=$ac_cv_prog_OBJCOPY
38218if test -n "$OBJCOPY"; then
38219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38220$as_echo "$OBJCOPY" >&6; }
38221else
38222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38223$as_echo "no" >&6; }
38224fi
38225
38226
38227    test -n "$OBJCOPY" && break
38228  done
38229fi
38230if test -z "$OBJCOPY"; then
38231  ac_ct_OBJCOPY=$OBJCOPY
38232  for ac_prog in gobjcopy objcopy
38233do
38234  # Extract the first word of "$ac_prog", so it can be a program name with args.
38235set dummy $ac_prog; ac_word=$2
38236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38237$as_echo_n "checking for $ac_word... " >&6; }
38238if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38239  $as_echo_n "(cached) " >&6
38240else
38241  if test -n "$ac_ct_OBJCOPY"; then
38242  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38243else
38244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38245for as_dir in $PATH
38246do
38247  IFS=$as_save_IFS
38248  test -z "$as_dir" && as_dir=.
38249    for ac_exec_ext in '' $ac_executable_extensions; do
38250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38251    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38253    break 2
38254  fi
38255done
38256  done
38257IFS=$as_save_IFS
38258
38259fi
38260fi
38261ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38262if test -n "$ac_ct_OBJCOPY"; then
38263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38264$as_echo "$ac_ct_OBJCOPY" >&6; }
38265else
38266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38267$as_echo "no" >&6; }
38268fi
38269
38270
38271  test -n "$ac_ct_OBJCOPY" && break
38272done
38273
38274  if test "x$ac_ct_OBJCOPY" = x; then
38275    OBJCOPY=""
38276  else
38277    case $cross_compiling:$ac_tool_warned in
38278yes:)
38279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38281ac_tool_warned=yes ;;
38282esac
38283    OBJCOPY=$ac_ct_OBJCOPY
38284  fi
38285fi
38286
38287    else
38288      # If it succeeded, then it was overridden by the user. We will use it
38289      # for the tool.
38290
38291      # First remove it from the list of overridden variables, so we can test
38292      # for unknown variables in the end.
38293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38294
38295      # Check if the provided tool contains a complete path.
38296      tool_specified="$OBJCOPY"
38297      tool_basename="${tool_specified##*/}"
38298      if test "x$tool_basename" = "x$tool_specified"; then
38299        # A command without a complete path is provided, search $PATH.
38300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38301$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38302        # Extract the first word of "$tool_basename", so it can be a program name with args.
38303set dummy $tool_basename; ac_word=$2
38304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38305$as_echo_n "checking for $ac_word... " >&6; }
38306if ${ac_cv_path_OBJCOPY+:} false; then :
38307  $as_echo_n "(cached) " >&6
38308else
38309  case $OBJCOPY in
38310  [\\/]* | ?:[\\/]*)
38311  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38312  ;;
38313  *)
38314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38315for as_dir in $PATH
38316do
38317  IFS=$as_save_IFS
38318  test -z "$as_dir" && as_dir=.
38319    for ac_exec_ext in '' $ac_executable_extensions; do
38320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38321    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38323    break 2
38324  fi
38325done
38326  done
38327IFS=$as_save_IFS
38328
38329  ;;
38330esac
38331fi
38332OBJCOPY=$ac_cv_path_OBJCOPY
38333if test -n "$OBJCOPY"; then
38334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38335$as_echo "$OBJCOPY" >&6; }
38336else
38337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38338$as_echo "no" >&6; }
38339fi
38340
38341
38342        if test "x$OBJCOPY" = x; then
38343          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38344        fi
38345      else
38346        # Otherwise we believe it is a complete path. Use it as it is.
38347        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38348$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38350$as_echo_n "checking for OBJCOPY... " >&6; }
38351        if test ! -x "$tool_specified"; then
38352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38353$as_echo "not found" >&6; }
38354          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38355        fi
38356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38357$as_echo "$tool_specified" >&6; }
38358      fi
38359    fi
38360  fi
38361
38362
38363    # Only call fixup if objcopy was found.
38364    if test -n "$OBJCOPY"; then
38365
38366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38367
38368  # First separate the path from the arguments. This will split at the first
38369  # space.
38370  complete="$OBJCOPY"
38371  path="${complete%% *}"
38372  tmp="$complete EOL"
38373  arguments="${tmp#* }"
38374
38375  # Input might be given as Windows format, start by converting to
38376  # unix format.
38377  new_path=`$CYGPATH -u "$path"`
38378
38379  # Now try to locate executable using which
38380  new_path=`$WHICH "$new_path" 2> /dev/null`
38381  # bat and cmd files are not always considered executable in cygwin causing which
38382  # to not find them
38383  if test "x$new_path" = x \
38384      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38385      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38386    new_path=`$CYGPATH -u "$path"`
38387  fi
38388  if test "x$new_path" = x; then
38389    # Oops. Which didn't find the executable.
38390    # The splitting of arguments from the executable at a space might have been incorrect,
38391    # since paths with space are more likely in Windows. Give it another try with the whole
38392    # argument.
38393    path="$complete"
38394    arguments="EOL"
38395    new_path=`$CYGPATH -u "$path"`
38396    new_path=`$WHICH "$new_path" 2> /dev/null`
38397    # bat and cmd files are not always considered executable in cygwin causing which
38398    # to not find them
38399    if test "x$new_path" = x \
38400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38402      new_path=`$CYGPATH -u "$path"`
38403    fi
38404    if test "x$new_path" = x; then
38405      # It's still not found. Now this is an unrecoverable error.
38406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38407$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38408      has_space=`$ECHO "$complete" | $GREP " "`
38409      if test "x$has_space" != x; then
38410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38412      fi
38413      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38414    fi
38415  fi
38416
38417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38420  # "foo.exe" is OK but "foo" is an error.
38421  #
38422  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38423  # It is also a way to make sure we got the proper file name for the real test later on.
38424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38425  if test "x$test_shortpath" = x; then
38426    # Short path failed, file does not exist as specified.
38427    # Try adding .exe or .cmd
38428    if test -f "${new_path}.exe"; then
38429      input_to_shortpath="${new_path}.exe"
38430    elif test -f "${new_path}.cmd"; then
38431      input_to_shortpath="${new_path}.cmd"
38432    else
38433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38434$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38435      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38436$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38437      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38438    fi
38439  else
38440    input_to_shortpath="$new_path"
38441  fi
38442
38443  # Call helper function which possibly converts this using DOS-style short mode.
38444  # If so, the updated path is stored in $new_path.
38445  new_path="$input_to_shortpath"
38446
38447  input_path="$input_to_shortpath"
38448  # Check if we need to convert this using DOS-style short mode. If the path
38449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38450  # take no chances and rewrite it.
38451  # Note: m4 eats our [], so we need to use [ and ] instead.
38452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38453  if test "x$has_forbidden_chars" != x; then
38454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38458      # Going to short mode and back again did indeed matter. Since short mode is
38459      # case insensitive, let's make it lowercase to improve readability.
38460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38461      # Now convert it back to Unix-stile (cygpath)
38462      input_path=`$CYGPATH -u "$shortmode_path"`
38463      new_path="$input_path"
38464    fi
38465  fi
38466
38467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38468  if test "x$test_cygdrive_prefix" = x; then
38469    # As a simple fix, exclude /usr/bin since it's not a real path.
38470    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38472      # a path prefixed by /cygdrive for fixpath to work.
38473      new_path="$CYGWIN_ROOT_PATH$input_path"
38474    fi
38475  fi
38476
38477  # remove trailing .exe if any
38478  new_path="${new_path/%.exe/}"
38479
38480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38481
38482  # First separate the path from the arguments. This will split at the first
38483  # space.
38484  complete="$OBJCOPY"
38485  path="${complete%% *}"
38486  tmp="$complete EOL"
38487  arguments="${tmp#* }"
38488
38489  # Input might be given as Windows format, start by converting to
38490  # unix format.
38491  new_path="$path"
38492
38493  windows_path="$new_path"
38494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38495    unix_path=`$CYGPATH -u "$windows_path"`
38496    new_path="$unix_path"
38497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38499    new_path="$unix_path"
38500  fi
38501
38502
38503  # Now try to locate executable using which
38504  new_path=`$WHICH "$new_path" 2> /dev/null`
38505
38506  if test "x$new_path" = x; then
38507    # Oops. Which didn't find the executable.
38508    # The splitting of arguments from the executable at a space might have been incorrect,
38509    # since paths with space are more likely in Windows. Give it another try with the whole
38510    # argument.
38511    path="$complete"
38512    arguments="EOL"
38513    new_path="$path"
38514
38515  windows_path="$new_path"
38516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38517    unix_path=`$CYGPATH -u "$windows_path"`
38518    new_path="$unix_path"
38519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38521    new_path="$unix_path"
38522  fi
38523
38524
38525    new_path=`$WHICH "$new_path" 2> /dev/null`
38526    # bat and cmd files are not always considered executable in MSYS causing which
38527    # to not find them
38528    if test "x$new_path" = x \
38529        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38530        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38531      new_path="$path"
38532
38533  windows_path="$new_path"
38534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38535    unix_path=`$CYGPATH -u "$windows_path"`
38536    new_path="$unix_path"
38537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38539    new_path="$unix_path"
38540  fi
38541
38542    fi
38543
38544    if test "x$new_path" = x; then
38545      # It's still not found. Now this is an unrecoverable error.
38546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38547$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38548      has_space=`$ECHO "$complete" | $GREP " "`
38549      if test "x$has_space" != x; then
38550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38552      fi
38553      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38554    fi
38555  fi
38556
38557  # Now new_path has a complete unix path to the binary
38558  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38559    # Keep paths in /bin as-is, but remove trailing .exe if any
38560    new_path="${new_path/%.exe/}"
38561    # Do not save /bin paths to all_fixpath_prefixes!
38562  else
38563    # Not in mixed or Windows style, start by that.
38564    new_path=`cmd //c echo $new_path`
38565
38566  input_path="$new_path"
38567  # Check if we need to convert this using DOS-style short mode. If the path
38568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38569  # take no chances and rewrite it.
38570  # Note: m4 eats our [], so we need to use [ and ] instead.
38571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38572  if test "x$has_forbidden_chars" != x; then
38573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38575  fi
38576
38577    # Output is in $new_path
38578
38579  windows_path="$new_path"
38580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38581    unix_path=`$CYGPATH -u "$windows_path"`
38582    new_path="$unix_path"
38583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38585    new_path="$unix_path"
38586  fi
38587
38588    # remove trailing .exe if any
38589    new_path="${new_path/%.exe/}"
38590
38591    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38592    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38593  fi
38594
38595  else
38596    # We're on a unix platform. Hooray! :)
38597    # First separate the path from the arguments. This will split at the first
38598    # space.
38599    complete="$OBJCOPY"
38600    path="${complete%% *}"
38601    tmp="$complete EOL"
38602    arguments="${tmp#* }"
38603
38604    # Cannot rely on the command "which" here since it doesn't always work.
38605    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38606    if test -z "$is_absolute_path"; then
38607      # Path to executable is not absolute. Find it.
38608      IFS_save="$IFS"
38609      IFS=:
38610      for p in $PATH; do
38611        if test -f "$p/$path" && test -x "$p/$path"; then
38612          new_path="$p/$path"
38613          break
38614        fi
38615      done
38616      IFS="$IFS_save"
38617    else
38618      # This is an absolute path, we can use it without further modifications.
38619      new_path="$path"
38620    fi
38621
38622    if test "x$new_path" = x; then
38623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38624$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38625      has_space=`$ECHO "$complete" | $GREP " "`
38626      if test "x$has_space" != x; then
38627        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38628$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38629      fi
38630      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38631    fi
38632  fi
38633
38634  # Now join together the path and the arguments once again
38635  if test "x$arguments" != xEOL; then
38636    new_complete="$new_path ${arguments% *}"
38637  else
38638    new_complete="$new_path"
38639  fi
38640
38641  if test "x$complete" != "x$new_complete"; then
38642    OBJCOPY="$new_complete"
38643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38644$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38645  fi
38646
38647    fi
38648  fi
38649
38650
38651
38652  # Publish this variable in the help.
38653
38654
38655  if test "x$OBJDUMP" = x; then
38656    # The variable is not set by user, try to locate tool using the code snippet
38657    if test -n "$ac_tool_prefix"; then
38658  for ac_prog in gobjdump objdump
38659  do
38660    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38663$as_echo_n "checking for $ac_word... " >&6; }
38664if ${ac_cv_prog_OBJDUMP+:} false; then :
38665  $as_echo_n "(cached) " >&6
38666else
38667  if test -n "$OBJDUMP"; then
38668  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38669else
38670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38671for as_dir in $PATH
38672do
38673  IFS=$as_save_IFS
38674  test -z "$as_dir" && as_dir=.
38675    for ac_exec_ext in '' $ac_executable_extensions; do
38676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38677    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38679    break 2
38680  fi
38681done
38682  done
38683IFS=$as_save_IFS
38684
38685fi
38686fi
38687OBJDUMP=$ac_cv_prog_OBJDUMP
38688if test -n "$OBJDUMP"; then
38689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38690$as_echo "$OBJDUMP" >&6; }
38691else
38692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38693$as_echo "no" >&6; }
38694fi
38695
38696
38697    test -n "$OBJDUMP" && break
38698  done
38699fi
38700if test -z "$OBJDUMP"; then
38701  ac_ct_OBJDUMP=$OBJDUMP
38702  for ac_prog in gobjdump objdump
38703do
38704  # Extract the first word of "$ac_prog", so it can be a program name with args.
38705set dummy $ac_prog; ac_word=$2
38706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38707$as_echo_n "checking for $ac_word... " >&6; }
38708if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38709  $as_echo_n "(cached) " >&6
38710else
38711  if test -n "$ac_ct_OBJDUMP"; then
38712  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38713else
38714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38715for as_dir in $PATH
38716do
38717  IFS=$as_save_IFS
38718  test -z "$as_dir" && as_dir=.
38719    for ac_exec_ext in '' $ac_executable_extensions; do
38720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38721    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38723    break 2
38724  fi
38725done
38726  done
38727IFS=$as_save_IFS
38728
38729fi
38730fi
38731ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38732if test -n "$ac_ct_OBJDUMP"; then
38733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38734$as_echo "$ac_ct_OBJDUMP" >&6; }
38735else
38736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38737$as_echo "no" >&6; }
38738fi
38739
38740
38741  test -n "$ac_ct_OBJDUMP" && break
38742done
38743
38744  if test "x$ac_ct_OBJDUMP" = x; then
38745    OBJDUMP=""
38746  else
38747    case $cross_compiling:$ac_tool_warned in
38748yes:)
38749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38751ac_tool_warned=yes ;;
38752esac
38753    OBJDUMP=$ac_ct_OBJDUMP
38754  fi
38755fi
38756
38757  else
38758    # The variable is set, but is it from the command line or the environment?
38759
38760    # Try to remove the string !OBJDUMP! from our list.
38761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38763      # If it failed, the variable was not from the command line. Ignore it,
38764      # but warn the user (except for BASH, which is always set by the calling BASH).
38765      if test "xOBJDUMP" != xBASH; then
38766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38767$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38768      fi
38769      # Try to locate tool using the code snippet
38770      if test -n "$ac_tool_prefix"; then
38771  for ac_prog in gobjdump objdump
38772  do
38773    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38774set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38776$as_echo_n "checking for $ac_word... " >&6; }
38777if ${ac_cv_prog_OBJDUMP+:} false; then :
38778  $as_echo_n "(cached) " >&6
38779else
38780  if test -n "$OBJDUMP"; then
38781  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38782else
38783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38784for as_dir in $PATH
38785do
38786  IFS=$as_save_IFS
38787  test -z "$as_dir" && as_dir=.
38788    for ac_exec_ext in '' $ac_executable_extensions; do
38789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38790    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38792    break 2
38793  fi
38794done
38795  done
38796IFS=$as_save_IFS
38797
38798fi
38799fi
38800OBJDUMP=$ac_cv_prog_OBJDUMP
38801if test -n "$OBJDUMP"; then
38802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38803$as_echo "$OBJDUMP" >&6; }
38804else
38805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38806$as_echo "no" >&6; }
38807fi
38808
38809
38810    test -n "$OBJDUMP" && break
38811  done
38812fi
38813if test -z "$OBJDUMP"; then
38814  ac_ct_OBJDUMP=$OBJDUMP
38815  for ac_prog in gobjdump objdump
38816do
38817  # Extract the first word of "$ac_prog", so it can be a program name with args.
38818set dummy $ac_prog; ac_word=$2
38819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38820$as_echo_n "checking for $ac_word... " >&6; }
38821if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38822  $as_echo_n "(cached) " >&6
38823else
38824  if test -n "$ac_ct_OBJDUMP"; then
38825  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38826else
38827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38828for as_dir in $PATH
38829do
38830  IFS=$as_save_IFS
38831  test -z "$as_dir" && as_dir=.
38832    for ac_exec_ext in '' $ac_executable_extensions; do
38833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38834    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38836    break 2
38837  fi
38838done
38839  done
38840IFS=$as_save_IFS
38841
38842fi
38843fi
38844ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38845if test -n "$ac_ct_OBJDUMP"; then
38846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38847$as_echo "$ac_ct_OBJDUMP" >&6; }
38848else
38849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38850$as_echo "no" >&6; }
38851fi
38852
38853
38854  test -n "$ac_ct_OBJDUMP" && break
38855done
38856
38857  if test "x$ac_ct_OBJDUMP" = x; then
38858    OBJDUMP=""
38859  else
38860    case $cross_compiling:$ac_tool_warned in
38861yes:)
38862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38864ac_tool_warned=yes ;;
38865esac
38866    OBJDUMP=$ac_ct_OBJDUMP
38867  fi
38868fi
38869
38870    else
38871      # If it succeeded, then it was overridden by the user. We will use it
38872      # for the tool.
38873
38874      # First remove it from the list of overridden variables, so we can test
38875      # for unknown variables in the end.
38876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38877
38878      # Check if the provided tool contains a complete path.
38879      tool_specified="$OBJDUMP"
38880      tool_basename="${tool_specified##*/}"
38881      if test "x$tool_basename" = "x$tool_specified"; then
38882        # A command without a complete path is provided, search $PATH.
38883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38884$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38885        # Extract the first word of "$tool_basename", so it can be a program name with args.
38886set dummy $tool_basename; ac_word=$2
38887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38888$as_echo_n "checking for $ac_word... " >&6; }
38889if ${ac_cv_path_OBJDUMP+:} false; then :
38890  $as_echo_n "(cached) " >&6
38891else
38892  case $OBJDUMP in
38893  [\\/]* | ?:[\\/]*)
38894  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38895  ;;
38896  *)
38897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38898for as_dir in $PATH
38899do
38900  IFS=$as_save_IFS
38901  test -z "$as_dir" && as_dir=.
38902    for ac_exec_ext in '' $ac_executable_extensions; do
38903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38904    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38906    break 2
38907  fi
38908done
38909  done
38910IFS=$as_save_IFS
38911
38912  ;;
38913esac
38914fi
38915OBJDUMP=$ac_cv_path_OBJDUMP
38916if test -n "$OBJDUMP"; then
38917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38918$as_echo "$OBJDUMP" >&6; }
38919else
38920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38921$as_echo "no" >&6; }
38922fi
38923
38924
38925        if test "x$OBJDUMP" = x; then
38926          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38927        fi
38928      else
38929        # Otherwise we believe it is a complete path. Use it as it is.
38930        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38931$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38933$as_echo_n "checking for OBJDUMP... " >&6; }
38934        if test ! -x "$tool_specified"; then
38935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38936$as_echo "not found" >&6; }
38937          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38938        fi
38939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38940$as_echo "$tool_specified" >&6; }
38941      fi
38942    fi
38943  fi
38944
38945
38946  if test "x$OBJDUMP" != x; then
38947    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38948    # bails if argument is missing.
38949
38950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38951
38952  # First separate the path from the arguments. This will split at the first
38953  # space.
38954  complete="$OBJDUMP"
38955  path="${complete%% *}"
38956  tmp="$complete EOL"
38957  arguments="${tmp#* }"
38958
38959  # Input might be given as Windows format, start by converting to
38960  # unix format.
38961  new_path=`$CYGPATH -u "$path"`
38962
38963  # Now try to locate executable using which
38964  new_path=`$WHICH "$new_path" 2> /dev/null`
38965  # bat and cmd files are not always considered executable in cygwin causing which
38966  # to not find them
38967  if test "x$new_path" = x \
38968      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38969      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38970    new_path=`$CYGPATH -u "$path"`
38971  fi
38972  if test "x$new_path" = x; then
38973    # Oops. Which didn't find the executable.
38974    # The splitting of arguments from the executable at a space might have been incorrect,
38975    # since paths with space are more likely in Windows. Give it another try with the whole
38976    # argument.
38977    path="$complete"
38978    arguments="EOL"
38979    new_path=`$CYGPATH -u "$path"`
38980    new_path=`$WHICH "$new_path" 2> /dev/null`
38981    # bat and cmd files are not always considered executable in cygwin causing which
38982    # to not find them
38983    if test "x$new_path" = x \
38984        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38985        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38986      new_path=`$CYGPATH -u "$path"`
38987    fi
38988    if test "x$new_path" = x; then
38989      # It's still not found. Now this is an unrecoverable error.
38990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38991$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38992      has_space=`$ECHO "$complete" | $GREP " "`
38993      if test "x$has_space" != x; then
38994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38996      fi
38997      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38998    fi
38999  fi
39000
39001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39004  # "foo.exe" is OK but "foo" is an error.
39005  #
39006  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39007  # It is also a way to make sure we got the proper file name for the real test later on.
39008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39009  if test "x$test_shortpath" = x; then
39010    # Short path failed, file does not exist as specified.
39011    # Try adding .exe or .cmd
39012    if test -f "${new_path}.exe"; then
39013      input_to_shortpath="${new_path}.exe"
39014    elif test -f "${new_path}.cmd"; then
39015      input_to_shortpath="${new_path}.cmd"
39016    else
39017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39018$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39019      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39020$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39021      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39022    fi
39023  else
39024    input_to_shortpath="$new_path"
39025  fi
39026
39027  # Call helper function which possibly converts this using DOS-style short mode.
39028  # If so, the updated path is stored in $new_path.
39029  new_path="$input_to_shortpath"
39030
39031  input_path="$input_to_shortpath"
39032  # Check if we need to convert this using DOS-style short mode. If the path
39033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39034  # take no chances and rewrite it.
39035  # Note: m4 eats our [], so we need to use [ and ] instead.
39036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39037  if test "x$has_forbidden_chars" != x; then
39038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39042      # Going to short mode and back again did indeed matter. Since short mode is
39043      # case insensitive, let's make it lowercase to improve readability.
39044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39045      # Now convert it back to Unix-stile (cygpath)
39046      input_path=`$CYGPATH -u "$shortmode_path"`
39047      new_path="$input_path"
39048    fi
39049  fi
39050
39051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39052  if test "x$test_cygdrive_prefix" = x; then
39053    # As a simple fix, exclude /usr/bin since it's not a real path.
39054    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39056      # a path prefixed by /cygdrive for fixpath to work.
39057      new_path="$CYGWIN_ROOT_PATH$input_path"
39058    fi
39059  fi
39060
39061  # remove trailing .exe if any
39062  new_path="${new_path/%.exe/}"
39063
39064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39065
39066  # First separate the path from the arguments. This will split at the first
39067  # space.
39068  complete="$OBJDUMP"
39069  path="${complete%% *}"
39070  tmp="$complete EOL"
39071  arguments="${tmp#* }"
39072
39073  # Input might be given as Windows format, start by converting to
39074  # unix format.
39075  new_path="$path"
39076
39077  windows_path="$new_path"
39078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39079    unix_path=`$CYGPATH -u "$windows_path"`
39080    new_path="$unix_path"
39081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39083    new_path="$unix_path"
39084  fi
39085
39086
39087  # Now try to locate executable using which
39088  new_path=`$WHICH "$new_path" 2> /dev/null`
39089
39090  if test "x$new_path" = x; then
39091    # Oops. Which didn't find the executable.
39092    # The splitting of arguments from the executable at a space might have been incorrect,
39093    # since paths with space are more likely in Windows. Give it another try with the whole
39094    # argument.
39095    path="$complete"
39096    arguments="EOL"
39097    new_path="$path"
39098
39099  windows_path="$new_path"
39100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39101    unix_path=`$CYGPATH -u "$windows_path"`
39102    new_path="$unix_path"
39103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39105    new_path="$unix_path"
39106  fi
39107
39108
39109    new_path=`$WHICH "$new_path" 2> /dev/null`
39110    # bat and cmd files are not always considered executable in MSYS causing which
39111    # to not find them
39112    if test "x$new_path" = x \
39113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39115      new_path="$path"
39116
39117  windows_path="$new_path"
39118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39119    unix_path=`$CYGPATH -u "$windows_path"`
39120    new_path="$unix_path"
39121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39123    new_path="$unix_path"
39124  fi
39125
39126    fi
39127
39128    if test "x$new_path" = x; then
39129      # It's still not found. Now this is an unrecoverable error.
39130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39131$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39132      has_space=`$ECHO "$complete" | $GREP " "`
39133      if test "x$has_space" != x; then
39134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39136      fi
39137      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39138    fi
39139  fi
39140
39141  # Now new_path has a complete unix path to the binary
39142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39143    # Keep paths in /bin as-is, but remove trailing .exe if any
39144    new_path="${new_path/%.exe/}"
39145    # Do not save /bin paths to all_fixpath_prefixes!
39146  else
39147    # Not in mixed or Windows style, start by that.
39148    new_path=`cmd //c echo $new_path`
39149
39150  input_path="$new_path"
39151  # Check if we need to convert this using DOS-style short mode. If the path
39152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39153  # take no chances and rewrite it.
39154  # Note: m4 eats our [], so we need to use [ and ] instead.
39155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39156  if test "x$has_forbidden_chars" != x; then
39157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39159  fi
39160
39161    # Output is in $new_path
39162
39163  windows_path="$new_path"
39164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39165    unix_path=`$CYGPATH -u "$windows_path"`
39166    new_path="$unix_path"
39167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39169    new_path="$unix_path"
39170  fi
39171
39172    # remove trailing .exe if any
39173    new_path="${new_path/%.exe/}"
39174
39175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39177  fi
39178
39179  else
39180    # We're on a unix platform. Hooray! :)
39181    # First separate the path from the arguments. This will split at the first
39182    # space.
39183    complete="$OBJDUMP"
39184    path="${complete%% *}"
39185    tmp="$complete EOL"
39186    arguments="${tmp#* }"
39187
39188    # Cannot rely on the command "which" here since it doesn't always work.
39189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39190    if test -z "$is_absolute_path"; then
39191      # Path to executable is not absolute. Find it.
39192      IFS_save="$IFS"
39193      IFS=:
39194      for p in $PATH; do
39195        if test -f "$p/$path" && test -x "$p/$path"; then
39196          new_path="$p/$path"
39197          break
39198        fi
39199      done
39200      IFS="$IFS_save"
39201    else
39202      # This is an absolute path, we can use it without further modifications.
39203      new_path="$path"
39204    fi
39205
39206    if test "x$new_path" = x; then
39207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39208$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39209      has_space=`$ECHO "$complete" | $GREP " "`
39210      if test "x$has_space" != x; then
39211        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39213      fi
39214      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39215    fi
39216  fi
39217
39218  # Now join together the path and the arguments once again
39219  if test "x$arguments" != xEOL; then
39220    new_complete="$new_path ${arguments% *}"
39221  else
39222    new_complete="$new_path"
39223  fi
39224
39225  if test "x$complete" != "x$new_complete"; then
39226    OBJDUMP="$new_complete"
39227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39228$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39229  fi
39230
39231  fi
39232
39233
39234  # Restore old path.
39235  PATH="$OLD_PATH"
39236
39237  # Restore the flags to the user specified values.
39238  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39239  CFLAGS="$ORG_CFLAGS"
39240  CXXFLAGS="$ORG_CXXFLAGS"
39241  OBJCFLAGS="$ORG_OBJCFLAGS"
39242
39243
39244# Finally do some processing after the detection phase
39245
39246  if test "x$COMPILE_TYPE" = "xcross"; then
39247    # Now we need to find a C/C++ compiler that can build executables for the
39248    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39249    # used once. Also, we need to do this without adding a tools dir to the
39250    # path, otherwise we might pick up cross-compilers which don't use standard
39251    # naming.
39252
39253    # FIXME: we should list the discovered compilers as an exclude pattern!
39254    # If we do that, we can do this detection before POST_DETECTION, and still
39255    # find the build compilers in the tools dir, if needed.
39256
39257
39258  # Publish this variable in the help.
39259
39260
39261  if test "x$BUILD_CC" = x; then
39262    # The variable is not set by user, try to locate tool using the code snippet
39263    for ac_prog in cl cc gcc
39264do
39265  # Extract the first word of "$ac_prog", so it can be a program name with args.
39266set dummy $ac_prog; ac_word=$2
39267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39268$as_echo_n "checking for $ac_word... " >&6; }
39269if ${ac_cv_path_BUILD_CC+:} false; then :
39270  $as_echo_n "(cached) " >&6
39271else
39272  case $BUILD_CC in
39273  [\\/]* | ?:[\\/]*)
39274  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39275  ;;
39276  *)
39277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39278for as_dir in $PATH
39279do
39280  IFS=$as_save_IFS
39281  test -z "$as_dir" && as_dir=.
39282    for ac_exec_ext in '' $ac_executable_extensions; do
39283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39284    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39286    break 2
39287  fi
39288done
39289  done
39290IFS=$as_save_IFS
39291
39292  ;;
39293esac
39294fi
39295BUILD_CC=$ac_cv_path_BUILD_CC
39296if test -n "$BUILD_CC"; then
39297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39298$as_echo "$BUILD_CC" >&6; }
39299else
39300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39301$as_echo "no" >&6; }
39302fi
39303
39304
39305  test -n "$BUILD_CC" && break
39306done
39307
39308  else
39309    # The variable is set, but is it from the command line or the environment?
39310
39311    # Try to remove the string !BUILD_CC! from our list.
39312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39314      # If it failed, the variable was not from the command line. Ignore it,
39315      # but warn the user (except for BASH, which is always set by the calling BASH).
39316      if test "xBUILD_CC" != xBASH; then
39317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39318$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39319      fi
39320      # Try to locate tool using the code snippet
39321      for ac_prog in cl cc gcc
39322do
39323  # Extract the first word of "$ac_prog", so it can be a program name with args.
39324set dummy $ac_prog; ac_word=$2
39325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39326$as_echo_n "checking for $ac_word... " >&6; }
39327if ${ac_cv_path_BUILD_CC+:} false; then :
39328  $as_echo_n "(cached) " >&6
39329else
39330  case $BUILD_CC in
39331  [\\/]* | ?:[\\/]*)
39332  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39333  ;;
39334  *)
39335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39336for as_dir in $PATH
39337do
39338  IFS=$as_save_IFS
39339  test -z "$as_dir" && as_dir=.
39340    for ac_exec_ext in '' $ac_executable_extensions; do
39341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39342    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39344    break 2
39345  fi
39346done
39347  done
39348IFS=$as_save_IFS
39349
39350  ;;
39351esac
39352fi
39353BUILD_CC=$ac_cv_path_BUILD_CC
39354if test -n "$BUILD_CC"; then
39355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39356$as_echo "$BUILD_CC" >&6; }
39357else
39358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39359$as_echo "no" >&6; }
39360fi
39361
39362
39363  test -n "$BUILD_CC" && break
39364done
39365
39366    else
39367      # If it succeeded, then it was overridden by the user. We will use it
39368      # for the tool.
39369
39370      # First remove it from the list of overridden variables, so we can test
39371      # for unknown variables in the end.
39372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39373
39374      # Check if the provided tool contains a complete path.
39375      tool_specified="$BUILD_CC"
39376      tool_basename="${tool_specified##*/}"
39377      if test "x$tool_basename" = "x$tool_specified"; then
39378        # A command without a complete path is provided, search $PATH.
39379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39380$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39381        # Extract the first word of "$tool_basename", so it can be a program name with args.
39382set dummy $tool_basename; ac_word=$2
39383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39384$as_echo_n "checking for $ac_word... " >&6; }
39385if ${ac_cv_path_BUILD_CC+:} false; then :
39386  $as_echo_n "(cached) " >&6
39387else
39388  case $BUILD_CC in
39389  [\\/]* | ?:[\\/]*)
39390  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39391  ;;
39392  *)
39393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39394for as_dir in $PATH
39395do
39396  IFS=$as_save_IFS
39397  test -z "$as_dir" && as_dir=.
39398    for ac_exec_ext in '' $ac_executable_extensions; do
39399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39400    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39402    break 2
39403  fi
39404done
39405  done
39406IFS=$as_save_IFS
39407
39408  ;;
39409esac
39410fi
39411BUILD_CC=$ac_cv_path_BUILD_CC
39412if test -n "$BUILD_CC"; then
39413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39414$as_echo "$BUILD_CC" >&6; }
39415else
39416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39417$as_echo "no" >&6; }
39418fi
39419
39420
39421        if test "x$BUILD_CC" = x; then
39422          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39423        fi
39424      else
39425        # Otherwise we believe it is a complete path. Use it as it is.
39426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39427$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39429$as_echo_n "checking for BUILD_CC... " >&6; }
39430        if test ! -x "$tool_specified"; then
39431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39432$as_echo "not found" >&6; }
39433          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39434        fi
39435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39436$as_echo "$tool_specified" >&6; }
39437      fi
39438    fi
39439  fi
39440
39441
39442
39443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39444
39445  # First separate the path from the arguments. This will split at the first
39446  # space.
39447  complete="$BUILD_CC"
39448  path="${complete%% *}"
39449  tmp="$complete EOL"
39450  arguments="${tmp#* }"
39451
39452  # Input might be given as Windows format, start by converting to
39453  # unix format.
39454  new_path=`$CYGPATH -u "$path"`
39455
39456  # Now try to locate executable using which
39457  new_path=`$WHICH "$new_path" 2> /dev/null`
39458  # bat and cmd files are not always considered executable in cygwin causing which
39459  # to not find them
39460  if test "x$new_path" = x \
39461      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39462      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39463    new_path=`$CYGPATH -u "$path"`
39464  fi
39465  if test "x$new_path" = x; then
39466    # Oops. Which didn't find the executable.
39467    # The splitting of arguments from the executable at a space might have been incorrect,
39468    # since paths with space are more likely in Windows. Give it another try with the whole
39469    # argument.
39470    path="$complete"
39471    arguments="EOL"
39472    new_path=`$CYGPATH -u "$path"`
39473    new_path=`$WHICH "$new_path" 2> /dev/null`
39474    # bat and cmd files are not always considered executable in cygwin causing which
39475    # to not find them
39476    if test "x$new_path" = x \
39477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39479      new_path=`$CYGPATH -u "$path"`
39480    fi
39481    if test "x$new_path" = x; then
39482      # It's still not found. Now this is an unrecoverable error.
39483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39484$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39485      has_space=`$ECHO "$complete" | $GREP " "`
39486      if test "x$has_space" != x; then
39487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39489      fi
39490      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39491    fi
39492  fi
39493
39494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39497  # "foo.exe" is OK but "foo" is an error.
39498  #
39499  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39500  # It is also a way to make sure we got the proper file name for the real test later on.
39501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39502  if test "x$test_shortpath" = x; then
39503    # Short path failed, file does not exist as specified.
39504    # Try adding .exe or .cmd
39505    if test -f "${new_path}.exe"; then
39506      input_to_shortpath="${new_path}.exe"
39507    elif test -f "${new_path}.cmd"; then
39508      input_to_shortpath="${new_path}.cmd"
39509    else
39510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39511$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39512      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39513$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39514      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39515    fi
39516  else
39517    input_to_shortpath="$new_path"
39518  fi
39519
39520  # Call helper function which possibly converts this using DOS-style short mode.
39521  # If so, the updated path is stored in $new_path.
39522  new_path="$input_to_shortpath"
39523
39524  input_path="$input_to_shortpath"
39525  # Check if we need to convert this using DOS-style short mode. If the path
39526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39527  # take no chances and rewrite it.
39528  # Note: m4 eats our [], so we need to use [ and ] instead.
39529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39530  if test "x$has_forbidden_chars" != x; then
39531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39535      # Going to short mode and back again did indeed matter. Since short mode is
39536      # case insensitive, let's make it lowercase to improve readability.
39537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39538      # Now convert it back to Unix-stile (cygpath)
39539      input_path=`$CYGPATH -u "$shortmode_path"`
39540      new_path="$input_path"
39541    fi
39542  fi
39543
39544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39545  if test "x$test_cygdrive_prefix" = x; then
39546    # As a simple fix, exclude /usr/bin since it's not a real path.
39547    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39549      # a path prefixed by /cygdrive for fixpath to work.
39550      new_path="$CYGWIN_ROOT_PATH$input_path"
39551    fi
39552  fi
39553
39554  # remove trailing .exe if any
39555  new_path="${new_path/%.exe/}"
39556
39557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39558
39559  # First separate the path from the arguments. This will split at the first
39560  # space.
39561  complete="$BUILD_CC"
39562  path="${complete%% *}"
39563  tmp="$complete EOL"
39564  arguments="${tmp#* }"
39565
39566  # Input might be given as Windows format, start by converting to
39567  # unix format.
39568  new_path="$path"
39569
39570  windows_path="$new_path"
39571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39572    unix_path=`$CYGPATH -u "$windows_path"`
39573    new_path="$unix_path"
39574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39576    new_path="$unix_path"
39577  fi
39578
39579
39580  # Now try to locate executable using which
39581  new_path=`$WHICH "$new_path" 2> /dev/null`
39582
39583  if test "x$new_path" = x; then
39584    # Oops. Which didn't find the executable.
39585    # The splitting of arguments from the executable at a space might have been incorrect,
39586    # since paths with space are more likely in Windows. Give it another try with the whole
39587    # argument.
39588    path="$complete"
39589    arguments="EOL"
39590    new_path="$path"
39591
39592  windows_path="$new_path"
39593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39594    unix_path=`$CYGPATH -u "$windows_path"`
39595    new_path="$unix_path"
39596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39598    new_path="$unix_path"
39599  fi
39600
39601
39602    new_path=`$WHICH "$new_path" 2> /dev/null`
39603    # bat and cmd files are not always considered executable in MSYS causing which
39604    # to not find them
39605    if test "x$new_path" = x \
39606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39608      new_path="$path"
39609
39610  windows_path="$new_path"
39611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39612    unix_path=`$CYGPATH -u "$windows_path"`
39613    new_path="$unix_path"
39614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39616    new_path="$unix_path"
39617  fi
39618
39619    fi
39620
39621    if test "x$new_path" = x; then
39622      # It's still not found. Now this is an unrecoverable error.
39623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39624$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39625      has_space=`$ECHO "$complete" | $GREP " "`
39626      if test "x$has_space" != x; then
39627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39629      fi
39630      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39631    fi
39632  fi
39633
39634  # Now new_path has a complete unix path to the binary
39635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39636    # Keep paths in /bin as-is, but remove trailing .exe if any
39637    new_path="${new_path/%.exe/}"
39638    # Do not save /bin paths to all_fixpath_prefixes!
39639  else
39640    # Not in mixed or Windows style, start by that.
39641    new_path=`cmd //c echo $new_path`
39642
39643  input_path="$new_path"
39644  # Check if we need to convert this using DOS-style short mode. If the path
39645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39646  # take no chances and rewrite it.
39647  # Note: m4 eats our [], so we need to use [ and ] instead.
39648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39649  if test "x$has_forbidden_chars" != x; then
39650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39652  fi
39653
39654    # Output is in $new_path
39655
39656  windows_path="$new_path"
39657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39658    unix_path=`$CYGPATH -u "$windows_path"`
39659    new_path="$unix_path"
39660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39662    new_path="$unix_path"
39663  fi
39664
39665    # remove trailing .exe if any
39666    new_path="${new_path/%.exe/}"
39667
39668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39670  fi
39671
39672  else
39673    # We're on a unix platform. Hooray! :)
39674    # First separate the path from the arguments. This will split at the first
39675    # space.
39676    complete="$BUILD_CC"
39677    path="${complete%% *}"
39678    tmp="$complete EOL"
39679    arguments="${tmp#* }"
39680
39681    # Cannot rely on the command "which" here since it doesn't always work.
39682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39683    if test -z "$is_absolute_path"; then
39684      # Path to executable is not absolute. Find it.
39685      IFS_save="$IFS"
39686      IFS=:
39687      for p in $PATH; do
39688        if test -f "$p/$path" && test -x "$p/$path"; then
39689          new_path="$p/$path"
39690          break
39691        fi
39692      done
39693      IFS="$IFS_save"
39694    else
39695      # This is an absolute path, we can use it without further modifications.
39696      new_path="$path"
39697    fi
39698
39699    if test "x$new_path" = x; then
39700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39701$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39702      has_space=`$ECHO "$complete" | $GREP " "`
39703      if test "x$has_space" != x; then
39704        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39706      fi
39707      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39708    fi
39709  fi
39710
39711  # Now join together the path and the arguments once again
39712  if test "x$arguments" != xEOL; then
39713    new_complete="$new_path ${arguments% *}"
39714  else
39715    new_complete="$new_path"
39716  fi
39717
39718  if test "x$complete" != "x$new_complete"; then
39719    BUILD_CC="$new_complete"
39720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39721$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39722  fi
39723
39724
39725
39726  # Publish this variable in the help.
39727
39728
39729  if test "x$BUILD_CXX" = x; then
39730    # The variable is not set by user, try to locate tool using the code snippet
39731    for ac_prog in cl CC g++
39732do
39733  # Extract the first word of "$ac_prog", so it can be a program name with args.
39734set dummy $ac_prog; ac_word=$2
39735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39736$as_echo_n "checking for $ac_word... " >&6; }
39737if ${ac_cv_path_BUILD_CXX+:} false; then :
39738  $as_echo_n "(cached) " >&6
39739else
39740  case $BUILD_CXX in
39741  [\\/]* | ?:[\\/]*)
39742  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39743  ;;
39744  *)
39745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39746for as_dir in $PATH
39747do
39748  IFS=$as_save_IFS
39749  test -z "$as_dir" && as_dir=.
39750    for ac_exec_ext in '' $ac_executable_extensions; do
39751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39752    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39754    break 2
39755  fi
39756done
39757  done
39758IFS=$as_save_IFS
39759
39760  ;;
39761esac
39762fi
39763BUILD_CXX=$ac_cv_path_BUILD_CXX
39764if test -n "$BUILD_CXX"; then
39765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39766$as_echo "$BUILD_CXX" >&6; }
39767else
39768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39769$as_echo "no" >&6; }
39770fi
39771
39772
39773  test -n "$BUILD_CXX" && break
39774done
39775
39776  else
39777    # The variable is set, but is it from the command line or the environment?
39778
39779    # Try to remove the string !BUILD_CXX! from our list.
39780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39782      # If it failed, the variable was not from the command line. Ignore it,
39783      # but warn the user (except for BASH, which is always set by the calling BASH).
39784      if test "xBUILD_CXX" != xBASH; then
39785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39786$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39787      fi
39788      # Try to locate tool using the code snippet
39789      for ac_prog in cl CC g++
39790do
39791  # Extract the first word of "$ac_prog", so it can be a program name with args.
39792set dummy $ac_prog; ac_word=$2
39793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39794$as_echo_n "checking for $ac_word... " >&6; }
39795if ${ac_cv_path_BUILD_CXX+:} false; then :
39796  $as_echo_n "(cached) " >&6
39797else
39798  case $BUILD_CXX in
39799  [\\/]* | ?:[\\/]*)
39800  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39801  ;;
39802  *)
39803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39804for as_dir in $PATH
39805do
39806  IFS=$as_save_IFS
39807  test -z "$as_dir" && as_dir=.
39808    for ac_exec_ext in '' $ac_executable_extensions; do
39809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39810    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39812    break 2
39813  fi
39814done
39815  done
39816IFS=$as_save_IFS
39817
39818  ;;
39819esac
39820fi
39821BUILD_CXX=$ac_cv_path_BUILD_CXX
39822if test -n "$BUILD_CXX"; then
39823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39824$as_echo "$BUILD_CXX" >&6; }
39825else
39826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39827$as_echo "no" >&6; }
39828fi
39829
39830
39831  test -n "$BUILD_CXX" && break
39832done
39833
39834    else
39835      # If it succeeded, then it was overridden by the user. We will use it
39836      # for the tool.
39837
39838      # First remove it from the list of overridden variables, so we can test
39839      # for unknown variables in the end.
39840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39841
39842      # Check if the provided tool contains a complete path.
39843      tool_specified="$BUILD_CXX"
39844      tool_basename="${tool_specified##*/}"
39845      if test "x$tool_basename" = "x$tool_specified"; then
39846        # A command without a complete path is provided, search $PATH.
39847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39848$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39849        # Extract the first word of "$tool_basename", so it can be a program name with args.
39850set dummy $tool_basename; ac_word=$2
39851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39852$as_echo_n "checking for $ac_word... " >&6; }
39853if ${ac_cv_path_BUILD_CXX+:} false; then :
39854  $as_echo_n "(cached) " >&6
39855else
39856  case $BUILD_CXX in
39857  [\\/]* | ?:[\\/]*)
39858  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39859  ;;
39860  *)
39861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39862for as_dir in $PATH
39863do
39864  IFS=$as_save_IFS
39865  test -z "$as_dir" && as_dir=.
39866    for ac_exec_ext in '' $ac_executable_extensions; do
39867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39868    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39870    break 2
39871  fi
39872done
39873  done
39874IFS=$as_save_IFS
39875
39876  ;;
39877esac
39878fi
39879BUILD_CXX=$ac_cv_path_BUILD_CXX
39880if test -n "$BUILD_CXX"; then
39881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39882$as_echo "$BUILD_CXX" >&6; }
39883else
39884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39885$as_echo "no" >&6; }
39886fi
39887
39888
39889        if test "x$BUILD_CXX" = x; then
39890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39891        fi
39892      else
39893        # Otherwise we believe it is a complete path. Use it as it is.
39894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39895$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39897$as_echo_n "checking for BUILD_CXX... " >&6; }
39898        if test ! -x "$tool_specified"; then
39899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39900$as_echo "not found" >&6; }
39901          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39902        fi
39903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39904$as_echo "$tool_specified" >&6; }
39905      fi
39906    fi
39907  fi
39908
39909
39910
39911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39912
39913  # First separate the path from the arguments. This will split at the first
39914  # space.
39915  complete="$BUILD_CXX"
39916  path="${complete%% *}"
39917  tmp="$complete EOL"
39918  arguments="${tmp#* }"
39919
39920  # Input might be given as Windows format, start by converting to
39921  # unix format.
39922  new_path=`$CYGPATH -u "$path"`
39923
39924  # Now try to locate executable using which
39925  new_path=`$WHICH "$new_path" 2> /dev/null`
39926  # bat and cmd files are not always considered executable in cygwin causing which
39927  # to not find them
39928  if test "x$new_path" = x \
39929      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39930      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39931    new_path=`$CYGPATH -u "$path"`
39932  fi
39933  if test "x$new_path" = x; then
39934    # Oops. Which didn't find the executable.
39935    # The splitting of arguments from the executable at a space might have been incorrect,
39936    # since paths with space are more likely in Windows. Give it another try with the whole
39937    # argument.
39938    path="$complete"
39939    arguments="EOL"
39940    new_path=`$CYGPATH -u "$path"`
39941    new_path=`$WHICH "$new_path" 2> /dev/null`
39942    # bat and cmd files are not always considered executable in cygwin causing which
39943    # to not find them
39944    if test "x$new_path" = x \
39945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39947      new_path=`$CYGPATH -u "$path"`
39948    fi
39949    if test "x$new_path" = x; then
39950      # It's still not found. Now this is an unrecoverable error.
39951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39952$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39953      has_space=`$ECHO "$complete" | $GREP " "`
39954      if test "x$has_space" != x; then
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39957      fi
39958      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39959    fi
39960  fi
39961
39962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39965  # "foo.exe" is OK but "foo" is an error.
39966  #
39967  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39968  # It is also a way to make sure we got the proper file name for the real test later on.
39969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39970  if test "x$test_shortpath" = x; then
39971    # Short path failed, file does not exist as specified.
39972    # Try adding .exe or .cmd
39973    if test -f "${new_path}.exe"; then
39974      input_to_shortpath="${new_path}.exe"
39975    elif test -f "${new_path}.cmd"; then
39976      input_to_shortpath="${new_path}.cmd"
39977    else
39978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39979$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39980      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39981$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39982      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39983    fi
39984  else
39985    input_to_shortpath="$new_path"
39986  fi
39987
39988  # Call helper function which possibly converts this using DOS-style short mode.
39989  # If so, the updated path is stored in $new_path.
39990  new_path="$input_to_shortpath"
39991
39992  input_path="$input_to_shortpath"
39993  # Check if we need to convert this using DOS-style short mode. If the path
39994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39995  # take no chances and rewrite it.
39996  # Note: m4 eats our [], so we need to use [ and ] instead.
39997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39998  if test "x$has_forbidden_chars" != x; then
39999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40003      # Going to short mode and back again did indeed matter. Since short mode is
40004      # case insensitive, let's make it lowercase to improve readability.
40005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40006      # Now convert it back to Unix-stile (cygpath)
40007      input_path=`$CYGPATH -u "$shortmode_path"`
40008      new_path="$input_path"
40009    fi
40010  fi
40011
40012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40013  if test "x$test_cygdrive_prefix" = x; then
40014    # As a simple fix, exclude /usr/bin since it's not a real path.
40015    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40017      # a path prefixed by /cygdrive for fixpath to work.
40018      new_path="$CYGWIN_ROOT_PATH$input_path"
40019    fi
40020  fi
40021
40022  # remove trailing .exe if any
40023  new_path="${new_path/%.exe/}"
40024
40025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40026
40027  # First separate the path from the arguments. This will split at the first
40028  # space.
40029  complete="$BUILD_CXX"
40030  path="${complete%% *}"
40031  tmp="$complete EOL"
40032  arguments="${tmp#* }"
40033
40034  # Input might be given as Windows format, start by converting to
40035  # unix format.
40036  new_path="$path"
40037
40038  windows_path="$new_path"
40039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40040    unix_path=`$CYGPATH -u "$windows_path"`
40041    new_path="$unix_path"
40042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40044    new_path="$unix_path"
40045  fi
40046
40047
40048  # Now try to locate executable using which
40049  new_path=`$WHICH "$new_path" 2> /dev/null`
40050
40051  if test "x$new_path" = x; then
40052    # Oops. Which didn't find the executable.
40053    # The splitting of arguments from the executable at a space might have been incorrect,
40054    # since paths with space are more likely in Windows. Give it another try with the whole
40055    # argument.
40056    path="$complete"
40057    arguments="EOL"
40058    new_path="$path"
40059
40060  windows_path="$new_path"
40061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40062    unix_path=`$CYGPATH -u "$windows_path"`
40063    new_path="$unix_path"
40064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40066    new_path="$unix_path"
40067  fi
40068
40069
40070    new_path=`$WHICH "$new_path" 2> /dev/null`
40071    # bat and cmd files are not always considered executable in MSYS causing which
40072    # to not find them
40073    if test "x$new_path" = x \
40074        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40075        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40076      new_path="$path"
40077
40078  windows_path="$new_path"
40079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40080    unix_path=`$CYGPATH -u "$windows_path"`
40081    new_path="$unix_path"
40082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40084    new_path="$unix_path"
40085  fi
40086
40087    fi
40088
40089    if test "x$new_path" = x; then
40090      # It's still not found. Now this is an unrecoverable error.
40091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40092$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40093      has_space=`$ECHO "$complete" | $GREP " "`
40094      if test "x$has_space" != x; then
40095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40097      fi
40098      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40099    fi
40100  fi
40101
40102  # Now new_path has a complete unix path to the binary
40103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40104    # Keep paths in /bin as-is, but remove trailing .exe if any
40105    new_path="${new_path/%.exe/}"
40106    # Do not save /bin paths to all_fixpath_prefixes!
40107  else
40108    # Not in mixed or Windows style, start by that.
40109    new_path=`cmd //c echo $new_path`
40110
40111  input_path="$new_path"
40112  # Check if we need to convert this using DOS-style short mode. If the path
40113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40114  # take no chances and rewrite it.
40115  # Note: m4 eats our [], so we need to use [ and ] instead.
40116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40117  if test "x$has_forbidden_chars" != x; then
40118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40120  fi
40121
40122    # Output is in $new_path
40123
40124  windows_path="$new_path"
40125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40126    unix_path=`$CYGPATH -u "$windows_path"`
40127    new_path="$unix_path"
40128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40130    new_path="$unix_path"
40131  fi
40132
40133    # remove trailing .exe if any
40134    new_path="${new_path/%.exe/}"
40135
40136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40138  fi
40139
40140  else
40141    # We're on a unix platform. Hooray! :)
40142    # First separate the path from the arguments. This will split at the first
40143    # space.
40144    complete="$BUILD_CXX"
40145    path="${complete%% *}"
40146    tmp="$complete EOL"
40147    arguments="${tmp#* }"
40148
40149    # Cannot rely on the command "which" here since it doesn't always work.
40150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40151    if test -z "$is_absolute_path"; then
40152      # Path to executable is not absolute. Find it.
40153      IFS_save="$IFS"
40154      IFS=:
40155      for p in $PATH; do
40156        if test -f "$p/$path" && test -x "$p/$path"; then
40157          new_path="$p/$path"
40158          break
40159        fi
40160      done
40161      IFS="$IFS_save"
40162    else
40163      # This is an absolute path, we can use it without further modifications.
40164      new_path="$path"
40165    fi
40166
40167    if test "x$new_path" = x; then
40168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40169$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40170      has_space=`$ECHO "$complete" | $GREP " "`
40171      if test "x$has_space" != x; then
40172        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40173$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40174      fi
40175      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40176    fi
40177  fi
40178
40179  # Now join together the path and the arguments once again
40180  if test "x$arguments" != xEOL; then
40181    new_complete="$new_path ${arguments% *}"
40182  else
40183    new_complete="$new_path"
40184  fi
40185
40186  if test "x$complete" != "x$new_complete"; then
40187    BUILD_CXX="$new_complete"
40188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40189$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40190  fi
40191
40192
40193
40194  # Publish this variable in the help.
40195
40196
40197  if test "x$BUILD_LD" = x; then
40198    # The variable is not set by user, try to locate tool using the code snippet
40199    for ac_prog in ld
40200do
40201  # Extract the first word of "$ac_prog", so it can be a program name with args.
40202set dummy $ac_prog; ac_word=$2
40203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40204$as_echo_n "checking for $ac_word... " >&6; }
40205if ${ac_cv_path_BUILD_LD+:} false; then :
40206  $as_echo_n "(cached) " >&6
40207else
40208  case $BUILD_LD in
40209  [\\/]* | ?:[\\/]*)
40210  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40211  ;;
40212  *)
40213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40214for as_dir in $PATH
40215do
40216  IFS=$as_save_IFS
40217  test -z "$as_dir" && as_dir=.
40218    for ac_exec_ext in '' $ac_executable_extensions; do
40219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40220    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40222    break 2
40223  fi
40224done
40225  done
40226IFS=$as_save_IFS
40227
40228  ;;
40229esac
40230fi
40231BUILD_LD=$ac_cv_path_BUILD_LD
40232if test -n "$BUILD_LD"; then
40233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40234$as_echo "$BUILD_LD" >&6; }
40235else
40236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40237$as_echo "no" >&6; }
40238fi
40239
40240
40241  test -n "$BUILD_LD" && break
40242done
40243
40244  else
40245    # The variable is set, but is it from the command line or the environment?
40246
40247    # Try to remove the string !BUILD_LD! from our list.
40248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40250      # If it failed, the variable was not from the command line. Ignore it,
40251      # but warn the user (except for BASH, which is always set by the calling BASH).
40252      if test "xBUILD_LD" != xBASH; then
40253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40254$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40255      fi
40256      # Try to locate tool using the code snippet
40257      for ac_prog in ld
40258do
40259  # Extract the first word of "$ac_prog", so it can be a program name with args.
40260set dummy $ac_prog; ac_word=$2
40261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40262$as_echo_n "checking for $ac_word... " >&6; }
40263if ${ac_cv_path_BUILD_LD+:} false; then :
40264  $as_echo_n "(cached) " >&6
40265else
40266  case $BUILD_LD in
40267  [\\/]* | ?:[\\/]*)
40268  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40269  ;;
40270  *)
40271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40272for as_dir in $PATH
40273do
40274  IFS=$as_save_IFS
40275  test -z "$as_dir" && as_dir=.
40276    for ac_exec_ext in '' $ac_executable_extensions; do
40277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40278    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40280    break 2
40281  fi
40282done
40283  done
40284IFS=$as_save_IFS
40285
40286  ;;
40287esac
40288fi
40289BUILD_LD=$ac_cv_path_BUILD_LD
40290if test -n "$BUILD_LD"; then
40291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40292$as_echo "$BUILD_LD" >&6; }
40293else
40294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40295$as_echo "no" >&6; }
40296fi
40297
40298
40299  test -n "$BUILD_LD" && break
40300done
40301
40302    else
40303      # If it succeeded, then it was overridden by the user. We will use it
40304      # for the tool.
40305
40306      # First remove it from the list of overridden variables, so we can test
40307      # for unknown variables in the end.
40308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40309
40310      # Check if the provided tool contains a complete path.
40311      tool_specified="$BUILD_LD"
40312      tool_basename="${tool_specified##*/}"
40313      if test "x$tool_basename" = "x$tool_specified"; then
40314        # A command without a complete path is provided, search $PATH.
40315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40316$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40317        # Extract the first word of "$tool_basename", so it can be a program name with args.
40318set dummy $tool_basename; ac_word=$2
40319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40320$as_echo_n "checking for $ac_word... " >&6; }
40321if ${ac_cv_path_BUILD_LD+:} false; then :
40322  $as_echo_n "(cached) " >&6
40323else
40324  case $BUILD_LD in
40325  [\\/]* | ?:[\\/]*)
40326  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40327  ;;
40328  *)
40329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40330for as_dir in $PATH
40331do
40332  IFS=$as_save_IFS
40333  test -z "$as_dir" && as_dir=.
40334    for ac_exec_ext in '' $ac_executable_extensions; do
40335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40336    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40338    break 2
40339  fi
40340done
40341  done
40342IFS=$as_save_IFS
40343
40344  ;;
40345esac
40346fi
40347BUILD_LD=$ac_cv_path_BUILD_LD
40348if test -n "$BUILD_LD"; then
40349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40350$as_echo "$BUILD_LD" >&6; }
40351else
40352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40353$as_echo "no" >&6; }
40354fi
40355
40356
40357        if test "x$BUILD_LD" = x; then
40358          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40359        fi
40360      else
40361        # Otherwise we believe it is a complete path. Use it as it is.
40362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40363$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40365$as_echo_n "checking for BUILD_LD... " >&6; }
40366        if test ! -x "$tool_specified"; then
40367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40368$as_echo "not found" >&6; }
40369          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40370        fi
40371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40372$as_echo "$tool_specified" >&6; }
40373      fi
40374    fi
40375  fi
40376
40377
40378
40379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40380
40381  # First separate the path from the arguments. This will split at the first
40382  # space.
40383  complete="$BUILD_LD"
40384  path="${complete%% *}"
40385  tmp="$complete EOL"
40386  arguments="${tmp#* }"
40387
40388  # Input might be given as Windows format, start by converting to
40389  # unix format.
40390  new_path=`$CYGPATH -u "$path"`
40391
40392  # Now try to locate executable using which
40393  new_path=`$WHICH "$new_path" 2> /dev/null`
40394  # bat and cmd files are not always considered executable in cygwin causing which
40395  # to not find them
40396  if test "x$new_path" = x \
40397      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40398      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40399    new_path=`$CYGPATH -u "$path"`
40400  fi
40401  if test "x$new_path" = x; then
40402    # Oops. Which didn't find the executable.
40403    # The splitting of arguments from the executable at a space might have been incorrect,
40404    # since paths with space are more likely in Windows. Give it another try with the whole
40405    # argument.
40406    path="$complete"
40407    arguments="EOL"
40408    new_path=`$CYGPATH -u "$path"`
40409    new_path=`$WHICH "$new_path" 2> /dev/null`
40410    # bat and cmd files are not always considered executable in cygwin causing which
40411    # to not find them
40412    if test "x$new_path" = x \
40413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40415      new_path=`$CYGPATH -u "$path"`
40416    fi
40417    if test "x$new_path" = x; then
40418      # It's still not found. Now this is an unrecoverable error.
40419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40420$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40421      has_space=`$ECHO "$complete" | $GREP " "`
40422      if test "x$has_space" != x; then
40423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40425      fi
40426      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40427    fi
40428  fi
40429
40430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40433  # "foo.exe" is OK but "foo" is an error.
40434  #
40435  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40436  # It is also a way to make sure we got the proper file name for the real test later on.
40437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40438  if test "x$test_shortpath" = x; then
40439    # Short path failed, file does not exist as specified.
40440    # Try adding .exe or .cmd
40441    if test -f "${new_path}.exe"; then
40442      input_to_shortpath="${new_path}.exe"
40443    elif test -f "${new_path}.cmd"; then
40444      input_to_shortpath="${new_path}.cmd"
40445    else
40446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40447$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40448      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40449$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40450      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40451    fi
40452  else
40453    input_to_shortpath="$new_path"
40454  fi
40455
40456  # Call helper function which possibly converts this using DOS-style short mode.
40457  # If so, the updated path is stored in $new_path.
40458  new_path="$input_to_shortpath"
40459
40460  input_path="$input_to_shortpath"
40461  # Check if we need to convert this using DOS-style short mode. If the path
40462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40463  # take no chances and rewrite it.
40464  # Note: m4 eats our [], so we need to use [ and ] instead.
40465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40466  if test "x$has_forbidden_chars" != x; then
40467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40471      # Going to short mode and back again did indeed matter. Since short mode is
40472      # case insensitive, let's make it lowercase to improve readability.
40473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40474      # Now convert it back to Unix-stile (cygpath)
40475      input_path=`$CYGPATH -u "$shortmode_path"`
40476      new_path="$input_path"
40477    fi
40478  fi
40479
40480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40481  if test "x$test_cygdrive_prefix" = x; then
40482    # As a simple fix, exclude /usr/bin since it's not a real path.
40483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40485      # a path prefixed by /cygdrive for fixpath to work.
40486      new_path="$CYGWIN_ROOT_PATH$input_path"
40487    fi
40488  fi
40489
40490  # remove trailing .exe if any
40491  new_path="${new_path/%.exe/}"
40492
40493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40494
40495  # First separate the path from the arguments. This will split at the first
40496  # space.
40497  complete="$BUILD_LD"
40498  path="${complete%% *}"
40499  tmp="$complete EOL"
40500  arguments="${tmp#* }"
40501
40502  # Input might be given as Windows format, start by converting to
40503  # unix format.
40504  new_path="$path"
40505
40506  windows_path="$new_path"
40507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40508    unix_path=`$CYGPATH -u "$windows_path"`
40509    new_path="$unix_path"
40510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40512    new_path="$unix_path"
40513  fi
40514
40515
40516  # Now try to locate executable using which
40517  new_path=`$WHICH "$new_path" 2> /dev/null`
40518
40519  if test "x$new_path" = x; then
40520    # Oops. Which didn't find the executable.
40521    # The splitting of arguments from the executable at a space might have been incorrect,
40522    # since paths with space are more likely in Windows. Give it another try with the whole
40523    # argument.
40524    path="$complete"
40525    arguments="EOL"
40526    new_path="$path"
40527
40528  windows_path="$new_path"
40529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40530    unix_path=`$CYGPATH -u "$windows_path"`
40531    new_path="$unix_path"
40532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40534    new_path="$unix_path"
40535  fi
40536
40537
40538    new_path=`$WHICH "$new_path" 2> /dev/null`
40539    # bat and cmd files are not always considered executable in MSYS causing which
40540    # to not find them
40541    if test "x$new_path" = x \
40542        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40543        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40544      new_path="$path"
40545
40546  windows_path="$new_path"
40547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40548    unix_path=`$CYGPATH -u "$windows_path"`
40549    new_path="$unix_path"
40550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40552    new_path="$unix_path"
40553  fi
40554
40555    fi
40556
40557    if test "x$new_path" = x; then
40558      # It's still not found. Now this is an unrecoverable error.
40559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40560$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40561      has_space=`$ECHO "$complete" | $GREP " "`
40562      if test "x$has_space" != x; then
40563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40565      fi
40566      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40567    fi
40568  fi
40569
40570  # Now new_path has a complete unix path to the binary
40571  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40572    # Keep paths in /bin as-is, but remove trailing .exe if any
40573    new_path="${new_path/%.exe/}"
40574    # Do not save /bin paths to all_fixpath_prefixes!
40575  else
40576    # Not in mixed or Windows style, start by that.
40577    new_path=`cmd //c echo $new_path`
40578
40579  input_path="$new_path"
40580  # Check if we need to convert this using DOS-style short mode. If the path
40581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40582  # take no chances and rewrite it.
40583  # Note: m4 eats our [], so we need to use [ and ] instead.
40584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40585  if test "x$has_forbidden_chars" != x; then
40586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40588  fi
40589
40590    # Output is in $new_path
40591
40592  windows_path="$new_path"
40593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40594    unix_path=`$CYGPATH -u "$windows_path"`
40595    new_path="$unix_path"
40596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40598    new_path="$unix_path"
40599  fi
40600
40601    # remove trailing .exe if any
40602    new_path="${new_path/%.exe/}"
40603
40604    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40605    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40606  fi
40607
40608  else
40609    # We're on a unix platform. Hooray! :)
40610    # First separate the path from the arguments. This will split at the first
40611    # space.
40612    complete="$BUILD_LD"
40613    path="${complete%% *}"
40614    tmp="$complete EOL"
40615    arguments="${tmp#* }"
40616
40617    # Cannot rely on the command "which" here since it doesn't always work.
40618    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40619    if test -z "$is_absolute_path"; then
40620      # Path to executable is not absolute. Find it.
40621      IFS_save="$IFS"
40622      IFS=:
40623      for p in $PATH; do
40624        if test -f "$p/$path" && test -x "$p/$path"; then
40625          new_path="$p/$path"
40626          break
40627        fi
40628      done
40629      IFS="$IFS_save"
40630    else
40631      # This is an absolute path, we can use it without further modifications.
40632      new_path="$path"
40633    fi
40634
40635    if test "x$new_path" = x; then
40636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40637$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40638      has_space=`$ECHO "$complete" | $GREP " "`
40639      if test "x$has_space" != x; then
40640        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40641$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40642      fi
40643      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40644    fi
40645  fi
40646
40647  # Now join together the path and the arguments once again
40648  if test "x$arguments" != xEOL; then
40649    new_complete="$new_path ${arguments% *}"
40650  else
40651    new_complete="$new_path"
40652  fi
40653
40654  if test "x$complete" != "x$new_complete"; then
40655    BUILD_LD="$new_complete"
40656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40657$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40658  fi
40659
40660  else
40661    # If we are not cross compiling, use the normal target compilers for
40662    # building the build platform executables.
40663    BUILD_CC="$CC"
40664    BUILD_CXX="$CXX"
40665    BUILD_LD="$LD"
40666  fi
40667
40668
40669
40670
40671
40672
40673  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40674    # For hotspot, we need these in Windows mixed path,
40675    # so rewrite them all. Need added .exe suffix.
40676    HOTSPOT_CXX="$CXX.exe"
40677    HOTSPOT_LD="$LD.exe"
40678    HOTSPOT_MT="$MT.exe"
40679    HOTSPOT_RC="$RC.exe"
40680
40681  unix_path="$HOTSPOT_CXX"
40682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40683    windows_path=`$CYGPATH -m "$unix_path"`
40684    HOTSPOT_CXX="$windows_path"
40685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40686    windows_path=`cmd //c echo $unix_path`
40687    HOTSPOT_CXX="$windows_path"
40688  fi
40689
40690
40691  unix_path="$HOTSPOT_LD"
40692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40693    windows_path=`$CYGPATH -m "$unix_path"`
40694    HOTSPOT_LD="$windows_path"
40695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40696    windows_path=`cmd //c echo $unix_path`
40697    HOTSPOT_LD="$windows_path"
40698  fi
40699
40700
40701  unix_path="$HOTSPOT_MT"
40702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40703    windows_path=`$CYGPATH -m "$unix_path"`
40704    HOTSPOT_MT="$windows_path"
40705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40706    windows_path=`cmd //c echo $unix_path`
40707    HOTSPOT_MT="$windows_path"
40708  fi
40709
40710
40711  unix_path="$HOTSPOT_RC"
40712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40713    windows_path=`$CYGPATH -m "$unix_path"`
40714    HOTSPOT_RC="$windows_path"
40715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40716    windows_path=`cmd //c echo $unix_path`
40717    HOTSPOT_RC="$windows_path"
40718  fi
40719
40720
40721
40722  else
40723    HOTSPOT_CXX="$CXX"
40724    HOTSPOT_LD="$LD"
40725  fi
40726
40727
40728
40729  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40730    USE_CLANG=true
40731  fi
40732
40733
40734  # LDEXE is the linker to use, when creating executables. Not really used.
40735  # FIXME: These should just be removed!
40736  LDEXE="$LD"
40737  LDEXECXX="$LDCXX"
40738
40739
40740
40741
40742
40743
40744  # The package path is used only on macosx?
40745  # FIXME: clean this up, and/or move it elsewhere.
40746  PACKAGE_PATH=/opt/local
40747
40748
40749  # Check for extra potential brokenness.
40750  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40751    # On Windows, double-check that we got the right compiler.
40752    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40753    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40754    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40755      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40756        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40757      fi
40758    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40759      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40760        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40761      fi
40762    fi
40763  fi
40764
40765  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40766    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40767    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40768    # This is later checked when setting flags.
40769
40770    # "-Og" suppported for GCC 4.8 and later
40771    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40772
40773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40774$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40775  supports=yes
40776
40777  saved_cflags="$CFLAGS"
40778  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40779  ac_ext=c
40780ac_cpp='$CPP $CPPFLAGS'
40781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40783ac_compiler_gnu=$ac_cv_c_compiler_gnu
40784
40785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40786/* end confdefs.h.  */
40787int i;
40788_ACEOF
40789if ac_fn_c_try_compile "$LINENO"; then :
40790
40791else
40792  supports=no
40793fi
40794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40795  ac_ext=cpp
40796ac_cpp='$CXXCPP $CPPFLAGS'
40797ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40798ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40799ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40800
40801  CFLAGS="$saved_cflags"
40802
40803  saved_cxxflags="$CXXFLAGS"
40804  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40805  ac_ext=cpp
40806ac_cpp='$CXXCPP $CPPFLAGS'
40807ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40808ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40809ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40810
40811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40812/* end confdefs.h.  */
40813int i;
40814_ACEOF
40815if ac_fn_cxx_try_compile "$LINENO"; then :
40816
40817else
40818  supports=no
40819fi
40820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40821  ac_ext=cpp
40822ac_cpp='$CXXCPP $CPPFLAGS'
40823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40826
40827  CXXFLAGS="$saved_cxxflags"
40828
40829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40830$as_echo "$supports" >&6; }
40831  if test "x$supports" = "xyes" ; then
40832    HAS_CFLAG_OPTIMIZE_DEBUG=true
40833  else
40834    HAS_CFLAG_OPTIMIZE_DEBUG=false
40835  fi
40836
40837
40838    # "-z relro" supported in GNU binutils 2.17 and later
40839    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40840
40841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40842$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40843  supports=yes
40844
40845  saved_ldflags="$LDFLAGS"
40846  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40847  ac_ext=c
40848ac_cpp='$CPP $CPPFLAGS'
40849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40851ac_compiler_gnu=$ac_cv_c_compiler_gnu
40852
40853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40854/* end confdefs.h.  */
40855
40856int
40857main ()
40858{
40859
40860  ;
40861  return 0;
40862}
40863_ACEOF
40864if ac_fn_c_try_link "$LINENO"; then :
40865
40866else
40867  supports=no
40868fi
40869rm -f core conftest.err conftest.$ac_objext \
40870    conftest$ac_exeext conftest.$ac_ext
40871  ac_ext=cpp
40872ac_cpp='$CXXCPP $CPPFLAGS'
40873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40876
40877  LDFLAGS="$saved_ldflags"
40878
40879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40880$as_echo "$supports" >&6; }
40881  if test "x$supports" = "xyes" ; then
40882    HAS_LINKER_RELRO=true
40883  else
40884    HAS_LINKER_RELRO=false
40885  fi
40886
40887
40888    # "-z now" supported in GNU binutils 2.11 and later
40889    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40890
40891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40892$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40893  supports=yes
40894
40895  saved_ldflags="$LDFLAGS"
40896  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40897  ac_ext=c
40898ac_cpp='$CPP $CPPFLAGS'
40899ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40900ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40901ac_compiler_gnu=$ac_cv_c_compiler_gnu
40902
40903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40904/* end confdefs.h.  */
40905
40906int
40907main ()
40908{
40909
40910  ;
40911  return 0;
40912}
40913_ACEOF
40914if ac_fn_c_try_link "$LINENO"; then :
40915
40916else
40917  supports=no
40918fi
40919rm -f core conftest.err conftest.$ac_objext \
40920    conftest$ac_exeext conftest.$ac_ext
40921  ac_ext=cpp
40922ac_cpp='$CXXCPP $CPPFLAGS'
40923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40926
40927  LDFLAGS="$saved_ldflags"
40928
40929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40930$as_echo "$supports" >&6; }
40931  if test "x$supports" = "xyes" ; then
40932    HAS_LINKER_NOW=true
40933  else
40934    HAS_LINKER_NOW=false
40935  fi
40936
40937  fi
40938
40939  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40940  # in executable.'
40941  USING_BROKEN_SUSE_LD=no
40942  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40944$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40945    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40946    $ECHO "int main() { }" > main.c
40947    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40949$as_echo "no" >&6; }
40950      USING_BROKEN_SUSE_LD=no
40951    else
40952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40953$as_echo "yes" >&6; }
40954      USING_BROKEN_SUSE_LD=yes
40955    fi
40956    rm -rf version-script.map main.c a.out
40957  fi
40958
40959
40960
40961# Setup the JTReg Regression Test Harness.
40962
40963
40964# Check whether --with-jtreg was given.
40965if test "${with_jtreg+set}" = set; then :
40966  withval=$with_jtreg;
40967else
40968  with_jtreg=no
40969fi
40970
40971
40972  if test "x$with_jtreg" = xno; then
40973    # jtreg disabled
40974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40975$as_echo_n "checking for jtreg... " >&6; }
40976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40977$as_echo "no" >&6; }
40978  else
40979    if test "x$with_jtreg" != xyes; then
40980      # with path specified.
40981      JT_HOME="$with_jtreg"
40982    fi
40983
40984    if test "x$JT_HOME" != x; then
40985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40986$as_echo_n "checking for jtreg... " >&6; }
40987
40988      # use JT_HOME enviroment var.
40989
40990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40991
40992  # Input might be given as Windows format, start by converting to
40993  # unix format.
40994  path="$JT_HOME"
40995  new_path=`$CYGPATH -u "$path"`
40996
40997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41000  # "foo.exe" is OK but "foo" is an error.
41001  #
41002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41003  # It is also a way to make sure we got the proper file name for the real test later on.
41004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41005  if test "x$test_shortpath" = x; then
41006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41007$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41008    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41009  fi
41010
41011  # Call helper function which possibly converts this using DOS-style short mode.
41012  # If so, the updated path is stored in $new_path.
41013
41014  input_path="$new_path"
41015  # Check if we need to convert this using DOS-style short mode. If the path
41016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41017  # take no chances and rewrite it.
41018  # Note: m4 eats our [], so we need to use [ and ] instead.
41019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41020  if test "x$has_forbidden_chars" != x; then
41021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41025      # Going to short mode and back again did indeed matter. Since short mode is
41026      # case insensitive, let's make it lowercase to improve readability.
41027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41028      # Now convert it back to Unix-stile (cygpath)
41029      input_path=`$CYGPATH -u "$shortmode_path"`
41030      new_path="$input_path"
41031    fi
41032  fi
41033
41034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41035  if test "x$test_cygdrive_prefix" = x; then
41036    # As a simple fix, exclude /usr/bin since it's not a real path.
41037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41039      # a path prefixed by /cygdrive for fixpath to work.
41040      new_path="$CYGWIN_ROOT_PATH$input_path"
41041    fi
41042  fi
41043
41044
41045  if test "x$path" != "x$new_path"; then
41046    JT_HOME="$new_path"
41047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41048$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41049  fi
41050
41051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41052
41053  path="$JT_HOME"
41054  has_colon=`$ECHO $path | $GREP ^.:`
41055  new_path="$path"
41056  if test "x$has_colon" = x; then
41057    # Not in mixed or Windows style, start by that.
41058    new_path=`cmd //c echo $path`
41059  fi
41060
41061
41062  input_path="$new_path"
41063  # Check if we need to convert this using DOS-style short mode. If the path
41064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41065  # take no chances and rewrite it.
41066  # Note: m4 eats our [], so we need to use [ and ] instead.
41067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41068  if test "x$has_forbidden_chars" != x; then
41069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41071  fi
41072
41073
41074  windows_path="$new_path"
41075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41076    unix_path=`$CYGPATH -u "$windows_path"`
41077    new_path="$unix_path"
41078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41080    new_path="$unix_path"
41081  fi
41082
41083  if test "x$path" != "x$new_path"; then
41084    JT_HOME="$new_path"
41085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41086$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41087  fi
41088
41089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41091
41092  else
41093    # We're on a unix platform. Hooray! :)
41094    path="$JT_HOME"
41095    has_space=`$ECHO "$path" | $GREP " "`
41096    if test "x$has_space" != x; then
41097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41098$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41100    fi
41101
41102    # Use eval to expand a potential ~
41103    eval path="$path"
41104    if test ! -f "$path" && test ! -d "$path"; then
41105      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41106    fi
41107
41108    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41109  fi
41110
41111
41112      # jtreg win32 script works for everybody
41113      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41114
41115      if test ! -f "$JTREGEXE"; then
41116        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41117      fi
41118
41119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41120$as_echo "$JTREGEXE" >&6; }
41121    else
41122      # try to find jtreg on path
41123
41124
41125
41126  # Publish this variable in the help.
41127
41128
41129  if test "x$JTREGEXE" = x; then
41130    # The variable is not set by user, try to locate tool using the code snippet
41131    for ac_prog in jtreg
41132do
41133  # Extract the first word of "$ac_prog", so it can be a program name with args.
41134set dummy $ac_prog; ac_word=$2
41135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41136$as_echo_n "checking for $ac_word... " >&6; }
41137if ${ac_cv_path_JTREGEXE+:} false; then :
41138  $as_echo_n "(cached) " >&6
41139else
41140  case $JTREGEXE in
41141  [\\/]* | ?:[\\/]*)
41142  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41143  ;;
41144  *)
41145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41146for as_dir in $PATH
41147do
41148  IFS=$as_save_IFS
41149  test -z "$as_dir" && as_dir=.
41150    for ac_exec_ext in '' $ac_executable_extensions; do
41151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41152    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41154    break 2
41155  fi
41156done
41157  done
41158IFS=$as_save_IFS
41159
41160  ;;
41161esac
41162fi
41163JTREGEXE=$ac_cv_path_JTREGEXE
41164if test -n "$JTREGEXE"; then
41165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41166$as_echo "$JTREGEXE" >&6; }
41167else
41168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41169$as_echo "no" >&6; }
41170fi
41171
41172
41173  test -n "$JTREGEXE" && break
41174done
41175
41176  else
41177    # The variable is set, but is it from the command line or the environment?
41178
41179    # Try to remove the string !JTREGEXE! from our list.
41180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41182      # If it failed, the variable was not from the command line. Ignore it,
41183      # but warn the user (except for BASH, which is always set by the calling BASH).
41184      if test "xJTREGEXE" != xBASH; then
41185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41186$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41187      fi
41188      # Try to locate tool using the code snippet
41189      for ac_prog in jtreg
41190do
41191  # Extract the first word of "$ac_prog", so it can be a program name with args.
41192set dummy $ac_prog; ac_word=$2
41193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41194$as_echo_n "checking for $ac_word... " >&6; }
41195if ${ac_cv_path_JTREGEXE+:} false; then :
41196  $as_echo_n "(cached) " >&6
41197else
41198  case $JTREGEXE in
41199  [\\/]* | ?:[\\/]*)
41200  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41201  ;;
41202  *)
41203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41204for as_dir in $PATH
41205do
41206  IFS=$as_save_IFS
41207  test -z "$as_dir" && as_dir=.
41208    for ac_exec_ext in '' $ac_executable_extensions; do
41209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41210    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41212    break 2
41213  fi
41214done
41215  done
41216IFS=$as_save_IFS
41217
41218  ;;
41219esac
41220fi
41221JTREGEXE=$ac_cv_path_JTREGEXE
41222if test -n "$JTREGEXE"; then
41223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41224$as_echo "$JTREGEXE" >&6; }
41225else
41226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41227$as_echo "no" >&6; }
41228fi
41229
41230
41231  test -n "$JTREGEXE" && break
41232done
41233
41234    else
41235      # If it succeeded, then it was overridden by the user. We will use it
41236      # for the tool.
41237
41238      # First remove it from the list of overridden variables, so we can test
41239      # for unknown variables in the end.
41240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41241
41242      # Check if the provided tool contains a complete path.
41243      tool_specified="$JTREGEXE"
41244      tool_basename="${tool_specified##*/}"
41245      if test "x$tool_basename" = "x$tool_specified"; then
41246        # A command without a complete path is provided, search $PATH.
41247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41248$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41249        # Extract the first word of "$tool_basename", so it can be a program name with args.
41250set dummy $tool_basename; ac_word=$2
41251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41252$as_echo_n "checking for $ac_word... " >&6; }
41253if ${ac_cv_path_JTREGEXE+:} false; then :
41254  $as_echo_n "(cached) " >&6
41255else
41256  case $JTREGEXE in
41257  [\\/]* | ?:[\\/]*)
41258  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41259  ;;
41260  *)
41261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41262for as_dir in $PATH
41263do
41264  IFS=$as_save_IFS
41265  test -z "$as_dir" && as_dir=.
41266    for ac_exec_ext in '' $ac_executable_extensions; do
41267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41268    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41270    break 2
41271  fi
41272done
41273  done
41274IFS=$as_save_IFS
41275
41276  ;;
41277esac
41278fi
41279JTREGEXE=$ac_cv_path_JTREGEXE
41280if test -n "$JTREGEXE"; then
41281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41282$as_echo "$JTREGEXE" >&6; }
41283else
41284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41285$as_echo "no" >&6; }
41286fi
41287
41288
41289        if test "x$JTREGEXE" = x; then
41290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41291        fi
41292      else
41293        # Otherwise we believe it is a complete path. Use it as it is.
41294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41295$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41297$as_echo_n "checking for JTREGEXE... " >&6; }
41298        if test ! -x "$tool_specified"; then
41299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41300$as_echo "not found" >&6; }
41301          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41302        fi
41303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41304$as_echo "$tool_specified" >&6; }
41305      fi
41306    fi
41307  fi
41308
41309
41310
41311  if test "x$JTREGEXE" = x; then
41312    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41313  fi
41314
41315
41316      JT_HOME="`$DIRNAME $JTREGEXE`"
41317    fi
41318  fi
41319
41320
41321
41322
41323
41324
41325  # Option used to tell the compiler whether to create 32- or 64-bit executables
41326  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41327    COMPILER_TARGET_BITS_FLAG="-q"
41328  else
41329    COMPILER_TARGET_BITS_FLAG="-m"
41330  fi
41331
41332
41333  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41334  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41335    ARFLAGS="-r"
41336  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41337    ARFLAGS="-X64"
41338  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41339    # lib.exe is used as AR to create static libraries.
41340    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41341  else
41342    ARFLAGS=""
41343  fi
41344
41345
41346  ## Setup strip.
41347  # FIXME: should this really be per platform, or should it be per toolchain type?
41348  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41349  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41350  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41351    STRIPFLAGS="-g"
41352  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41353    STRIPFLAGS="-x"
41354  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41355    STRIPFLAGS="-S"
41356  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41357    STRIPFLAGS="-X32_64"
41358  fi
41359
41360  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41361    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41362  fi
41363
41364
41365  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41366    # FIXME: break out into MCSFLAGS
41367    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41368  fi
41369
41370
41371  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41372    CC_OUT_OPTION=-Fo
41373    EXE_OUT_OPTION=-out:
41374    LD_OUT_OPTION=-out:
41375    AR_OUT_OPTION=-out:
41376  else
41377    # The option used to specify the target .o,.a or .so file.
41378    # When compiling, how to specify the to be created object file.
41379    CC_OUT_OPTION='-o$(SPACE)'
41380    # When linking, how to specify the to be created executable.
41381    EXE_OUT_OPTION='-o$(SPACE)'
41382    # When linking, how to specify the to be created dynamically linkable library.
41383    LD_OUT_OPTION='-o$(SPACE)'
41384    # When archiving, how to specify the to be create static archive for object files.
41385    AR_OUT_OPTION='rcs$(SPACE)'
41386  fi
41387
41388
41389
41390
41391
41392  # On Windows, we need to set RC flags.
41393  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41394    RC_FLAGS="-nologo -l0x409"
41395    if test "x$VARIANT" = xOPT; then
41396      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41397    fi
41398
41399    # The version variables used to create RC_FLAGS may be overridden
41400    # in a custom configure script, or possibly the command line.
41401    # Let those variables be expanded at make time in spec.gmk.
41402    # The \$ are escaped to the shell, and the $(...) variables
41403    # are evaluated by make.
41404    RC_FLAGS="$RC_FLAGS \
41405        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41406        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41407        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41408        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41409        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41410        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41411        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41412  fi
41413
41414
41415  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41416    # silence copyright notice and other headers.
41417    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41418  fi
41419
41420  if test "x$SYSROOT" != "x"; then
41421    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41422      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41423        # Solaris Studio does not have a concept of sysroot. Instead we must
41424        # make sure the default include and lib dirs are appended to each
41425        # compile and link command line.
41426        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41427        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41428            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41429            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41430      fi
41431    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41432      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41433      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41434      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41435    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41436      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41437      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41438    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41439      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41440      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41441    fi
41442    # Propagate the sysroot args to hotspot
41443    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41444    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41445    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41446  fi
41447
41448  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41449  # set this here so it doesn't have to be peppered throughout the forest
41450  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41451    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41452    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41453  fi
41454
41455
41456
41457
41458
41459# FIXME: Currently we must test this after toolchain but before flags. Fix!
41460
41461# Now we can test some aspects on the target using configure macros.
41462
41463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41464$as_echo_n "checking for ANSI C header files... " >&6; }
41465if ${ac_cv_header_stdc+:} false; then :
41466  $as_echo_n "(cached) " >&6
41467else
41468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41469/* end confdefs.h.  */
41470#include <stdlib.h>
41471#include <stdarg.h>
41472#include <string.h>
41473#include <float.h>
41474
41475int
41476main ()
41477{
41478
41479  ;
41480  return 0;
41481}
41482_ACEOF
41483if ac_fn_cxx_try_compile "$LINENO"; then :
41484  ac_cv_header_stdc=yes
41485else
41486  ac_cv_header_stdc=no
41487fi
41488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41489
41490if test $ac_cv_header_stdc = yes; then
41491  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41493/* end confdefs.h.  */
41494#include <string.h>
41495
41496_ACEOF
41497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41498  $EGREP "memchr" >/dev/null 2>&1; then :
41499
41500else
41501  ac_cv_header_stdc=no
41502fi
41503rm -f conftest*
41504
41505fi
41506
41507if test $ac_cv_header_stdc = yes; then
41508  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41510/* end confdefs.h.  */
41511#include <stdlib.h>
41512
41513_ACEOF
41514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41515  $EGREP "free" >/dev/null 2>&1; then :
41516
41517else
41518  ac_cv_header_stdc=no
41519fi
41520rm -f conftest*
41521
41522fi
41523
41524if test $ac_cv_header_stdc = yes; then
41525  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41526  if test "$cross_compiling" = yes; then :
41527  :
41528else
41529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41530/* end confdefs.h.  */
41531#include <ctype.h>
41532#include <stdlib.h>
41533#if ((' ' & 0x0FF) == 0x020)
41534# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41535# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41536#else
41537# define ISLOWER(c) \
41538		   (('a' <= (c) && (c) <= 'i') \
41539		     || ('j' <= (c) && (c) <= 'r') \
41540		     || ('s' <= (c) && (c) <= 'z'))
41541# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41542#endif
41543
41544#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41545int
41546main ()
41547{
41548  int i;
41549  for (i = 0; i < 256; i++)
41550    if (XOR (islower (i), ISLOWER (i))
41551	|| toupper (i) != TOUPPER (i))
41552      return 2;
41553  return 0;
41554}
41555_ACEOF
41556if ac_fn_cxx_try_run "$LINENO"; then :
41557
41558else
41559  ac_cv_header_stdc=no
41560fi
41561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41562  conftest.$ac_objext conftest.beam conftest.$ac_ext
41563fi
41564
41565fi
41566fi
41567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41568$as_echo "$ac_cv_header_stdc" >&6; }
41569if test $ac_cv_header_stdc = yes; then
41570
41571$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41572
41573fi
41574
41575# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41576for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41577		  inttypes.h stdint.h unistd.h
41578do :
41579  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41580ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41581"
41582if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41583  cat >>confdefs.h <<_ACEOF
41584#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41585_ACEOF
41586
41587fi
41588
41589done
41590
41591
41592
41593  ###############################################################################
41594  #
41595  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41596  # (The JVM can use 32 or 64 bit Java pointers but that decision
41597  # is made at runtime.)
41598  #
41599
41600  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41601    # Always specify -m flag on Solaris
41602    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41603
41604  # When we add flags to the "official" CFLAGS etc, we need to
41605  # keep track of these additions in ADDED_CFLAGS etc. These
41606  # will later be checked to make sure only controlled additions
41607  # have been made to CFLAGS etc.
41608  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41609  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41610  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41611
41612  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41613  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41614  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41615
41616  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41617  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41618  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41619
41620  elif test "x$COMPILE_TYPE" = xreduced; then
41621    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41622      # Specify -m if running reduced on unix platforms
41623
41624  # When we add flags to the "official" CFLAGS etc, we need to
41625  # keep track of these additions in ADDED_CFLAGS etc. These
41626  # will later be checked to make sure only controlled additions
41627  # have been made to CFLAGS etc.
41628  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41629  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41630  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41631
41632  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41633  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41634  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41635
41636  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41637  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41638  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41639
41640    fi
41641  fi
41642
41643  # Make compilation sanity check
41644  for ac_header in stdio.h
41645do :
41646  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41647if test "x$ac_cv_header_stdio_h" = xyes; then :
41648  cat >>confdefs.h <<_ACEOF
41649#define HAVE_STDIO_H 1
41650_ACEOF
41651
41652else
41653
41654    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41655$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41656    if test "x$COMPILE_TYPE" = xreduced; then
41657      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41658$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41659    elif test "x$COMPILE_TYPE" = xcross; then
41660      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41661$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41662    fi
41663    as_fn_error $? "Cannot continue." "$LINENO" 5
41664
41665fi
41666
41667done
41668
41669
41670  # The cast to long int works around a bug in the HP C Compiler
41671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41673# This bug is HP SR number 8606223364.
41674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41675$as_echo_n "checking size of int *... " >&6; }
41676if ${ac_cv_sizeof_int_p+:} false; then :
41677  $as_echo_n "(cached) " >&6
41678else
41679  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41680
41681else
41682  if test "$ac_cv_type_int_p" = yes; then
41683     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41685as_fn_error 77 "cannot compute sizeof (int *)
41686See \`config.log' for more details" "$LINENO" 5; }
41687   else
41688     ac_cv_sizeof_int_p=0
41689   fi
41690fi
41691
41692fi
41693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41694$as_echo "$ac_cv_sizeof_int_p" >&6; }
41695
41696
41697
41698cat >>confdefs.h <<_ACEOF
41699#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41700_ACEOF
41701
41702
41703
41704  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41705  if test "x$ac_cv_sizeof_int_p" = x; then
41706    # The test failed, lets stick to the assumed value.
41707    { $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
41708$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41709  else
41710    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41711
41712    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41713      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41714      # Let's try to implicitely set the compilers target architecture and retry the test
41715      { $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
41716$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;}
41717      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41718$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41719
41720  # When we add flags to the "official" CFLAGS etc, we need to
41721  # keep track of these additions in ADDED_CFLAGS etc. These
41722  # will later be checked to make sure only controlled additions
41723  # have been made to CFLAGS etc.
41724  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41725  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41726  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41727
41728  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41729  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41730  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41731
41732  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41733  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41734  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41735
41736
41737      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41738      unset ac_cv_sizeof_int_p
41739      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41740      cat >>confdefs.h <<_ACEOF
41741#undef SIZEOF_INT_P
41742_ACEOF
41743
41744      # The cast to long int works around a bug in the HP C Compiler
41745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41747# This bug is HP SR number 8606223364.
41748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41749$as_echo_n "checking size of int *... " >&6; }
41750if ${ac_cv_sizeof_int_p+:} false; then :
41751  $as_echo_n "(cached) " >&6
41752else
41753  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41754
41755else
41756  if test "$ac_cv_type_int_p" = yes; then
41757     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41759as_fn_error 77 "cannot compute sizeof (int *)
41760See \`config.log' for more details" "$LINENO" 5; }
41761   else
41762     ac_cv_sizeof_int_p=0
41763   fi
41764fi
41765
41766fi
41767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41768$as_echo "$ac_cv_sizeof_int_p" >&6; }
41769
41770
41771
41772cat >>confdefs.h <<_ACEOF
41773#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41774_ACEOF
41775
41776
41777
41778      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41779
41780      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41781        as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
41782      fi
41783    fi
41784  fi
41785
41786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41787$as_echo_n "checking for target address size... " >&6; }
41788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41789$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41790
41791
41792  ###############################################################################
41793  #
41794  # Is the target little of big endian?
41795  #
41796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41797$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41798if ${ac_cv_c_bigendian+:} false; then :
41799  $as_echo_n "(cached) " >&6
41800else
41801  ac_cv_c_bigendian=unknown
41802    # See if we're dealing with a universal compiler.
41803    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41804/* end confdefs.h.  */
41805#ifndef __APPLE_CC__
41806	       not a universal capable compiler
41807	     #endif
41808	     typedef int dummy;
41809
41810_ACEOF
41811if ac_fn_cxx_try_compile "$LINENO"; then :
41812
41813	# Check for potential -arch flags.  It is not universal unless
41814	# there are at least two -arch flags with different values.
41815	ac_arch=
41816	ac_prev=
41817	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41818	 if test -n "$ac_prev"; then
41819	   case $ac_word in
41820	     i?86 | x86_64 | ppc | ppc64)
41821	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41822		 ac_arch=$ac_word
41823	       else
41824		 ac_cv_c_bigendian=universal
41825		 break
41826	       fi
41827	       ;;
41828	   esac
41829	   ac_prev=
41830	 elif test "x$ac_word" = "x-arch"; then
41831	   ac_prev=arch
41832	 fi
41833       done
41834fi
41835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41836    if test $ac_cv_c_bigendian = unknown; then
41837      # See if sys/param.h defines the BYTE_ORDER macro.
41838      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41839/* end confdefs.h.  */
41840#include <sys/types.h>
41841	     #include <sys/param.h>
41842
41843int
41844main ()
41845{
41846#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41847		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41848		     && LITTLE_ENDIAN)
41849	      bogus endian macros
41850	     #endif
41851
41852  ;
41853  return 0;
41854}
41855_ACEOF
41856if ac_fn_cxx_try_compile "$LINENO"; then :
41857  # It does; now see whether it defined to BIG_ENDIAN or not.
41858	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41859/* end confdefs.h.  */
41860#include <sys/types.h>
41861		#include <sys/param.h>
41862
41863int
41864main ()
41865{
41866#if BYTE_ORDER != BIG_ENDIAN
41867		 not big endian
41868		#endif
41869
41870  ;
41871  return 0;
41872}
41873_ACEOF
41874if ac_fn_cxx_try_compile "$LINENO"; then :
41875  ac_cv_c_bigendian=yes
41876else
41877  ac_cv_c_bigendian=no
41878fi
41879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41880fi
41881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41882    fi
41883    if test $ac_cv_c_bigendian = unknown; then
41884      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41885      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41886/* end confdefs.h.  */
41887#include <limits.h>
41888
41889int
41890main ()
41891{
41892#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41893	      bogus endian macros
41894	     #endif
41895
41896  ;
41897  return 0;
41898}
41899_ACEOF
41900if ac_fn_cxx_try_compile "$LINENO"; then :
41901  # It does; now see whether it defined to _BIG_ENDIAN or not.
41902	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41903/* end confdefs.h.  */
41904#include <limits.h>
41905
41906int
41907main ()
41908{
41909#ifndef _BIG_ENDIAN
41910		 not big endian
41911		#endif
41912
41913  ;
41914  return 0;
41915}
41916_ACEOF
41917if ac_fn_cxx_try_compile "$LINENO"; then :
41918  ac_cv_c_bigendian=yes
41919else
41920  ac_cv_c_bigendian=no
41921fi
41922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41923fi
41924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41925    fi
41926    if test $ac_cv_c_bigendian = unknown; then
41927      # Compile a test program.
41928      if test "$cross_compiling" = yes; then :
41929  # Try to guess by grepping values from an object file.
41930	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41931/* end confdefs.h.  */
41932short int ascii_mm[] =
41933		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41934		short int ascii_ii[] =
41935		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41936		int use_ascii (int i) {
41937		  return ascii_mm[i] + ascii_ii[i];
41938		}
41939		short int ebcdic_ii[] =
41940		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41941		short int ebcdic_mm[] =
41942		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41943		int use_ebcdic (int i) {
41944		  return ebcdic_mm[i] + ebcdic_ii[i];
41945		}
41946		extern int foo;
41947
41948int
41949main ()
41950{
41951return use_ascii (foo) == use_ebcdic (foo);
41952  ;
41953  return 0;
41954}
41955_ACEOF
41956if ac_fn_cxx_try_compile "$LINENO"; then :
41957  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41958	      ac_cv_c_bigendian=yes
41959	    fi
41960	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41961	      if test "$ac_cv_c_bigendian" = unknown; then
41962		ac_cv_c_bigendian=no
41963	      else
41964		# finding both strings is unlikely to happen, but who knows?
41965		ac_cv_c_bigendian=unknown
41966	      fi
41967	    fi
41968fi
41969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41970else
41971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41972/* end confdefs.h.  */
41973$ac_includes_default
41974int
41975main ()
41976{
41977
41978	     /* Are we little or big endian?  From Harbison&Steele.  */
41979	     union
41980	     {
41981	       long int l;
41982	       char c[sizeof (long int)];
41983	     } u;
41984	     u.l = 1;
41985	     return u.c[sizeof (long int) - 1] == 1;
41986
41987  ;
41988  return 0;
41989}
41990_ACEOF
41991if ac_fn_cxx_try_run "$LINENO"; then :
41992  ac_cv_c_bigendian=no
41993else
41994  ac_cv_c_bigendian=yes
41995fi
41996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41997  conftest.$ac_objext conftest.beam conftest.$ac_ext
41998fi
41999
42000    fi
42001fi
42002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42003$as_echo "$ac_cv_c_bigendian" >&6; }
42004 case $ac_cv_c_bigendian in #(
42005   yes)
42006     ENDIAN="big";; #(
42007   no)
42008     ENDIAN="little" ;; #(
42009   universal)
42010     ENDIAN="universal_endianness"
42011     ;; #(
42012   *)
42013     ENDIAN="unknown" ;;
42014 esac
42015
42016
42017  if test "x$ENDIAN" = xuniversal_endianness; then
42018    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42019  fi
42020  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42021    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
42022  fi
42023
42024
42025# Configure flags for the tools
42026
42027  ###############################################################################
42028  #
42029  # How to compile shared libraries.
42030  #
42031
42032  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42033    PICFLAG="-fPIC"
42034    C_FLAG_REORDER=''
42035    CXX_FLAG_REORDER=''
42036
42037    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42038      # Linking is different on MacOSX
42039      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42040      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42041      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42042      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42043      SET_SHARED_LIBRARY_MAPFILE=''
42044    else
42045      # Default works for linux, might work on other platforms as well.
42046      SHARED_LIBRARY_FLAGS='-shared'
42047      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42048      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42049      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42050      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42051    fi
42052  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42053    PICFLAG=''
42054    C_FLAG_REORDER=''
42055    CXX_FLAG_REORDER=''
42056
42057    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42058      # Linking is different on MacOSX
42059      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42060      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42061      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42062      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42063      SET_SHARED_LIBRARY_MAPFILE=''
42064    else
42065      # Default works for linux, might work on other platforms as well.
42066      SHARED_LIBRARY_FLAGS='-shared'
42067      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42068      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42069      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42070      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42071    fi
42072  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42073    PICFLAG="-KPIC"
42074    C_FLAG_REORDER='-xF'
42075    CXX_FLAG_REORDER='-xF'
42076    SHARED_LIBRARY_FLAGS="-G"
42077    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42078    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42079    SET_SHARED_LIBRARY_NAME=''
42080    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42081  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42082    PICFLAG="-qpic=large"
42083    C_FLAG_REORDER=''
42084    CXX_FLAG_REORDER=''
42085    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42086    SET_EXECUTABLE_ORIGIN=""
42087    SET_SHARED_LIBRARY_ORIGIN=''
42088    SET_SHARED_LIBRARY_NAME=''
42089    SET_SHARED_LIBRARY_MAPFILE=''
42090  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42091    PICFLAG=""
42092    C_FLAG_REORDER=''
42093    CXX_FLAG_REORDER=''
42094    SHARED_LIBRARY_FLAGS="-LD"
42095    SET_EXECUTABLE_ORIGIN=''
42096    SET_SHARED_LIBRARY_ORIGIN=''
42097    SET_SHARED_LIBRARY_NAME=''
42098    SET_SHARED_LIBRARY_MAPFILE=''
42099  fi
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42110    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42111    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42112    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42113  fi
42114  # The (cross) compiler is now configured, we can now test capabilities
42115  # of the target platform.
42116
42117
42118
42119  ###############################################################################
42120  #
42121  # Setup the opt flags for different compilers
42122  # and different operating systems.
42123  #
42124
42125  # FIXME: this was indirectly the old default, but just inherited.
42126  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42127  #   C_FLAG_DEPS="-MMD -MF"
42128  # fi
42129
42130  # Generate make dependency files
42131  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42132    C_FLAG_DEPS="-MMD -MF"
42133  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42134    C_FLAG_DEPS="-MMD -MF"
42135  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42136    C_FLAG_DEPS="-xMMD -xMF"
42137  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42138    C_FLAG_DEPS="-qmakedep=gcc -MF"
42139  fi
42140  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42141
42142
42143
42144  # Debug symbols
42145  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42146    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42147      # reduce from default "-g2" option to save space
42148      CFLAGS_DEBUG_SYMBOLS="-g1"
42149      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42150    else
42151      CFLAGS_DEBUG_SYMBOLS="-g"
42152      CXXFLAGS_DEBUG_SYMBOLS="-g"
42153    fi
42154  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42155    CFLAGS_DEBUG_SYMBOLS="-g"
42156    CXXFLAGS_DEBUG_SYMBOLS="-g"
42157  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42158    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42159    # FIXME: likely a bug, this disables debug symbols rather than enables them
42160    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42161  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42162    CFLAGS_DEBUG_SYMBOLS="-g"
42163    CXXFLAGS_DEBUG_SYMBOLS="-g"
42164  fi
42165
42166
42167
42168  # bounds, memory and behavior checking options
42169  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42170    case $DEBUG_LEVEL in
42171    release )
42172      # no adjustment
42173      ;;
42174    fastdebug )
42175      # no adjustment
42176      ;;
42177    slowdebug )
42178      # Add runtime stack smashing and undefined behavior checks
42179      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42180      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42181      ;;
42182    esac
42183  fi
42184
42185
42186
42187  # Optimization levels
42188  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42189    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42190
42191    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42192      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42193      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42194      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42195      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42196      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42197      C_O_FLAG_NONE="-xregs=no%frameptr"
42198      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42199      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42200      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42201      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42202      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42203      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42204        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42205        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42206      fi
42207    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42208      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42209      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42210      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42211      C_O_FLAG_DEBUG=""
42212      C_O_FLAG_NONE=""
42213      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42214      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42215      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42216      C_O_FLAG_DEBUG=""
42217      CXX_O_FLAG_NONE=""
42218    fi
42219  else
42220    # The remaining toolchains share opt flags between CC and CXX;
42221    # setup for C and duplicate afterwards.
42222    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42223      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42224        # On MacOSX we optimize for size, something
42225        # we should do for all platforms?
42226        C_O_FLAG_HIGHEST="-Os"
42227        C_O_FLAG_HI="-Os"
42228        C_O_FLAG_NORM="-Os"
42229      else
42230        C_O_FLAG_HIGHEST="-O3"
42231        C_O_FLAG_HI="-O3"
42232        C_O_FLAG_NORM="-O2"
42233      fi
42234      C_O_FLAG_DEBUG="-O0"
42235      C_O_FLAG_NONE="-O0"
42236    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42237      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42238        # On MacOSX we optimize for size, something
42239        # we should do for all platforms?
42240        C_O_FLAG_HIGHEST="-Os"
42241        C_O_FLAG_HI="-Os"
42242        C_O_FLAG_NORM="-Os"
42243      else
42244        C_O_FLAG_HIGHEST="-O3"
42245        C_O_FLAG_HI="-O3"
42246        C_O_FLAG_NORM="-O2"
42247      fi
42248      C_O_FLAG_DEBUG="-O0"
42249      C_O_FLAG_NONE="-O0"
42250    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42251      C_O_FLAG_HIGHEST="-O3"
42252      C_O_FLAG_HI="-O3 -qstrict"
42253      C_O_FLAG_NORM="-O2"
42254      C_O_FLAG_DEBUG="-qnoopt"
42255      C_O_FLAG_NONE="-qnoop"
42256    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42257      C_O_FLAG_HIGHEST="-O2"
42258      C_O_FLAG_HI="-O1"
42259      C_O_FLAG_NORM="-O1"
42260      C_O_FLAG_DEBUG="-Od"
42261      C_O_FLAG_NONE="-Od"
42262    fi
42263    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42264    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42265    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42266    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42267    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42268  fi
42269
42270  # Adjust optimization flags according to debug level.
42271  case $DEBUG_LEVEL in
42272    release )
42273      # no adjustment
42274      ;;
42275    fastdebug )
42276      # Not quite so much optimization
42277      C_O_FLAG_HI="$C_O_FLAG_NORM"
42278      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42279      ;;
42280    slowdebug )
42281      # Disable optimization
42282      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42283      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42284      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42285      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42286      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42287      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42288      ;;
42289  esac
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302
42303  # Special extras...
42304  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42305    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42306      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42307      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42308    fi
42309  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42310    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42311    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42312    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42313  fi
42314
42315  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42317$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42318  fi
42319
42320  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42321    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42322$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42323  fi
42324
42325  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42326    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42327$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42328  fi
42329
42330
42331# Check whether --with-extra-cflags was given.
42332if test "${with_extra_cflags+set}" = set; then :
42333  withval=$with_extra_cflags;
42334fi
42335
42336
42337
42338# Check whether --with-extra-cxxflags was given.
42339if test "${with_extra_cxxflags+set}" = set; then :
42340  withval=$with_extra_cxxflags;
42341fi
42342
42343
42344
42345# Check whether --with-extra-ldflags was given.
42346if test "${with_extra_ldflags+set}" = set; then :
42347  withval=$with_extra_ldflags;
42348fi
42349
42350
42351  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42352  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42353  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42354
42355  # Hotspot needs these set in their legacy form
42356  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42357  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42358  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42359
42360
42361
42362
42363
42364  ###############################################################################
42365  #
42366  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42367  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42368  #
42369
42370  # Setup compiler/platform specific flags into
42371  #    CFLAGS_JDK    - C Compiler flags
42372  #    CXXFLAGS_JDK  - C++ Compiler flags
42373  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42374  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42375    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42376        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42377    case $OPENJDK_TARGET_CPU_ARCH in
42378      arm )
42379        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42380        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42381        ;;
42382      ppc )
42383        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42384        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42385        ;;
42386      * )
42387        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42388        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42389        ;;
42390    esac
42391  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42392    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42393    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42394      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42395      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42396    fi
42397
42398    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42399    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42400  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42401    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42402    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42403  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42404    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42405    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42406    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42407    -DWIN32 -DIAL"
42408    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42409      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42410    else
42411      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42412    fi
42413  fi
42414
42415  ###############################################################################
42416
42417  # Adjust flags according to debug level.
42418  case $DEBUG_LEVEL in
42419    fastdebug | slowdebug )
42420      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42421      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42422      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42423      ;;
42424    release )
42425      ;;
42426    * )
42427      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42428      ;;
42429  esac
42430
42431  # Setup LP64
42432  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42433
42434  # Set some common defines. These works for all compilers, but assume
42435  # -D is universally accepted.
42436
42437  # Setup endianness
42438  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42439    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42440    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42441    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42442    #   Note: -Dmacro         is the same as    #define macro 1
42443    #         -Dmacro=        is the same as    #define macro
42444    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42445      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42446    else
42447      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42448    fi
42449  else
42450    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42451    # are defined in the system?
42452    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42453      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42454    else
42455      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42456    fi
42457  fi
42458
42459  # Setup target OS define. Use OS target name but in upper case.
42460  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42461  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42462
42463  # Setup target CPU
42464  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42465
42466  # Setup debug/release defines
42467  if test "x$DEBUG_LEVEL" = xrelease; then
42468    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42469    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42470      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42471    fi
42472  else
42473    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42474  fi
42475
42476  # Setup release name
42477  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42478
42479
42480  # Set some additional per-OS defines.
42481  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42482    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42483  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42484    # FIXME: PPC64 should not be here.
42485    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42486  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42487    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42488  fi
42489
42490  # Additional macosx handling
42491  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42492    # Setting these parameters makes it an error to link to macosx APIs that are
42493    # newer than the given OS version and makes the linked binaries compatible
42494    # even if built on a newer version of the OS.
42495    # The expected format is X.Y.Z
42496    MACOSX_VERSION_MIN=10.7.0
42497
42498
42499    # The macro takes the version with no dots, ex: 1070
42500    # Let the flags variables get resolved in make for easier override on make
42501    # command line.
42502    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42503    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42504  fi
42505
42506  # Setup some hard coded includes
42507  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42508      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42509      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42510      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42511
42512  # The shared libraries are compiled using the picflag.
42513  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42514  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42515
42516  # Executable flags
42517  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42518  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42519
42520
42521
42522
42523
42524
42525  # Setup LDFLAGS et al.
42526  #
42527
42528  # Now this is odd. The JDK native libraries have to link against libjvm.so
42529  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42530  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42531  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42532  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42533  # libraries will link to whatever is in memory. Yuck.
42534  #
42535  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42536  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42537    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42538    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42539      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42540    fi
42541    # TODO: make -debug optional "--disable-full-debug-symbols"
42542    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42543  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42544    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42545    # We have previously set HAS_GNU_HASH if this is the case
42546    if test -n "$HAS_GNU_HASH"; then
42547      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42548    fi
42549    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42550      # And since we now know that the linker is gnu, then add -z defs, to forbid
42551      # undefined symbols in object files.
42552      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42553      case $DEBUG_LEVEL in
42554        release )
42555          # tell linker to optimize libraries.
42556          # Should this be supplied to the OSS linker as well?
42557          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42558          ;;
42559        slowdebug )
42560          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42561            # do relocations at load
42562            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42563            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42564          fi
42565          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42566            # mark relocations read only
42567            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42568            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42569          fi
42570          ;;
42571        fastdebug )
42572          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42573            # mark relocations read only
42574            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42575            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42576          fi
42577          ;;
42578        * )
42579          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42580          ;;
42581        esac
42582    fi
42583  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42584    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42585    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42586  fi
42587
42588  # Customize LDFLAGS for executables
42589
42590  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42591
42592  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42593    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42594      LDFLAGS_STACK_SIZE=1048576
42595    else
42596      LDFLAGS_STACK_SIZE=327680
42597    fi
42598    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42599  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42600    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42601  fi
42602
42603  # Customize LDFLAGS for libs
42604  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42605
42606  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42607    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42608    LDFLAGS_JDKLIB_SUFFIX=""
42609  else
42610    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42611        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42612
42613    # On some platforms (mac) the linker warns about non existing -L dirs.
42614    # Add server first if available. Linking aginst client does not always produce the same results.
42615    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42616    # Default to server for other variants.
42617    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42618      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42619    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42620      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42621    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42622      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42623    else
42624      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42625    fi
42626
42627    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42628    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42629      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42630    fi
42631  fi
42632
42633
42634
42635
42636
42637
42638
42639
42640  # Some Zero and Shark settings.
42641  # ZERO_ARCHFLAG tells the compiler which mode to build for
42642  case "${OPENJDK_TARGET_CPU}" in
42643    s390)
42644      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42645      ;;
42646    *)
42647      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42648  esac
42649
42650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42651$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42652  supports=yes
42653
42654  saved_cflags="$CFLAGS"
42655  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42656  ac_ext=c
42657ac_cpp='$CPP $CPPFLAGS'
42658ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42659ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42660ac_compiler_gnu=$ac_cv_c_compiler_gnu
42661
42662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42663/* end confdefs.h.  */
42664int i;
42665_ACEOF
42666if ac_fn_c_try_compile "$LINENO"; then :
42667
42668else
42669  supports=no
42670fi
42671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42672  ac_ext=cpp
42673ac_cpp='$CXXCPP $CPPFLAGS'
42674ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42675ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42676ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42677
42678  CFLAGS="$saved_cflags"
42679
42680  saved_cxxflags="$CXXFLAGS"
42681  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42682  ac_ext=cpp
42683ac_cpp='$CXXCPP $CPPFLAGS'
42684ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42685ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42686ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42687
42688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42689/* end confdefs.h.  */
42690int i;
42691_ACEOF
42692if ac_fn_cxx_try_compile "$LINENO"; then :
42693
42694else
42695  supports=no
42696fi
42697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42698  ac_ext=cpp
42699ac_cpp='$CXXCPP $CPPFLAGS'
42700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42703
42704  CXXFLAGS="$saved_cxxflags"
42705
42706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42707$as_echo "$supports" >&6; }
42708  if test "x$supports" = "xyes" ; then
42709    :
42710  else
42711    ZERO_ARCHFLAG=""
42712  fi
42713
42714
42715
42716  # Check that the compiler supports -mX (or -qX on AIX) flags
42717  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42718
42719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42720$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42721  supports=yes
42722
42723  saved_cflags="$CFLAGS"
42724  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42725  ac_ext=c
42726ac_cpp='$CPP $CPPFLAGS'
42727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42729ac_compiler_gnu=$ac_cv_c_compiler_gnu
42730
42731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42732/* end confdefs.h.  */
42733int i;
42734_ACEOF
42735if ac_fn_c_try_compile "$LINENO"; then :
42736
42737else
42738  supports=no
42739fi
42740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42741  ac_ext=cpp
42742ac_cpp='$CXXCPP $CPPFLAGS'
42743ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42744ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42745ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42746
42747  CFLAGS="$saved_cflags"
42748
42749  saved_cxxflags="$CXXFLAGS"
42750  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42751  ac_ext=cpp
42752ac_cpp='$CXXCPP $CPPFLAGS'
42753ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42754ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42755ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42756
42757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42758/* end confdefs.h.  */
42759int i;
42760_ACEOF
42761if ac_fn_cxx_try_compile "$LINENO"; then :
42762
42763else
42764  supports=no
42765fi
42766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42767  ac_ext=cpp
42768ac_cpp='$CXXCPP $CPPFLAGS'
42769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42772
42773  CXXFLAGS="$saved_cxxflags"
42774
42775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42776$as_echo "$supports" >&6; }
42777  if test "x$supports" = "xyes" ; then
42778    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42779  else
42780    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42781  fi
42782
42783
42784
42785  case "${TOOLCHAIN_TYPE}" in
42786    microsoft)
42787      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42788      ;;
42789    solstudio)
42790      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42791      ;;
42792    gcc)
42793      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42794      ;;
42795    clang)
42796      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42797      ;;
42798  esac
42799
42800
42801
42802# Setup debug symbols (need objcopy from the toolchain for that)
42803
42804  #
42805  # ENABLE_DEBUG_SYMBOLS
42806  # This must be done after the toolchain is setup, since we're looking at objcopy.
42807  #
42808  # Check whether --enable-debug-symbols was given.
42809if test "${enable_debug_symbols+set}" = set; then :
42810  enableval=$enable_debug_symbols;
42811fi
42812
42813
42814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42815$as_echo_n "checking if we should generate debug symbols... " >&6; }
42816
42817  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42818    # explicit enabling of enable-debug-symbols and can't find objcopy
42819    #   this is an error
42820    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42821  fi
42822
42823  if test "x$enable_debug_symbols" = "xyes"; then
42824    ENABLE_DEBUG_SYMBOLS=true
42825  elif test "x$enable_debug_symbols" = "xno"; then
42826    ENABLE_DEBUG_SYMBOLS=false
42827  else
42828    # Default is on if objcopy is found
42829    if test "x$OBJCOPY" != x; then
42830      ENABLE_DEBUG_SYMBOLS=true
42831    # MacOS X and Windows don't use objcopy but default is on for those OSes
42832    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42833      ENABLE_DEBUG_SYMBOLS=true
42834    else
42835      ENABLE_DEBUG_SYMBOLS=false
42836    fi
42837  fi
42838
42839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42840$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42841
42842  #
42843  # ZIP_DEBUGINFO_FILES
42844  #
42845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42846$as_echo_n "checking if we should zip debug-info files... " >&6; }
42847  # Check whether --enable-zip-debug-info was given.
42848if test "${enable_zip_debug_info+set}" = set; then :
42849  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42850else
42851  enable_zip_debug_info="yes"
42852fi
42853
42854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42855$as_echo "${enable_zip_debug_info}" >&6; }
42856
42857  if test "x${enable_zip_debug_info}" = "xno"; then
42858    ZIP_DEBUGINFO_FILES=false
42859  else
42860    ZIP_DEBUGINFO_FILES=true
42861  fi
42862
42863
42864
42865
42866
42867###############################################################################
42868#
42869# Check dependencies for external and internal libraries.
42870#
42871###############################################################################
42872
42873# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42874
42875  # When using cygwin or msys, we need a wrapper binary that renames
42876  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42877  # @files and rewrites these too! This wrapper binary is
42878  # called fixpath.
42879  FIXPATH=
42880  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42882$as_echo_n "checking if fixpath can be created... " >&6; }
42883    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42884    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42885    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42886      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42887      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42888      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42889      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42890    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42891      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42892      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42893
42894      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42895      # @ was chosen as separator to minimize risk of other tools messing around with it
42896      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42897      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42898
42899      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42900    fi
42901    rm -f $OUTPUT_ROOT/fixpath*
42902    cd $OUTPUT_ROOT
42903    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42904    cd $CURDIR
42905
42906    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42908$as_echo "no" >&6; }
42909      cat $OUTPUT_ROOT/fixpath1.log
42910      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42911    fi
42912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42913$as_echo "yes" >&6; }
42914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42915$as_echo_n "checking if fixpath.exe works... " >&6; }
42916    cd $OUTPUT_ROOT
42917    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42918    cd $CURDIR
42919    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42921$as_echo "no" >&6; }
42922      cat $OUTPUT_ROOT/fixpath2.log
42923      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42924    fi
42925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42926$as_echo "yes" >&6; }
42927    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42928  fi
42929
42930
42931
42932
42933
42934
42935  ###############################################################################
42936  #
42937  # OS specific settings that we never will need to probe.
42938  #
42939  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42941$as_echo_n "checking what is not needed on Linux?... " >&6; }
42942    PULSE_NOT_NEEDED=yes
42943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42944$as_echo "pulse" >&6; }
42945  fi
42946
42947  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42949$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42950    ALSA_NOT_NEEDED=yes
42951    PULSE_NOT_NEEDED=yes
42952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42953$as_echo "alsa pulse" >&6; }
42954  fi
42955
42956  if test "x$OPENJDK_TARGET_OS" = xaix; then
42957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42958$as_echo_n "checking what is not needed on AIX?... " >&6; }
42959    ALSA_NOT_NEEDED=yes
42960    PULSE_NOT_NEEDED=yes
42961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42962$as_echo "alsa pulse" >&6; }
42963  fi
42964
42965
42966  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42968$as_echo_n "checking what is not needed on Windows?... " >&6; }
42969    CUPS_NOT_NEEDED=yes
42970    ALSA_NOT_NEEDED=yes
42971    PULSE_NOT_NEEDED=yes
42972    X11_NOT_NEEDED=yes
42973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42974$as_echo "alsa cups pulse x11" >&6; }
42975  fi
42976
42977  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42979$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42980    ALSA_NOT_NEEDED=yes
42981    PULSE_NOT_NEEDED=yes
42982    X11_NOT_NEEDED=yes
42983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42984$as_echo "alsa pulse x11" >&6; }
42985  fi
42986
42987  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42989$as_echo_n "checking what is not needed on bsd?... " >&6; }
42990    ALSA_NOT_NEEDED=yes
42991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42992$as_echo "alsa" >&6; }
42993  fi
42994
42995  if test "x$OPENJDK" = "xfalse"; then
42996    FREETYPE_NOT_NEEDED=yes
42997  fi
42998
42999  if test "x$SUPPORT_HEADFUL" = xno; then
43000    X11_NOT_NEEDED=yes
43001  fi
43002
43003
43004
43005  ###############################################################################
43006  #
43007  # Check for X Windows
43008  #
43009
43010  if test "x$X11_NOT_NEEDED" = xyes; then
43011    if test "x${with_x}" != x; then
43012      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43013$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43014    fi
43015    X_CFLAGS=
43016    X_LIBS=
43017  else
43018    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43019    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43020    # --x-libraries for the sysroot, if that seems to be correct.
43021    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43022      if test "x$SYSROOT" != "x"; then
43023        if test "x$x_includes" = xNONE; then
43024          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43025            x_includes="$SYSROOT/usr/X11R6/include"
43026          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43027            x_includes="$SYSROOT/usr/include"
43028          fi
43029        fi
43030        if test "x$x_libraries" = xNONE; then
43031          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43032            x_libraries="$SYSROOT/usr/X11R6/lib"
43033          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43034            x_libraries="$SYSROOT/usr/lib64"
43035          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43036            x_libraries="$SYSROOT/usr/lib"
43037          fi
43038        fi
43039      fi
43040    fi
43041
43042    # Now let autoconf do it's magic
43043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43044$as_echo_n "checking for X... " >&6; }
43045
43046
43047# Check whether --with-x was given.
43048if test "${with_x+set}" = set; then :
43049  withval=$with_x;
43050fi
43051
43052# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43053if test "x$with_x" = xno; then
43054  # The user explicitly disabled X.
43055  have_x=disabled
43056else
43057  case $x_includes,$x_libraries in #(
43058    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43059    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43060  $as_echo_n "(cached) " >&6
43061else
43062  # One or both of the vars are not set, and there is no cached value.
43063ac_x_includes=no ac_x_libraries=no
43064rm -f -r conftest.dir
43065if mkdir conftest.dir; then
43066  cd conftest.dir
43067  cat >Imakefile <<'_ACEOF'
43068incroot:
43069	@echo incroot='${INCROOT}'
43070usrlibdir:
43071	@echo usrlibdir='${USRLIBDIR}'
43072libdir:
43073	@echo libdir='${LIBDIR}'
43074_ACEOF
43075  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43076    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43077    for ac_var in incroot usrlibdir libdir; do
43078      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43079    done
43080    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43081    for ac_extension in a so sl dylib la dll; do
43082      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43083	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43084	ac_im_usrlibdir=$ac_im_libdir; break
43085      fi
43086    done
43087    # Screen out bogus values from the imake configuration.  They are
43088    # bogus both because they are the default anyway, and because
43089    # using them would break gcc on systems where it needs fixed includes.
43090    case $ac_im_incroot in
43091	/usr/include) ac_x_includes= ;;
43092	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43093    esac
43094    case $ac_im_usrlibdir in
43095	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43096	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43097    esac
43098  fi
43099  cd ..
43100  rm -f -r conftest.dir
43101fi
43102
43103# Standard set of common directories for X headers.
43104# Check X11 before X11Rn because it is often a symlink to the current release.
43105ac_x_header_dirs='
43106/usr/X11/include
43107/usr/X11R7/include
43108/usr/X11R6/include
43109/usr/X11R5/include
43110/usr/X11R4/include
43111
43112/usr/include/X11
43113/usr/include/X11R7
43114/usr/include/X11R6
43115/usr/include/X11R5
43116/usr/include/X11R4
43117
43118/usr/local/X11/include
43119/usr/local/X11R7/include
43120/usr/local/X11R6/include
43121/usr/local/X11R5/include
43122/usr/local/X11R4/include
43123
43124/usr/local/include/X11
43125/usr/local/include/X11R7
43126/usr/local/include/X11R6
43127/usr/local/include/X11R5
43128/usr/local/include/X11R4
43129
43130/usr/X386/include
43131/usr/x386/include
43132/usr/XFree86/include/X11
43133
43134/usr/include
43135/usr/local/include
43136/usr/unsupported/include
43137/usr/athena/include
43138/usr/local/x11r5/include
43139/usr/lpp/Xamples/include
43140
43141/usr/openwin/include
43142/usr/openwin/share/include'
43143
43144if test "$ac_x_includes" = no; then
43145  # Guess where to find include files, by looking for Xlib.h.
43146  # First, try using that file with no special directory specified.
43147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43148/* end confdefs.h.  */
43149#include <X11/Xlib.h>
43150_ACEOF
43151if ac_fn_cxx_try_cpp "$LINENO"; then :
43152  # We can compile using X headers with no special include directory.
43153ac_x_includes=
43154else
43155  for ac_dir in $ac_x_header_dirs; do
43156  if test -r "$ac_dir/X11/Xlib.h"; then
43157    ac_x_includes=$ac_dir
43158    break
43159  fi
43160done
43161fi
43162rm -f conftest.err conftest.i conftest.$ac_ext
43163fi # $ac_x_includes = no
43164
43165if test "$ac_x_libraries" = no; then
43166  # Check for the libraries.
43167  # See if we find them without any special options.
43168  # Don't add to $LIBS permanently.
43169  ac_save_LIBS=$LIBS
43170  LIBS="-lX11 $LIBS"
43171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43172/* end confdefs.h.  */
43173#include <X11/Xlib.h>
43174int
43175main ()
43176{
43177XrmInitialize ()
43178  ;
43179  return 0;
43180}
43181_ACEOF
43182if ac_fn_cxx_try_link "$LINENO"; then :
43183  LIBS=$ac_save_LIBS
43184# We can link X programs with no special library path.
43185ac_x_libraries=
43186else
43187  LIBS=$ac_save_LIBS
43188for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43189do
43190  # Don't even attempt the hair of trying to link an X program!
43191  for ac_extension in a so sl dylib la dll; do
43192    if test -r "$ac_dir/libX11.$ac_extension"; then
43193      ac_x_libraries=$ac_dir
43194      break 2
43195    fi
43196  done
43197done
43198fi
43199rm -f core conftest.err conftest.$ac_objext \
43200    conftest$ac_exeext conftest.$ac_ext
43201fi # $ac_x_libraries = no
43202
43203case $ac_x_includes,$ac_x_libraries in #(
43204  no,* | *,no | *\'*)
43205    # Didn't find X, or a directory has "'" in its name.
43206    ac_cv_have_x="have_x=no";; #(
43207  *)
43208    # Record where we found X for the cache.
43209    ac_cv_have_x="have_x=yes\
43210	ac_x_includes='$ac_x_includes'\
43211	ac_x_libraries='$ac_x_libraries'"
43212esac
43213fi
43214;; #(
43215    *) have_x=yes;;
43216  esac
43217  eval "$ac_cv_have_x"
43218fi # $with_x != no
43219
43220if test "$have_x" != yes; then
43221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43222$as_echo "$have_x" >&6; }
43223  no_x=yes
43224else
43225  # If each of the values was on the command line, it overrides each guess.
43226  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43227  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43228  # Update the cache value to reflect the command line values.
43229  ac_cv_have_x="have_x=yes\
43230	ac_x_includes='$x_includes'\
43231	ac_x_libraries='$x_libraries'"
43232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43233$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43234fi
43235
43236    if test "$no_x" = yes; then
43237  # Not all programs may use this symbol, but it does not hurt to define it.
43238
43239$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43240
43241  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43242else
43243  if test -n "$x_includes"; then
43244    X_CFLAGS="$X_CFLAGS -I$x_includes"
43245  fi
43246
43247  # It would also be nice to do this for all -L options, not just this one.
43248  if test -n "$x_libraries"; then
43249    X_LIBS="$X_LIBS -L$x_libraries"
43250    # For Solaris; some versions of Sun CC require a space after -R and
43251    # others require no space.  Words are not sufficient . . . .
43252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43253$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43254    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43255    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43256    ac_cxx_werror_flag=yes
43257    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43258/* end confdefs.h.  */
43259
43260int
43261main ()
43262{
43263
43264  ;
43265  return 0;
43266}
43267_ACEOF
43268if ac_fn_cxx_try_link "$LINENO"; then :
43269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43270$as_echo "no" >&6; }
43271       X_LIBS="$X_LIBS -R$x_libraries"
43272else
43273  LIBS="$ac_xsave_LIBS -R $x_libraries"
43274       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43275/* end confdefs.h.  */
43276
43277int
43278main ()
43279{
43280
43281  ;
43282  return 0;
43283}
43284_ACEOF
43285if ac_fn_cxx_try_link "$LINENO"; then :
43286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43287$as_echo "yes" >&6; }
43288	  X_LIBS="$X_LIBS -R $x_libraries"
43289else
43290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43291$as_echo "neither works" >&6; }
43292fi
43293rm -f core conftest.err conftest.$ac_objext \
43294    conftest$ac_exeext conftest.$ac_ext
43295fi
43296rm -f core conftest.err conftest.$ac_objext \
43297    conftest$ac_exeext conftest.$ac_ext
43298    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43299    LIBS=$ac_xsave_LIBS
43300  fi
43301
43302  # Check for system-dependent libraries X programs must link with.
43303  # Do this before checking for the system-independent R6 libraries
43304  # (-lICE), since we may need -lsocket or whatever for X linking.
43305
43306  if test "$ISC" = yes; then
43307    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43308  else
43309    # Martyn Johnson says this is needed for Ultrix, if the X
43310    # libraries were built with DECnet support.  And Karl Berry says
43311    # the Alpha needs dnet_stub (dnet does not exist).
43312    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43313    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43314/* end confdefs.h.  */
43315
43316/* Override any GCC internal prototype to avoid an error.
43317   Use char because int might match the return type of a GCC
43318   builtin and then its argument prototype would still apply.  */
43319#ifdef __cplusplus
43320extern "C"
43321#endif
43322char XOpenDisplay ();
43323int
43324main ()
43325{
43326return XOpenDisplay ();
43327  ;
43328  return 0;
43329}
43330_ACEOF
43331if ac_fn_cxx_try_link "$LINENO"; then :
43332
43333else
43334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43335$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43336if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43337  $as_echo_n "(cached) " >&6
43338else
43339  ac_check_lib_save_LIBS=$LIBS
43340LIBS="-ldnet  $LIBS"
43341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43342/* end confdefs.h.  */
43343
43344/* Override any GCC internal prototype to avoid an error.
43345   Use char because int might match the return type of a GCC
43346   builtin and then its argument prototype would still apply.  */
43347#ifdef __cplusplus
43348extern "C"
43349#endif
43350char dnet_ntoa ();
43351int
43352main ()
43353{
43354return dnet_ntoa ();
43355  ;
43356  return 0;
43357}
43358_ACEOF
43359if ac_fn_cxx_try_link "$LINENO"; then :
43360  ac_cv_lib_dnet_dnet_ntoa=yes
43361else
43362  ac_cv_lib_dnet_dnet_ntoa=no
43363fi
43364rm -f core conftest.err conftest.$ac_objext \
43365    conftest$ac_exeext conftest.$ac_ext
43366LIBS=$ac_check_lib_save_LIBS
43367fi
43368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43369$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43370if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43371  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43372fi
43373
43374    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43376$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43377if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43378  $as_echo_n "(cached) " >&6
43379else
43380  ac_check_lib_save_LIBS=$LIBS
43381LIBS="-ldnet_stub  $LIBS"
43382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43383/* end confdefs.h.  */
43384
43385/* Override any GCC internal prototype to avoid an error.
43386   Use char because int might match the return type of a GCC
43387   builtin and then its argument prototype would still apply.  */
43388#ifdef __cplusplus
43389extern "C"
43390#endif
43391char dnet_ntoa ();
43392int
43393main ()
43394{
43395return dnet_ntoa ();
43396  ;
43397  return 0;
43398}
43399_ACEOF
43400if ac_fn_cxx_try_link "$LINENO"; then :
43401  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43402else
43403  ac_cv_lib_dnet_stub_dnet_ntoa=no
43404fi
43405rm -f core conftest.err conftest.$ac_objext \
43406    conftest$ac_exeext conftest.$ac_ext
43407LIBS=$ac_check_lib_save_LIBS
43408fi
43409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43410$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43411if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43412  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43413fi
43414
43415    fi
43416fi
43417rm -f core conftest.err conftest.$ac_objext \
43418    conftest$ac_exeext conftest.$ac_ext
43419    LIBS="$ac_xsave_LIBS"
43420
43421    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43422    # to get the SysV transport functions.
43423    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43424    # needs -lnsl.
43425    # The nsl library prevents programs from opening the X display
43426    # on Irix 5.2, according to T.E. Dickey.
43427    # The functions gethostbyname, getservbyname, and inet_addr are
43428    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43429    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43430if test "x$ac_cv_func_gethostbyname" = xyes; then :
43431
43432fi
43433
43434    if test $ac_cv_func_gethostbyname = no; then
43435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43436$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43437if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43438  $as_echo_n "(cached) " >&6
43439else
43440  ac_check_lib_save_LIBS=$LIBS
43441LIBS="-lnsl  $LIBS"
43442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43443/* end confdefs.h.  */
43444
43445/* Override any GCC internal prototype to avoid an error.
43446   Use char because int might match the return type of a GCC
43447   builtin and then its argument prototype would still apply.  */
43448#ifdef __cplusplus
43449extern "C"
43450#endif
43451char gethostbyname ();
43452int
43453main ()
43454{
43455return gethostbyname ();
43456  ;
43457  return 0;
43458}
43459_ACEOF
43460if ac_fn_cxx_try_link "$LINENO"; then :
43461  ac_cv_lib_nsl_gethostbyname=yes
43462else
43463  ac_cv_lib_nsl_gethostbyname=no
43464fi
43465rm -f core conftest.err conftest.$ac_objext \
43466    conftest$ac_exeext conftest.$ac_ext
43467LIBS=$ac_check_lib_save_LIBS
43468fi
43469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43470$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43471if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43472  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43473fi
43474
43475      if test $ac_cv_lib_nsl_gethostbyname = no; then
43476	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43477$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43478if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43479  $as_echo_n "(cached) " >&6
43480else
43481  ac_check_lib_save_LIBS=$LIBS
43482LIBS="-lbsd  $LIBS"
43483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43484/* end confdefs.h.  */
43485
43486/* Override any GCC internal prototype to avoid an error.
43487   Use char because int might match the return type of a GCC
43488   builtin and then its argument prototype would still apply.  */
43489#ifdef __cplusplus
43490extern "C"
43491#endif
43492char gethostbyname ();
43493int
43494main ()
43495{
43496return gethostbyname ();
43497  ;
43498  return 0;
43499}
43500_ACEOF
43501if ac_fn_cxx_try_link "$LINENO"; then :
43502  ac_cv_lib_bsd_gethostbyname=yes
43503else
43504  ac_cv_lib_bsd_gethostbyname=no
43505fi
43506rm -f core conftest.err conftest.$ac_objext \
43507    conftest$ac_exeext conftest.$ac_ext
43508LIBS=$ac_check_lib_save_LIBS
43509fi
43510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43511$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43512if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43513  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43514fi
43515
43516      fi
43517    fi
43518
43519    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43520    # socket/setsockopt and other routines are undefined under SCO ODT
43521    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43522    # on later versions), says Simon Leinen: it contains gethostby*
43523    # variants that don't use the name server (or something).  -lsocket
43524    # must be given before -lnsl if both are needed.  We assume that
43525    # if connect needs -lnsl, so does gethostbyname.
43526    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43527if test "x$ac_cv_func_connect" = xyes; then :
43528
43529fi
43530
43531    if test $ac_cv_func_connect = no; then
43532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43533$as_echo_n "checking for connect in -lsocket... " >&6; }
43534if ${ac_cv_lib_socket_connect+:} false; then :
43535  $as_echo_n "(cached) " >&6
43536else
43537  ac_check_lib_save_LIBS=$LIBS
43538LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43540/* end confdefs.h.  */
43541
43542/* Override any GCC internal prototype to avoid an error.
43543   Use char because int might match the return type of a GCC
43544   builtin and then its argument prototype would still apply.  */
43545#ifdef __cplusplus
43546extern "C"
43547#endif
43548char connect ();
43549int
43550main ()
43551{
43552return connect ();
43553  ;
43554  return 0;
43555}
43556_ACEOF
43557if ac_fn_cxx_try_link "$LINENO"; then :
43558  ac_cv_lib_socket_connect=yes
43559else
43560  ac_cv_lib_socket_connect=no
43561fi
43562rm -f core conftest.err conftest.$ac_objext \
43563    conftest$ac_exeext conftest.$ac_ext
43564LIBS=$ac_check_lib_save_LIBS
43565fi
43566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43567$as_echo "$ac_cv_lib_socket_connect" >&6; }
43568if test "x$ac_cv_lib_socket_connect" = xyes; then :
43569  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43570fi
43571
43572    fi
43573
43574    # Guillermo Gomez says -lposix is necessary on A/UX.
43575    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43576if test "x$ac_cv_func_remove" = xyes; then :
43577
43578fi
43579
43580    if test $ac_cv_func_remove = no; then
43581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43582$as_echo_n "checking for remove in -lposix... " >&6; }
43583if ${ac_cv_lib_posix_remove+:} false; then :
43584  $as_echo_n "(cached) " >&6
43585else
43586  ac_check_lib_save_LIBS=$LIBS
43587LIBS="-lposix  $LIBS"
43588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43589/* end confdefs.h.  */
43590
43591/* Override any GCC internal prototype to avoid an error.
43592   Use char because int might match the return type of a GCC
43593   builtin and then its argument prototype would still apply.  */
43594#ifdef __cplusplus
43595extern "C"
43596#endif
43597char remove ();
43598int
43599main ()
43600{
43601return remove ();
43602  ;
43603  return 0;
43604}
43605_ACEOF
43606if ac_fn_cxx_try_link "$LINENO"; then :
43607  ac_cv_lib_posix_remove=yes
43608else
43609  ac_cv_lib_posix_remove=no
43610fi
43611rm -f core conftest.err conftest.$ac_objext \
43612    conftest$ac_exeext conftest.$ac_ext
43613LIBS=$ac_check_lib_save_LIBS
43614fi
43615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43616$as_echo "$ac_cv_lib_posix_remove" >&6; }
43617if test "x$ac_cv_lib_posix_remove" = xyes; then :
43618  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43619fi
43620
43621    fi
43622
43623    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43624    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43625if test "x$ac_cv_func_shmat" = xyes; then :
43626
43627fi
43628
43629    if test $ac_cv_func_shmat = no; then
43630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43631$as_echo_n "checking for shmat in -lipc... " >&6; }
43632if ${ac_cv_lib_ipc_shmat+:} false; then :
43633  $as_echo_n "(cached) " >&6
43634else
43635  ac_check_lib_save_LIBS=$LIBS
43636LIBS="-lipc  $LIBS"
43637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43638/* end confdefs.h.  */
43639
43640/* Override any GCC internal prototype to avoid an error.
43641   Use char because int might match the return type of a GCC
43642   builtin and then its argument prototype would still apply.  */
43643#ifdef __cplusplus
43644extern "C"
43645#endif
43646char shmat ();
43647int
43648main ()
43649{
43650return shmat ();
43651  ;
43652  return 0;
43653}
43654_ACEOF
43655if ac_fn_cxx_try_link "$LINENO"; then :
43656  ac_cv_lib_ipc_shmat=yes
43657else
43658  ac_cv_lib_ipc_shmat=no
43659fi
43660rm -f core conftest.err conftest.$ac_objext \
43661    conftest$ac_exeext conftest.$ac_ext
43662LIBS=$ac_check_lib_save_LIBS
43663fi
43664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43665$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43666if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43667  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43668fi
43669
43670    fi
43671  fi
43672
43673  # Check for libraries that X11R6 Xt/Xaw programs need.
43674  ac_save_LDFLAGS=$LDFLAGS
43675  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43676  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43677  # check for ICE first), but we must link in the order -lSM -lICE or
43678  # we get undefined symbols.  So assume we have SM if we have ICE.
43679  # These have to be linked with before -lX11, unlike the other
43680  # libraries we check for below, so use a different variable.
43681  # John Interrante, Karl Berry
43682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43683$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43684if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43685  $as_echo_n "(cached) " >&6
43686else
43687  ac_check_lib_save_LIBS=$LIBS
43688LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43690/* end confdefs.h.  */
43691
43692/* Override any GCC internal prototype to avoid an error.
43693   Use char because int might match the return type of a GCC
43694   builtin and then its argument prototype would still apply.  */
43695#ifdef __cplusplus
43696extern "C"
43697#endif
43698char IceConnectionNumber ();
43699int
43700main ()
43701{
43702return IceConnectionNumber ();
43703  ;
43704  return 0;
43705}
43706_ACEOF
43707if ac_fn_cxx_try_link "$LINENO"; then :
43708  ac_cv_lib_ICE_IceConnectionNumber=yes
43709else
43710  ac_cv_lib_ICE_IceConnectionNumber=no
43711fi
43712rm -f core conftest.err conftest.$ac_objext \
43713    conftest$ac_exeext conftest.$ac_ext
43714LIBS=$ac_check_lib_save_LIBS
43715fi
43716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43717$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43718if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43719  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43720fi
43721
43722  LDFLAGS=$ac_save_LDFLAGS
43723
43724fi
43725
43726
43727    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43728    # this doesn't make sense so we remove it.
43729    if test "x$COMPILE_TYPE" = xcross; then
43730      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43731    fi
43732
43733    if test "x$no_x" = xyes; then
43734
43735  # Print a helpful message on how to acquire the necessary build dependency.
43736  # x11 is the help tag: freetype, cups, pulse, alsa etc
43737  MISSING_DEPENDENCY=x11
43738
43739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43740    cygwin_help $MISSING_DEPENDENCY
43741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43742    msys_help $MISSING_DEPENDENCY
43743  else
43744    PKGHANDLER_COMMAND=
43745
43746    case $PKGHANDLER in
43747      apt-get)
43748        apt_help     $MISSING_DEPENDENCY ;;
43749      yum)
43750        yum_help     $MISSING_DEPENDENCY ;;
43751      port)
43752        port_help    $MISSING_DEPENDENCY ;;
43753      pkgutil)
43754        pkgutil_help $MISSING_DEPENDENCY ;;
43755      pkgadd)
43756        pkgadd_help  $MISSING_DEPENDENCY ;;
43757    esac
43758
43759    if test "x$PKGHANDLER_COMMAND" != x; then
43760      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43761    fi
43762  fi
43763
43764      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43765    fi
43766
43767    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43768      OPENWIN_HOME="/usr/openwin"
43769      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43770      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43771          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43772          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43773          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43774    fi
43775
43776    ac_ext=c
43777ac_cpp='$CPP $CPPFLAGS'
43778ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43779ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43780ac_compiler_gnu=$ac_cv_c_compiler_gnu
43781
43782    OLD_CFLAGS="$CFLAGS"
43783    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43784
43785    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43786    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43787do :
43788  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43789ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43790          # include <X11/Xlib.h>
43791          # include <X11/Xutil.h>
43792
43793
43794"
43795if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43796  cat >>confdefs.h <<_ACEOF
43797#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43798_ACEOF
43799 X11_HEADERS_OK=yes
43800else
43801  X11_HEADERS_OK=no; break
43802fi
43803
43804done
43805
43806
43807    if test "x$X11_HEADERS_OK" = xno; then
43808
43809  # Print a helpful message on how to acquire the necessary build dependency.
43810  # x11 is the help tag: freetype, cups, pulse, alsa etc
43811  MISSING_DEPENDENCY=x11
43812
43813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43814    cygwin_help $MISSING_DEPENDENCY
43815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43816    msys_help $MISSING_DEPENDENCY
43817  else
43818    PKGHANDLER_COMMAND=
43819
43820    case $PKGHANDLER in
43821      apt-get)
43822        apt_help     $MISSING_DEPENDENCY ;;
43823      yum)
43824        yum_help     $MISSING_DEPENDENCY ;;
43825      port)
43826        port_help    $MISSING_DEPENDENCY ;;
43827      pkgutil)
43828        pkgutil_help $MISSING_DEPENDENCY ;;
43829      pkgadd)
43830        pkgadd_help  $MISSING_DEPENDENCY ;;
43831    esac
43832
43833    if test "x$PKGHANDLER_COMMAND" != x; then
43834      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43835    fi
43836  fi
43837
43838      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43839    fi
43840
43841    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43842    # defined in libawt_xawt.
43843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43844$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43846/* end confdefs.h.  */
43847#include <X11/extensions/Xrender.h>
43848int
43849main ()
43850{
43851XLinearGradient x;
43852  ;
43853  return 0;
43854}
43855_ACEOF
43856if ac_fn_c_try_compile "$LINENO"; then :
43857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43858$as_echo "yes" >&6; }
43859else
43860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43861$as_echo "no" >&6; }
43862         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43863fi
43864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43865
43866    CFLAGS="$OLD_CFLAGS"
43867    ac_ext=cpp
43868ac_cpp='$CXXCPP $CPPFLAGS'
43869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43872
43873  fi # X11_NOT_NEEDED
43874
43875
43876
43877
43878
43879
43880  ###############################################################################
43881  #
43882  # The common unix printing system cups is used to print from java.
43883  #
43884
43885# Check whether --with-cups was given.
43886if test "${with_cups+set}" = set; then :
43887  withval=$with_cups;
43888fi
43889
43890
43891# Check whether --with-cups-include was given.
43892if test "${with_cups_include+set}" = set; then :
43893  withval=$with_cups_include;
43894fi
43895
43896
43897  if test "x$CUPS_NOT_NEEDED" = xyes; then
43898    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43899      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43900$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43901    fi
43902    CUPS_CFLAGS=
43903  else
43904    CUPS_FOUND=no
43905
43906    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43907      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43908    fi
43909
43910    if test "x${with_cups}" != x; then
43911      CUPS_CFLAGS="-I${with_cups}/include"
43912      CUPS_FOUND=yes
43913    fi
43914    if test "x${with_cups_include}" != x; then
43915      CUPS_CFLAGS="-I${with_cups_include}"
43916      CUPS_FOUND=yes
43917    fi
43918    if test "x$CUPS_FOUND" = xno; then
43919
43920
43921  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43922    # Source the builddeps file again, to make sure it uses the latest variables!
43923    . $builddepsfile
43924    # Look for a target and build machine specific resource!
43925    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43926    if test "x$resource" = x; then
43927      # Ok, lets instead look for a target specific resource
43928      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43929    fi
43930    if test "x$resource" = x; then
43931      # Ok, lets instead look for a build specific resource
43932      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43933    fi
43934    if test "x$resource" = x; then
43935      # Ok, lets instead look for a generic resource
43936      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43937      resource=${builddep_cups}
43938    fi
43939    if test "x$resource" != x; then
43940      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43941$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43942      # If the resource in the builddeps.conf file is an existing directory,
43943      # for example /java/linux/cups
43944      if test -d ${resource}; then
43945        depdir=${resource}
43946      else
43947
43948  # cups is for example mymodule
43949  # $resource is for example libs/general/libmymod_1_2_3.zip
43950  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43951  # $with_builddeps_dir is for example /localhome/builddeps
43952  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43953  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43954  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43955  filename=`basename $resource`
43956  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43957  filebase=${filename%%.*}
43958  extension=${filename#*.}
43959  installdir=$with_builddeps_dir/$filebase
43960  if test ! -f $installdir/$filename.unpacked; then
43961    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43962$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43963    if test ! -d $installdir; then
43964      mkdir -p $installdir
43965    fi
43966    if test ! -d $installdir; then
43967      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43968    fi
43969    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43970    touch $tmpfile
43971    if test ! -f $tmpfile; then
43972      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43973    fi
43974
43975  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43976  # $tmpfile is the local file name for the downloaded file.
43977  VALID_TOOL=no
43978  if test "x$BDEPS_FTP" = xwget; then
43979    VALID_TOOL=yes
43980    wget -O $tmpfile $with_builddeps_server/$resource
43981  fi
43982  if test "x$BDEPS_FTP" = xlftp; then
43983    VALID_TOOL=yes
43984    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43985  fi
43986  if test "x$BDEPS_FTP" = xftp; then
43987    VALID_TOOL=yes
43988    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43989    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43990    FTPUSERPWD=${FTPSERVER%%@*}
43991    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43992      FTPUSER=${userpwd%%:*}
43993      FTPPWD=${userpwd#*@}
43994      FTPSERVER=${FTPSERVER#*@}
43995    else
43996      FTPUSER=ftp
43997      FTPPWD=ftp
43998    fi
43999    # the "pass" command does not work on some
44000    # ftp clients (read ftp.exe) but if it works,
44001    # passive mode is better!
44002    ( \
44003        echo "user $FTPUSER $FTPPWD"        ; \
44004        echo "pass"                         ; \
44005        echo "bin"                          ; \
44006        echo "get $FTPPATH $tmpfile"              ; \
44007    ) | ftp -in $FTPSERVER
44008  fi
44009  if test "x$VALID_TOOL" != xyes; then
44010    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44011  fi
44012
44013    mv $tmpfile $installdir/$filename
44014    if test ! -s $installdir/$filename; then
44015      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44016    fi
44017    case "$extension" in
44018      zip)  echo "Unzipping $installdir/$filename..."
44019        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44020        ;;
44021      tar.gz) echo "Untaring $installdir/$filename..."
44022        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44023        ;;
44024      tgz) echo "Untaring $installdir/$filename..."
44025        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44026        ;;
44027      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44028        ;;
44029    esac
44030  fi
44031  if test -f $installdir/$filename.unpacked; then
44032    depdir=$installdir
44033  fi
44034
44035      fi
44036      # Source the builddeps file again, because in the previous command, the depdir
44037      # was updated to point at the current build dependency install directory.
44038      . $builddepsfile
44039      # Now extract variables from the builddeps.conf files.
44040      theroot=${builddep_cups_ROOT}
44041      thecflags=${builddep_cups_CFLAGS}
44042      thelibs=${builddep_cups_LIBS}
44043      if test "x$depdir" = x; then
44044        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44045      fi
44046      CUPS=$depdir
44047      if test "x$theroot" != x; then
44048        CUPS="$theroot"
44049      fi
44050      if test "x$thecflags" != x; then
44051        CUPS_CFLAGS="$thecflags"
44052      fi
44053      if test "x$thelibs" != x; then
44054        CUPS_LIBS="$thelibs"
44055      fi
44056      CUPS_FOUND=yes
44057
44058    fi
44059
44060  fi
44061
44062    fi
44063    if test "x$CUPS_FOUND" = xno; then
44064      # Are the cups headers installed in the default /usr/include location?
44065      for ac_header in cups/cups.h cups/ppd.h
44066do :
44067  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44068ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44069if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44070  cat >>confdefs.h <<_ACEOF
44071#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44072_ACEOF
44073
44074            CUPS_FOUND=yes
44075            CUPS_CFLAGS=
44076            DEFAULT_CUPS=yes
44077
44078
44079fi
44080
44081done
44082
44083    fi
44084    if test "x$CUPS_FOUND" = xno; then
44085      # Getting nervous now? Lets poke around for standard Solaris third-party
44086      # package installation locations.
44087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44088$as_echo_n "checking for cups headers... " >&6; }
44089      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44090        # An SFW package seems to be installed!
44091        CUPS_FOUND=yes
44092        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44093      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44094        # A CSW package seems to be installed!
44095        CUPS_FOUND=yes
44096        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44097      fi
44098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44099$as_echo "$CUPS_FOUND" >&6; }
44100    fi
44101    if test "x$CUPS_FOUND" = xno; then
44102
44103  # Print a helpful message on how to acquire the necessary build dependency.
44104  # cups is the help tag: freetype, cups, pulse, alsa etc
44105  MISSING_DEPENDENCY=cups
44106
44107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44108    cygwin_help $MISSING_DEPENDENCY
44109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44110    msys_help $MISSING_DEPENDENCY
44111  else
44112    PKGHANDLER_COMMAND=
44113
44114    case $PKGHANDLER in
44115      apt-get)
44116        apt_help     $MISSING_DEPENDENCY ;;
44117      yum)
44118        yum_help     $MISSING_DEPENDENCY ;;
44119      port)
44120        port_help    $MISSING_DEPENDENCY ;;
44121      pkgutil)
44122        pkgutil_help $MISSING_DEPENDENCY ;;
44123      pkgadd)
44124        pkgadd_help  $MISSING_DEPENDENCY ;;
44125    esac
44126
44127    if test "x$PKGHANDLER_COMMAND" != x; then
44128      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44129    fi
44130  fi
44131
44132      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44133    fi
44134  fi
44135
44136
44137
44138
44139
44140
44141  ###############################################################################
44142  #
44143  # The ubiquitous freetype library is used to render fonts.
44144  #
44145
44146# Check whether --with-freetype was given.
44147if test "${with_freetype+set}" = set; then :
44148  withval=$with_freetype;
44149fi
44150
44151
44152# Check whether --with-freetype-include was given.
44153if test "${with_freetype_include+set}" = set; then :
44154  withval=$with_freetype_include;
44155fi
44156
44157
44158# Check whether --with-freetype-lib was given.
44159if test "${with_freetype_lib+set}" = set; then :
44160  withval=$with_freetype_lib;
44161fi
44162
44163
44164# Check whether --with-freetype-src was given.
44165if test "${with_freetype_src+set}" = set; then :
44166  withval=$with_freetype_src;
44167fi
44168
44169  # Check whether --enable-freetype-bundling was given.
44170if test "${enable_freetype_bundling+set}" = set; then :
44171  enableval=$enable_freetype_bundling;
44172fi
44173
44174
44175  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44176  FREETYPE_BASE_NAME=freetype
44177  FREETYPE_CFLAGS=
44178  FREETYPE_LIBS=
44179  FREETYPE_BUNDLE_LIB_PATH=
44180
44181  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44182    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44183      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44184$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44185    fi
44186    if test "x$enable_freetype_bundling" != x; then
44187      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44188$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44189    fi
44190  else
44191    # freetype is needed to build; go get it!
44192
44193    BUNDLE_FREETYPE="$enable_freetype_bundling"
44194
44195    if  test "x$with_freetype_src" != x; then
44196      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44197        # Try to build freetype if --with-freetype-src was given on Windows
44198
44199  FREETYPE_SRC_PATH="$with_freetype_src"
44200  BUILD_FREETYPE=yes
44201
44202  # Check if the freetype sources are acessible..
44203  if ! test -d $FREETYPE_SRC_PATH; then
44204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44205$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44206    BUILD_FREETYPE=no
44207  fi
44208  # ..and contain a vc2010 project file
44209  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44210  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44212$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44213    BUILD_FREETYPE=no
44214  fi
44215  # Now check if configure found a version of 'msbuild.exe'
44216  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44217    { $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
44218$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;}
44219    BUILD_FREETYPE=no
44220  fi
44221
44222  # Ready to go..
44223  if test "x$BUILD_FREETYPE" = xyes; then
44224
44225    # msbuild requires trailing slashes for output directories
44226    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44227    freetype_lib_path_unix="$freetype_lib_path"
44228    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44229
44230  unix_path="$vcxproj_path"
44231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44232    windows_path=`$CYGPATH -m "$unix_path"`
44233    vcxproj_path="$windows_path"
44234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44235    windows_path=`cmd //c echo $unix_path`
44236    vcxproj_path="$windows_path"
44237  fi
44238
44239
44240  unix_path="$freetype_lib_path"
44241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44242    windows_path=`$CYGPATH -m "$unix_path"`
44243    freetype_lib_path="$windows_path"
44244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44245    windows_path=`cmd //c echo $unix_path`
44246    freetype_lib_path="$windows_path"
44247  fi
44248
44249
44250  unix_path="$freetype_obj_path"
44251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44252    windows_path=`$CYGPATH -m "$unix_path"`
44253    freetype_obj_path="$windows_path"
44254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44255    windows_path=`cmd //c echo $unix_path`
44256    freetype_obj_path="$windows_path"
44257  fi
44258
44259    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44260      freetype_platform=x64
44261    else
44262      freetype_platform=win32
44263    fi
44264
44265    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44266    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44267    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44268    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44269    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44270$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44271
44272    # First we try to build the freetype.dll
44273    $ECHO -e "@echo off\n"\
44274	     "$MSBUILD $vcxproj_path "\
44275		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44276		       "/p:Configuration=\"Release Multithreaded\" "\
44277		       "/p:Platform=$freetype_platform "\
44278		       "/p:ConfigurationType=DynamicLibrary "\
44279		       "/p:TargetName=freetype "\
44280		       "/p:OutDir=\"$freetype_lib_path\" "\
44281		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44282    cmd /c freetype.bat
44283
44284    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44285      # If that succeeds we also build freetype.lib
44286      $ECHO -e "@echo off\n"\
44287	       "$MSBUILD $vcxproj_path "\
44288			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44289			 "/p:Configuration=\"Release Multithreaded\" "\
44290			 "/p:Platform=$freetype_platform "\
44291			 "/p:ConfigurationType=StaticLibrary "\
44292			 "/p:TargetName=freetype "\
44293			 "/p:OutDir=\"$freetype_lib_path\" "\
44294			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44295      cmd /c freetype.bat
44296
44297      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44298	# Once we build both, lib and dll, set freetype lib and include path appropriately
44299	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44300	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44301	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44302$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44303      else
44304	BUILD_FREETYPE=no
44305      fi
44306    else
44307      BUILD_FREETYPE=no
44308    fi
44309  fi
44310
44311        if test "x$BUILD_FREETYPE" = xyes; then
44312          # Okay, we built it. Check that it works.
44313
44314  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44315  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44316  METHOD="--with-freetype-src"
44317
44318  # Let's start with an optimistic view of the world :-)
44319  FOUND_FREETYPE=yes
44320
44321  # First look for the canonical freetype main include file ft2build.h.
44322  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44323    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44324    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44325    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44326      # Fail.
44327      FOUND_FREETYPE=no
44328    fi
44329  fi
44330
44331  if test "x$FOUND_FREETYPE" = xyes; then
44332    # Include file found, let's continue the sanity check.
44333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44334$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44335
44336    # Reset to default value
44337    FREETYPE_BASE_NAME=freetype
44338    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44339    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44340      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44341          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44342        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44343        # for the .6 version explicitly.
44344        FREETYPE_BASE_NAME=freetype.6
44345        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44346        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44347$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44348      else
44349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44350$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44351        FOUND_FREETYPE=no
44352      fi
44353    else
44354      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44355        # On Windows, we will need both .lib and .dll file.
44356        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44357          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44358$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44359          FOUND_FREETYPE=no
44360        fi
44361      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44362          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44363        # Found lib in isa dir, use that instead.
44364        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44365        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44366$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44367      fi
44368    fi
44369  fi
44370
44371  if test "x$FOUND_FREETYPE" = xyes; then
44372
44373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44374
44375  # Input might be given as Windows format, start by converting to
44376  # unix format.
44377  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44378  new_path=`$CYGPATH -u "$path"`
44379
44380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44383  # "foo.exe" is OK but "foo" is an error.
44384  #
44385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44386  # It is also a way to make sure we got the proper file name for the real test later on.
44387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44388  if test "x$test_shortpath" = x; then
44389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44390$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44391    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44392  fi
44393
44394  # Call helper function which possibly converts this using DOS-style short mode.
44395  # If so, the updated path is stored in $new_path.
44396
44397  input_path="$new_path"
44398  # Check if we need to convert this using DOS-style short mode. If the path
44399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44400  # take no chances and rewrite it.
44401  # Note: m4 eats our [], so we need to use [ and ] instead.
44402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44403  if test "x$has_forbidden_chars" != x; then
44404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44408      # Going to short mode and back again did indeed matter. Since short mode is
44409      # case insensitive, let's make it lowercase to improve readability.
44410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44411      # Now convert it back to Unix-stile (cygpath)
44412      input_path=`$CYGPATH -u "$shortmode_path"`
44413      new_path="$input_path"
44414    fi
44415  fi
44416
44417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44418  if test "x$test_cygdrive_prefix" = x; then
44419    # As a simple fix, exclude /usr/bin since it's not a real path.
44420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44422      # a path prefixed by /cygdrive for fixpath to work.
44423      new_path="$CYGWIN_ROOT_PATH$input_path"
44424    fi
44425  fi
44426
44427
44428  if test "x$path" != "x$new_path"; then
44429    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44431$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44432  fi
44433
44434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44435
44436  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44437  has_colon=`$ECHO $path | $GREP ^.:`
44438  new_path="$path"
44439  if test "x$has_colon" = x; then
44440    # Not in mixed or Windows style, start by that.
44441    new_path=`cmd //c echo $path`
44442  fi
44443
44444
44445  input_path="$new_path"
44446  # Check if we need to convert this using DOS-style short mode. If the path
44447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44448  # take no chances and rewrite it.
44449  # Note: m4 eats our [], so we need to use [ and ] instead.
44450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44451  if test "x$has_forbidden_chars" != x; then
44452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44454  fi
44455
44456
44457  windows_path="$new_path"
44458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44459    unix_path=`$CYGPATH -u "$windows_path"`
44460    new_path="$unix_path"
44461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44463    new_path="$unix_path"
44464  fi
44465
44466  if test "x$path" != "x$new_path"; then
44467    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44469$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44470  fi
44471
44472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44474
44475  else
44476    # We're on a unix platform. Hooray! :)
44477    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44478    has_space=`$ECHO "$path" | $GREP " "`
44479    if test "x$has_space" != x; then
44480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44481$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44483    fi
44484
44485    # Use eval to expand a potential ~
44486    eval path="$path"
44487    if test ! -f "$path" && test ! -d "$path"; then
44488      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44489    fi
44490
44491    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44492  fi
44493
44494
44495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44496
44497  # Input might be given as Windows format, start by converting to
44498  # unix format.
44499  path="$POTENTIAL_FREETYPE_LIB_PATH"
44500  new_path=`$CYGPATH -u "$path"`
44501
44502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44505  # "foo.exe" is OK but "foo" is an error.
44506  #
44507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44508  # It is also a way to make sure we got the proper file name for the real test later on.
44509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44510  if test "x$test_shortpath" = x; then
44511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44513    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44514  fi
44515
44516  # Call helper function which possibly converts this using DOS-style short mode.
44517  # If so, the updated path is stored in $new_path.
44518
44519  input_path="$new_path"
44520  # Check if we need to convert this using DOS-style short mode. If the path
44521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44522  # take no chances and rewrite it.
44523  # Note: m4 eats our [], so we need to use [ and ] instead.
44524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44525  if test "x$has_forbidden_chars" != x; then
44526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44530      # Going to short mode and back again did indeed matter. Since short mode is
44531      # case insensitive, let's make it lowercase to improve readability.
44532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44533      # Now convert it back to Unix-stile (cygpath)
44534      input_path=`$CYGPATH -u "$shortmode_path"`
44535      new_path="$input_path"
44536    fi
44537  fi
44538
44539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44540  if test "x$test_cygdrive_prefix" = x; then
44541    # As a simple fix, exclude /usr/bin since it's not a real path.
44542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44544      # a path prefixed by /cygdrive for fixpath to work.
44545      new_path="$CYGWIN_ROOT_PATH$input_path"
44546    fi
44547  fi
44548
44549
44550  if test "x$path" != "x$new_path"; then
44551    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44554  fi
44555
44556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44557
44558  path="$POTENTIAL_FREETYPE_LIB_PATH"
44559  has_colon=`$ECHO $path | $GREP ^.:`
44560  new_path="$path"
44561  if test "x$has_colon" = x; then
44562    # Not in mixed or Windows style, start by that.
44563    new_path=`cmd //c echo $path`
44564  fi
44565
44566
44567  input_path="$new_path"
44568  # Check if we need to convert this using DOS-style short mode. If the path
44569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44570  # take no chances and rewrite it.
44571  # Note: m4 eats our [], so we need to use [ and ] instead.
44572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44573  if test "x$has_forbidden_chars" != x; then
44574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44576  fi
44577
44578
44579  windows_path="$new_path"
44580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44581    unix_path=`$CYGPATH -u "$windows_path"`
44582    new_path="$unix_path"
44583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44585    new_path="$unix_path"
44586  fi
44587
44588  if test "x$path" != "x$new_path"; then
44589    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44592  fi
44593
44594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44596
44597  else
44598    # We're on a unix platform. Hooray! :)
44599    path="$POTENTIAL_FREETYPE_LIB_PATH"
44600    has_space=`$ECHO "$path" | $GREP " "`
44601    if test "x$has_space" != x; then
44602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44604      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44605    fi
44606
44607    # Use eval to expand a potential ~
44608    eval path="$path"
44609    if test ! -f "$path" && test ! -d "$path"; then
44610      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44611    fi
44612
44613    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44614  fi
44615
44616
44617    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44619$as_echo_n "checking for freetype includes... " >&6; }
44620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44621$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44622    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44624$as_echo_n "checking for freetype libraries... " >&6; }
44625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44626$as_echo "$FREETYPE_LIB_PATH" >&6; }
44627  fi
44628
44629          if test "x$FOUND_FREETYPE" != xyes; then
44630            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44631          fi
44632        else
44633          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44634$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44635          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44636        fi
44637      else
44638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44639$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44640      fi
44641    fi
44642
44643    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44644      # User has specified settings
44645
44646      if test "x$BUNDLE_FREETYPE" = x; then
44647        # If not specified, default is to bundle freetype
44648        BUNDLE_FREETYPE=yes
44649      fi
44650
44651      if test "x$with_freetype" != x; then
44652        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44653        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44654      fi
44655
44656      # Allow --with-freetype-lib and --with-freetype-include to override
44657      if test "x$with_freetype_include" != x; then
44658        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44659      fi
44660      if test "x$with_freetype_lib" != x; then
44661        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44662      fi
44663
44664      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44665        # Okay, we got it. Check that it works.
44666
44667  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44668  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44669  METHOD="--with-freetype"
44670
44671  # Let's start with an optimistic view of the world :-)
44672  FOUND_FREETYPE=yes
44673
44674  # First look for the canonical freetype main include file ft2build.h.
44675  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44676    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44677    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44678    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44679      # Fail.
44680      FOUND_FREETYPE=no
44681    fi
44682  fi
44683
44684  if test "x$FOUND_FREETYPE" = xyes; then
44685    # Include file found, let's continue the sanity check.
44686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44687$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44688
44689    # Reset to default value
44690    FREETYPE_BASE_NAME=freetype
44691    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44692    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44693      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44694          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44695        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44696        # for the .6 version explicitly.
44697        FREETYPE_BASE_NAME=freetype.6
44698        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44699        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44700$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44701      else
44702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44703$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44704        FOUND_FREETYPE=no
44705      fi
44706    else
44707      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44708        # On Windows, we will need both .lib and .dll file.
44709        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44710          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44711$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44712          FOUND_FREETYPE=no
44713        fi
44714      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44716        # Found lib in isa dir, use that instead.
44717        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44718        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44719$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44720      fi
44721    fi
44722  fi
44723
44724  if test "x$FOUND_FREETYPE" = xyes; then
44725
44726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44727
44728  # Input might be given as Windows format, start by converting to
44729  # unix format.
44730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44731  new_path=`$CYGPATH -u "$path"`
44732
44733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44736  # "foo.exe" is OK but "foo" is an error.
44737  #
44738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44739  # It is also a way to make sure we got the proper file name for the real test later on.
44740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44741  if test "x$test_shortpath" = x; then
44742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44744    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44745  fi
44746
44747  # Call helper function which possibly converts this using DOS-style short mode.
44748  # If so, the updated path is stored in $new_path.
44749
44750  input_path="$new_path"
44751  # Check if we need to convert this using DOS-style short mode. If the path
44752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44753  # take no chances and rewrite it.
44754  # Note: m4 eats our [], so we need to use [ and ] instead.
44755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44756  if test "x$has_forbidden_chars" != x; then
44757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44761      # Going to short mode and back again did indeed matter. Since short mode is
44762      # case insensitive, let's make it lowercase to improve readability.
44763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44764      # Now convert it back to Unix-stile (cygpath)
44765      input_path=`$CYGPATH -u "$shortmode_path"`
44766      new_path="$input_path"
44767    fi
44768  fi
44769
44770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44771  if test "x$test_cygdrive_prefix" = x; then
44772    # As a simple fix, exclude /usr/bin since it's not a real path.
44773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44775      # a path prefixed by /cygdrive for fixpath to work.
44776      new_path="$CYGWIN_ROOT_PATH$input_path"
44777    fi
44778  fi
44779
44780
44781  if test "x$path" != "x$new_path"; then
44782    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44784$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44785  fi
44786
44787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44788
44789  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44790  has_colon=`$ECHO $path | $GREP ^.:`
44791  new_path="$path"
44792  if test "x$has_colon" = x; then
44793    # Not in mixed or Windows style, start by that.
44794    new_path=`cmd //c echo $path`
44795  fi
44796
44797
44798  input_path="$new_path"
44799  # Check if we need to convert this using DOS-style short mode. If the path
44800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44801  # take no chances and rewrite it.
44802  # Note: m4 eats our [], so we need to use [ and ] instead.
44803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44804  if test "x$has_forbidden_chars" != x; then
44805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44807  fi
44808
44809
44810  windows_path="$new_path"
44811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44812    unix_path=`$CYGPATH -u "$windows_path"`
44813    new_path="$unix_path"
44814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44816    new_path="$unix_path"
44817  fi
44818
44819  if test "x$path" != "x$new_path"; then
44820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44823  fi
44824
44825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44827
44828  else
44829    # We're on a unix platform. Hooray! :)
44830    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44831    has_space=`$ECHO "$path" | $GREP " "`
44832    if test "x$has_space" != x; then
44833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44835      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44836    fi
44837
44838    # Use eval to expand a potential ~
44839    eval path="$path"
44840    if test ! -f "$path" && test ! -d "$path"; then
44841      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44842    fi
44843
44844    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44845  fi
44846
44847
44848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44849
44850  # Input might be given as Windows format, start by converting to
44851  # unix format.
44852  path="$POTENTIAL_FREETYPE_LIB_PATH"
44853  new_path=`$CYGPATH -u "$path"`
44854
44855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44858  # "foo.exe" is OK but "foo" is an error.
44859  #
44860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44861  # It is also a way to make sure we got the proper file name for the real test later on.
44862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44863  if test "x$test_shortpath" = x; then
44864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44867  fi
44868
44869  # Call helper function which possibly converts this using DOS-style short mode.
44870  # If so, the updated path is stored in $new_path.
44871
44872  input_path="$new_path"
44873  # Check if we need to convert this using DOS-style short mode. If the path
44874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44875  # take no chances and rewrite it.
44876  # Note: m4 eats our [], so we need to use [ and ] instead.
44877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44878  if test "x$has_forbidden_chars" != x; then
44879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44883      # Going to short mode and back again did indeed matter. Since short mode is
44884      # case insensitive, let's make it lowercase to improve readability.
44885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44886      # Now convert it back to Unix-stile (cygpath)
44887      input_path=`$CYGPATH -u "$shortmode_path"`
44888      new_path="$input_path"
44889    fi
44890  fi
44891
44892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44893  if test "x$test_cygdrive_prefix" = x; then
44894    # As a simple fix, exclude /usr/bin since it's not a real path.
44895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44897      # a path prefixed by /cygdrive for fixpath to work.
44898      new_path="$CYGWIN_ROOT_PATH$input_path"
44899    fi
44900  fi
44901
44902
44903  if test "x$path" != "x$new_path"; then
44904    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44907  fi
44908
44909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44910
44911  path="$POTENTIAL_FREETYPE_LIB_PATH"
44912  has_colon=`$ECHO $path | $GREP ^.:`
44913  new_path="$path"
44914  if test "x$has_colon" = x; then
44915    # Not in mixed or Windows style, start by that.
44916    new_path=`cmd //c echo $path`
44917  fi
44918
44919
44920  input_path="$new_path"
44921  # Check if we need to convert this using DOS-style short mode. If the path
44922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44923  # take no chances and rewrite it.
44924  # Note: m4 eats our [], so we need to use [ and ] instead.
44925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44926  if test "x$has_forbidden_chars" != x; then
44927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44929  fi
44930
44931
44932  windows_path="$new_path"
44933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44934    unix_path=`$CYGPATH -u "$windows_path"`
44935    new_path="$unix_path"
44936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44938    new_path="$unix_path"
44939  fi
44940
44941  if test "x$path" != "x$new_path"; then
44942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44945  fi
44946
44947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44949
44950  else
44951    # We're on a unix platform. Hooray! :)
44952    path="$POTENTIAL_FREETYPE_LIB_PATH"
44953    has_space=`$ECHO "$path" | $GREP " "`
44954    if test "x$has_space" != x; then
44955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44957      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44958    fi
44959
44960    # Use eval to expand a potential ~
44961    eval path="$path"
44962    if test ! -f "$path" && test ! -d "$path"; then
44963      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44964    fi
44965
44966    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44967  fi
44968
44969
44970    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44972$as_echo_n "checking for freetype includes... " >&6; }
44973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44974$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44975    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44977$as_echo_n "checking for freetype libraries... " >&6; }
44978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44979$as_echo "$FREETYPE_LIB_PATH" >&6; }
44980  fi
44981
44982        if test "x$FOUND_FREETYPE" != xyes; then
44983          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44984        fi
44985      else
44986        # User specified only one of lib or include. This is an error.
44987        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44988          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44989$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44990          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44991        else
44992          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44993$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44994          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44995        fi
44996      fi
44997    else
44998      # User did not specify settings, but we need freetype. Try to locate it.
44999
45000      if test "x$BUNDLE_FREETYPE" = x; then
45001        # If not specified, default is to bundle freetype only on windows
45002        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45003          BUNDLE_FREETYPE=yes
45004        else
45005          BUNDLE_FREETYPE=no
45006        fi
45007      fi
45008
45009      if test "x$FOUND_FREETYPE" != xyes; then
45010        # Check builddeps
45011
45012
45013  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45014    # Source the builddeps file again, to make sure it uses the latest variables!
45015    . $builddepsfile
45016    # Look for a target and build machine specific resource!
45017    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45018    if test "x$resource" = x; then
45019      # Ok, lets instead look for a target specific resource
45020      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45021    fi
45022    if test "x$resource" = x; then
45023      # Ok, lets instead look for a build specific resource
45024      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45025    fi
45026    if test "x$resource" = x; then
45027      # Ok, lets instead look for a generic resource
45028      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45029      resource=${builddep_freetype2}
45030    fi
45031    if test "x$resource" != x; then
45032      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45033$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45034      # If the resource in the builddeps.conf file is an existing directory,
45035      # for example /java/linux/cups
45036      if test -d ${resource}; then
45037        depdir=${resource}
45038      else
45039
45040  # freetype2 is for example mymodule
45041  # $resource is for example libs/general/libmymod_1_2_3.zip
45042  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45043  # $with_builddeps_dir is for example /localhome/builddeps
45044  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45045  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45046  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45047  filename=`basename $resource`
45048  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45049  filebase=${filename%%.*}
45050  extension=${filename#*.}
45051  installdir=$with_builddeps_dir/$filebase
45052  if test ! -f $installdir/$filename.unpacked; then
45053    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45054$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45055    if test ! -d $installdir; then
45056      mkdir -p $installdir
45057    fi
45058    if test ! -d $installdir; then
45059      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45060    fi
45061    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45062    touch $tmpfile
45063    if test ! -f $tmpfile; then
45064      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45065    fi
45066
45067  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45068  # $tmpfile is the local file name for the downloaded file.
45069  VALID_TOOL=no
45070  if test "x$BDEPS_FTP" = xwget; then
45071    VALID_TOOL=yes
45072    wget -O $tmpfile $with_builddeps_server/$resource
45073  fi
45074  if test "x$BDEPS_FTP" = xlftp; then
45075    VALID_TOOL=yes
45076    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45077  fi
45078  if test "x$BDEPS_FTP" = xftp; then
45079    VALID_TOOL=yes
45080    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45081    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45082    FTPUSERPWD=${FTPSERVER%%@*}
45083    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45084      FTPUSER=${userpwd%%:*}
45085      FTPPWD=${userpwd#*@}
45086      FTPSERVER=${FTPSERVER#*@}
45087    else
45088      FTPUSER=ftp
45089      FTPPWD=ftp
45090    fi
45091    # the "pass" command does not work on some
45092    # ftp clients (read ftp.exe) but if it works,
45093    # passive mode is better!
45094    ( \
45095        echo "user $FTPUSER $FTPPWD"        ; \
45096        echo "pass"                         ; \
45097        echo "bin"                          ; \
45098        echo "get $FTPPATH $tmpfile"              ; \
45099    ) | ftp -in $FTPSERVER
45100  fi
45101  if test "x$VALID_TOOL" != xyes; then
45102    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45103  fi
45104
45105    mv $tmpfile $installdir/$filename
45106    if test ! -s $installdir/$filename; then
45107      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45108    fi
45109    case "$extension" in
45110      zip)  echo "Unzipping $installdir/$filename..."
45111        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45112        ;;
45113      tar.gz) echo "Untaring $installdir/$filename..."
45114        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45115        ;;
45116      tgz) echo "Untaring $installdir/$filename..."
45117        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45118        ;;
45119      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45120        ;;
45121    esac
45122  fi
45123  if test -f $installdir/$filename.unpacked; then
45124    depdir=$installdir
45125  fi
45126
45127      fi
45128      # Source the builddeps file again, because in the previous command, the depdir
45129      # was updated to point at the current build dependency install directory.
45130      . $builddepsfile
45131      # Now extract variables from the builddeps.conf files.
45132      theroot=${builddep_freetype2_ROOT}
45133      thecflags=${builddep_freetype2_CFLAGS}
45134      thelibs=${builddep_freetype2_LIBS}
45135      if test "x$depdir" = x; then
45136        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45137      fi
45138      FREETYPE=$depdir
45139      if test "x$theroot" != x; then
45140        FREETYPE="$theroot"
45141      fi
45142      if test "x$thecflags" != x; then
45143        FREETYPE_CFLAGS="$thecflags"
45144      fi
45145      if test "x$thelibs" != x; then
45146        FREETYPE_LIBS="$thelibs"
45147      fi
45148      FOUND_FREETYPE=yes
45149      else FOUND_FREETYPE=no
45150
45151    fi
45152    else FOUND_FREETYPE=no
45153
45154  fi
45155
45156        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45157        if test "x$FOUND_FREETYPE" = xyes; then
45158          if test "x$BUNDLE_FREETYPE" = xyes; then
45159            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45160$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45161            FOUND_FREETYPE=no
45162          else
45163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45164$as_echo_n "checking for freetype... " >&6; }
45165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45166$as_echo "yes (using builddeps)" >&6; }
45167          fi
45168        fi
45169      fi
45170
45171      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45172      if test "x$SYSROOT" = x; then
45173        if test "x$FOUND_FREETYPE" != xyes; then
45174          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45175          if test "x$PKG_CONFIG" != x; then
45176
45177pkg_failed=no
45178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45179$as_echo_n "checking for FREETYPE... " >&6; }
45180
45181if test -n "$FREETYPE_CFLAGS"; then
45182    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45183 elif test -n "$PKG_CONFIG"; then
45184    if test -n "$PKG_CONFIG" && \
45185    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45186  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45187  ac_status=$?
45188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45189  test $ac_status = 0; }; then
45190  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45191else
45192  pkg_failed=yes
45193fi
45194 else
45195    pkg_failed=untried
45196fi
45197if test -n "$FREETYPE_LIBS"; then
45198    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45199 elif test -n "$PKG_CONFIG"; then
45200    if test -n "$PKG_CONFIG" && \
45201    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45202  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45203  ac_status=$?
45204  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45205  test $ac_status = 0; }; then
45206  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45207else
45208  pkg_failed=yes
45209fi
45210 else
45211    pkg_failed=untried
45212fi
45213
45214
45215
45216if test $pkg_failed = yes; then
45217
45218if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45219        _pkg_short_errors_supported=yes
45220else
45221        _pkg_short_errors_supported=no
45222fi
45223        if test $_pkg_short_errors_supported = yes; then
45224	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45225        else
45226	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45227        fi
45228	# Put the nasty error message in config.log where it belongs
45229	echo "$FREETYPE_PKG_ERRORS" >&5
45230
45231	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45232$as_echo "no" >&6; }
45233                FOUND_FREETYPE=no
45234elif test $pkg_failed = untried; then
45235	FOUND_FREETYPE=no
45236else
45237	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45238	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45240$as_echo "yes" >&6; }
45241	FOUND_FREETYPE=yes
45242fi
45243            if test "x$FOUND_FREETYPE" = xyes; then
45244              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45245              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45246              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45247              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45248                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45249              fi
45250              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45251              if test "x$BUNDLE_FREETYPE" = xyes; then
45252                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45253$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45254                FOUND_FREETYPE=no
45255              else
45256                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45257$as_echo_n "checking for freetype... " >&6; }
45258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45259$as_echo "yes (using pkg-config)" >&6; }
45260              fi
45261            fi
45262          fi
45263        fi
45264      fi
45265
45266      if test "x$FOUND_FREETYPE" != xyes; then
45267        # Check in well-known locations
45268        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45269          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45270
45271  windows_path="$FREETYPE_BASE_DIR"
45272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45273    unix_path=`$CYGPATH -u "$windows_path"`
45274    FREETYPE_BASE_DIR="$unix_path"
45275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45277    FREETYPE_BASE_DIR="$unix_path"
45278  fi
45279
45280
45281  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45282  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45283  METHOD="well-known location"
45284
45285  # Let's start with an optimistic view of the world :-)
45286  FOUND_FREETYPE=yes
45287
45288  # First look for the canonical freetype main include file ft2build.h.
45289  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45290    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45291    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45292    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45293      # Fail.
45294      FOUND_FREETYPE=no
45295    fi
45296  fi
45297
45298  if test "x$FOUND_FREETYPE" = xyes; then
45299    # Include file found, let's continue the sanity check.
45300    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45301$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45302
45303    # Reset to default value
45304    FREETYPE_BASE_NAME=freetype
45305    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45306    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45307      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45308          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45309        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45310        # for the .6 version explicitly.
45311        FREETYPE_BASE_NAME=freetype.6
45312        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45313        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45314$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45315      else
45316        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45317$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45318        FOUND_FREETYPE=no
45319      fi
45320    else
45321      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45322        # On Windows, we will need both .lib and .dll file.
45323        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45324          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45325$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45326          FOUND_FREETYPE=no
45327        fi
45328      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45329          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45330        # Found lib in isa dir, use that instead.
45331        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45332        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45333$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45334      fi
45335    fi
45336  fi
45337
45338  if test "x$FOUND_FREETYPE" = xyes; then
45339
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341
45342  # Input might be given as Windows format, start by converting to
45343  # unix format.
45344  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45345  new_path=`$CYGPATH -u "$path"`
45346
45347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45350  # "foo.exe" is OK but "foo" is an error.
45351  #
45352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45353  # It is also a way to make sure we got the proper file name for the real test later on.
45354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45355  if test "x$test_shortpath" = x; then
45356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45358    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45359  fi
45360
45361  # Call helper function which possibly converts this using DOS-style short mode.
45362  # If so, the updated path is stored in $new_path.
45363
45364  input_path="$new_path"
45365  # Check if we need to convert this using DOS-style short mode. If the path
45366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45367  # take no chances and rewrite it.
45368  # Note: m4 eats our [], so we need to use [ and ] instead.
45369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45370  if test "x$has_forbidden_chars" != x; then
45371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45375      # Going to short mode and back again did indeed matter. Since short mode is
45376      # case insensitive, let's make it lowercase to improve readability.
45377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45378      # Now convert it back to Unix-stile (cygpath)
45379      input_path=`$CYGPATH -u "$shortmode_path"`
45380      new_path="$input_path"
45381    fi
45382  fi
45383
45384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45385  if test "x$test_cygdrive_prefix" = x; then
45386    # As a simple fix, exclude /usr/bin since it's not a real path.
45387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45389      # a path prefixed by /cygdrive for fixpath to work.
45390      new_path="$CYGWIN_ROOT_PATH$input_path"
45391    fi
45392  fi
45393
45394
45395  if test "x$path" != "x$new_path"; then
45396    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45399  fi
45400
45401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45402
45403  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45404  has_colon=`$ECHO $path | $GREP ^.:`
45405  new_path="$path"
45406  if test "x$has_colon" = x; then
45407    # Not in mixed or Windows style, start by that.
45408    new_path=`cmd //c echo $path`
45409  fi
45410
45411
45412  input_path="$new_path"
45413  # Check if we need to convert this using DOS-style short mode. If the path
45414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45415  # take no chances and rewrite it.
45416  # Note: m4 eats our [], so we need to use [ and ] instead.
45417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45418  if test "x$has_forbidden_chars" != x; then
45419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45421  fi
45422
45423
45424  windows_path="$new_path"
45425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45426    unix_path=`$CYGPATH -u "$windows_path"`
45427    new_path="$unix_path"
45428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45430    new_path="$unix_path"
45431  fi
45432
45433  if test "x$path" != "x$new_path"; then
45434    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45436$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45437  fi
45438
45439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45441
45442  else
45443    # We're on a unix platform. Hooray! :)
45444    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45445    has_space=`$ECHO "$path" | $GREP " "`
45446    if test "x$has_space" != x; then
45447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45448$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45449      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45450    fi
45451
45452    # Use eval to expand a potential ~
45453    eval path="$path"
45454    if test ! -f "$path" && test ! -d "$path"; then
45455      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45456    fi
45457
45458    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45459  fi
45460
45461
45462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45463
45464  # Input might be given as Windows format, start by converting to
45465  # unix format.
45466  path="$POTENTIAL_FREETYPE_LIB_PATH"
45467  new_path=`$CYGPATH -u "$path"`
45468
45469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45472  # "foo.exe" is OK but "foo" is an error.
45473  #
45474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45475  # It is also a way to make sure we got the proper file name for the real test later on.
45476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45477  if test "x$test_shortpath" = x; then
45478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45480    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45481  fi
45482
45483  # Call helper function which possibly converts this using DOS-style short mode.
45484  # If so, the updated path is stored in $new_path.
45485
45486  input_path="$new_path"
45487  # Check if we need to convert this using DOS-style short mode. If the path
45488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45489  # take no chances and rewrite it.
45490  # Note: m4 eats our [], so we need to use [ and ] instead.
45491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45492  if test "x$has_forbidden_chars" != x; then
45493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45497      # Going to short mode and back again did indeed matter. Since short mode is
45498      # case insensitive, let's make it lowercase to improve readability.
45499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45500      # Now convert it back to Unix-stile (cygpath)
45501      input_path=`$CYGPATH -u "$shortmode_path"`
45502      new_path="$input_path"
45503    fi
45504  fi
45505
45506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45507  if test "x$test_cygdrive_prefix" = x; then
45508    # As a simple fix, exclude /usr/bin since it's not a real path.
45509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45511      # a path prefixed by /cygdrive for fixpath to work.
45512      new_path="$CYGWIN_ROOT_PATH$input_path"
45513    fi
45514  fi
45515
45516
45517  if test "x$path" != "x$new_path"; then
45518    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45520$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45521  fi
45522
45523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45524
45525  path="$POTENTIAL_FREETYPE_LIB_PATH"
45526  has_colon=`$ECHO $path | $GREP ^.:`
45527  new_path="$path"
45528  if test "x$has_colon" = x; then
45529    # Not in mixed or Windows style, start by that.
45530    new_path=`cmd //c echo $path`
45531  fi
45532
45533
45534  input_path="$new_path"
45535  # Check if we need to convert this using DOS-style short mode. If the path
45536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45537  # take no chances and rewrite it.
45538  # Note: m4 eats our [], so we need to use [ and ] instead.
45539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45540  if test "x$has_forbidden_chars" != x; then
45541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45543  fi
45544
45545
45546  windows_path="$new_path"
45547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45548    unix_path=`$CYGPATH -u "$windows_path"`
45549    new_path="$unix_path"
45550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45552    new_path="$unix_path"
45553  fi
45554
45555  if test "x$path" != "x$new_path"; then
45556    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45559  fi
45560
45561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45563
45564  else
45565    # We're on a unix platform. Hooray! :)
45566    path="$POTENTIAL_FREETYPE_LIB_PATH"
45567    has_space=`$ECHO "$path" | $GREP " "`
45568    if test "x$has_space" != x; then
45569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45571      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45572    fi
45573
45574    # Use eval to expand a potential ~
45575    eval path="$path"
45576    if test ! -f "$path" && test ! -d "$path"; then
45577      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45578    fi
45579
45580    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45581  fi
45582
45583
45584    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45586$as_echo_n "checking for freetype includes... " >&6; }
45587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45588$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45589    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45591$as_echo_n "checking for freetype libraries... " >&6; }
45592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45593$as_echo "$FREETYPE_LIB_PATH" >&6; }
45594  fi
45595
45596          if test "x$FOUND_FREETYPE" != xyes; then
45597            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45598
45599  windows_path="$FREETYPE_BASE_DIR"
45600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45601    unix_path=`$CYGPATH -u "$windows_path"`
45602    FREETYPE_BASE_DIR="$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    FREETYPE_BASE_DIR="$unix_path"
45606  fi
45607
45608
45609  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45610  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45611  METHOD="well-known location"
45612
45613  # Let's start with an optimistic view of the world :-)
45614  FOUND_FREETYPE=yes
45615
45616  # First look for the canonical freetype main include file ft2build.h.
45617  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45618    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45619    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45620    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45621      # Fail.
45622      FOUND_FREETYPE=no
45623    fi
45624  fi
45625
45626  if test "x$FOUND_FREETYPE" = xyes; then
45627    # Include file found, let's continue the sanity check.
45628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45629$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45630
45631    # Reset to default value
45632    FREETYPE_BASE_NAME=freetype
45633    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45634    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45635      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45636          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45637        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45638        # for the .6 version explicitly.
45639        FREETYPE_BASE_NAME=freetype.6
45640        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45641        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45642$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45643      else
45644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45645$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45646        FOUND_FREETYPE=no
45647      fi
45648    else
45649      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45650        # On Windows, we will need both .lib and .dll file.
45651        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45652          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45653$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45654          FOUND_FREETYPE=no
45655        fi
45656      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45657          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45658        # Found lib in isa dir, use that instead.
45659        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45660        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45661$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45662      fi
45663    fi
45664  fi
45665
45666  if test "x$FOUND_FREETYPE" = xyes; then
45667
45668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45669
45670  # Input might be given as Windows format, start by converting to
45671  # unix format.
45672  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45673  new_path=`$CYGPATH -u "$path"`
45674
45675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45678  # "foo.exe" is OK but "foo" is an error.
45679  #
45680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45681  # It is also a way to make sure we got the proper file name for the real test later on.
45682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45683  if test "x$test_shortpath" = x; then
45684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45686    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45687  fi
45688
45689  # Call helper function which possibly converts this using DOS-style short mode.
45690  # If so, the updated path is stored in $new_path.
45691
45692  input_path="$new_path"
45693  # Check if we need to convert this using DOS-style short mode. If the path
45694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45695  # take no chances and rewrite it.
45696  # Note: m4 eats our [], so we need to use [ and ] instead.
45697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45698  if test "x$has_forbidden_chars" != x; then
45699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45703      # Going to short mode and back again did indeed matter. Since short mode is
45704      # case insensitive, let's make it lowercase to improve readability.
45705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45706      # Now convert it back to Unix-stile (cygpath)
45707      input_path=`$CYGPATH -u "$shortmode_path"`
45708      new_path="$input_path"
45709    fi
45710  fi
45711
45712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45713  if test "x$test_cygdrive_prefix" = x; then
45714    # As a simple fix, exclude /usr/bin since it's not a real path.
45715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45717      # a path prefixed by /cygdrive for fixpath to work.
45718      new_path="$CYGWIN_ROOT_PATH$input_path"
45719    fi
45720  fi
45721
45722
45723  if test "x$path" != "x$new_path"; then
45724    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45727  fi
45728
45729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45730
45731  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45732  has_colon=`$ECHO $path | $GREP ^.:`
45733  new_path="$path"
45734  if test "x$has_colon" = x; then
45735    # Not in mixed or Windows style, start by that.
45736    new_path=`cmd //c echo $path`
45737  fi
45738
45739
45740  input_path="$new_path"
45741  # Check if we need to convert this using DOS-style short mode. If the path
45742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45743  # take no chances and rewrite it.
45744  # Note: m4 eats our [], so we need to use [ and ] instead.
45745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45746  if test "x$has_forbidden_chars" != x; then
45747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45749  fi
45750
45751
45752  windows_path="$new_path"
45753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45754    unix_path=`$CYGPATH -u "$windows_path"`
45755    new_path="$unix_path"
45756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45758    new_path="$unix_path"
45759  fi
45760
45761  if test "x$path" != "x$new_path"; then
45762    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45765  fi
45766
45767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45769
45770  else
45771    # We're on a unix platform. Hooray! :)
45772    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45773    has_space=`$ECHO "$path" | $GREP " "`
45774    if test "x$has_space" != x; then
45775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45776$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45777      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45778    fi
45779
45780    # Use eval to expand a potential ~
45781    eval path="$path"
45782    if test ! -f "$path" && test ! -d "$path"; then
45783      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45784    fi
45785
45786    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45787  fi
45788
45789
45790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45791
45792  # Input might be given as Windows format, start by converting to
45793  # unix format.
45794  path="$POTENTIAL_FREETYPE_LIB_PATH"
45795  new_path=`$CYGPATH -u "$path"`
45796
45797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45800  # "foo.exe" is OK but "foo" is an error.
45801  #
45802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45803  # It is also a way to make sure we got the proper file name for the real test later on.
45804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45805  if test "x$test_shortpath" = x; then
45806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45808    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45809  fi
45810
45811  # Call helper function which possibly converts this using DOS-style short mode.
45812  # If so, the updated path is stored in $new_path.
45813
45814  input_path="$new_path"
45815  # Check if we need to convert this using DOS-style short mode. If the path
45816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45817  # take no chances and rewrite it.
45818  # Note: m4 eats our [], so we need to use [ and ] instead.
45819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45820  if test "x$has_forbidden_chars" != x; then
45821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45825      # Going to short mode and back again did indeed matter. Since short mode is
45826      # case insensitive, let's make it lowercase to improve readability.
45827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45828      # Now convert it back to Unix-stile (cygpath)
45829      input_path=`$CYGPATH -u "$shortmode_path"`
45830      new_path="$input_path"
45831    fi
45832  fi
45833
45834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45835  if test "x$test_cygdrive_prefix" = x; then
45836    # As a simple fix, exclude /usr/bin since it's not a real path.
45837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45839      # a path prefixed by /cygdrive for fixpath to work.
45840      new_path="$CYGWIN_ROOT_PATH$input_path"
45841    fi
45842  fi
45843
45844
45845  if test "x$path" != "x$new_path"; then
45846    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45849  fi
45850
45851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45852
45853  path="$POTENTIAL_FREETYPE_LIB_PATH"
45854  has_colon=`$ECHO $path | $GREP ^.:`
45855  new_path="$path"
45856  if test "x$has_colon" = x; then
45857    # Not in mixed or Windows style, start by that.
45858    new_path=`cmd //c echo $path`
45859  fi
45860
45861
45862  input_path="$new_path"
45863  # Check if we need to convert this using DOS-style short mode. If the path
45864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45865  # take no chances and rewrite it.
45866  # Note: m4 eats our [], so we need to use [ and ] instead.
45867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45868  if test "x$has_forbidden_chars" != x; then
45869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45871  fi
45872
45873
45874  windows_path="$new_path"
45875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45876    unix_path=`$CYGPATH -u "$windows_path"`
45877    new_path="$unix_path"
45878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45880    new_path="$unix_path"
45881  fi
45882
45883  if test "x$path" != "x$new_path"; then
45884    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45887  fi
45888
45889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45891
45892  else
45893    # We're on a unix platform. Hooray! :)
45894    path="$POTENTIAL_FREETYPE_LIB_PATH"
45895    has_space=`$ECHO "$path" | $GREP " "`
45896    if test "x$has_space" != x; then
45897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45899      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45900    fi
45901
45902    # Use eval to expand a potential ~
45903    eval path="$path"
45904    if test ! -f "$path" && test ! -d "$path"; then
45905      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45906    fi
45907
45908    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45909  fi
45910
45911
45912    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45914$as_echo_n "checking for freetype includes... " >&6; }
45915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45916$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45917    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45919$as_echo_n "checking for freetype libraries... " >&6; }
45920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45921$as_echo "$FREETYPE_LIB_PATH" >&6; }
45922  fi
45923
45924          fi
45925        else
45926          FREETYPE_BASE_DIR="$SYSROOT/usr"
45927
45928  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45929  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45930  METHOD="well-known location"
45931
45932  # Let's start with an optimistic view of the world :-)
45933  FOUND_FREETYPE=yes
45934
45935  # First look for the canonical freetype main include file ft2build.h.
45936  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45937    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45938    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45939    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45940      # Fail.
45941      FOUND_FREETYPE=no
45942    fi
45943  fi
45944
45945  if test "x$FOUND_FREETYPE" = xyes; then
45946    # Include file found, let's continue the sanity check.
45947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45948$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45949
45950    # Reset to default value
45951    FREETYPE_BASE_NAME=freetype
45952    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45953    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45954      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45955          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45956        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45957        # for the .6 version explicitly.
45958        FREETYPE_BASE_NAME=freetype.6
45959        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45960        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45961$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45962      else
45963        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45964$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45965        FOUND_FREETYPE=no
45966      fi
45967    else
45968      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45969        # On Windows, we will need both .lib and .dll file.
45970        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45971          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45973          FOUND_FREETYPE=no
45974        fi
45975      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45977        # Found lib in isa dir, use that instead.
45978        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45979        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45980$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45981      fi
45982    fi
45983  fi
45984
45985  if test "x$FOUND_FREETYPE" = xyes; then
45986
45987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45988
45989  # Input might be given as Windows format, start by converting to
45990  # unix format.
45991  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45992  new_path=`$CYGPATH -u "$path"`
45993
45994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45997  # "foo.exe" is OK but "foo" is an error.
45998  #
45999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46000  # It is also a way to make sure we got the proper file name for the real test later on.
46001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46002  if test "x$test_shortpath" = x; then
46003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46005    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46006  fi
46007
46008  # Call helper function which possibly converts this using DOS-style short mode.
46009  # If so, the updated path is stored in $new_path.
46010
46011  input_path="$new_path"
46012  # Check if we need to convert this using DOS-style short mode. If the path
46013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46014  # take no chances and rewrite it.
46015  # Note: m4 eats our [], so we need to use [ and ] instead.
46016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46017  if test "x$has_forbidden_chars" != x; then
46018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46022      # Going to short mode and back again did indeed matter. Since short mode is
46023      # case insensitive, let's make it lowercase to improve readability.
46024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46025      # Now convert it back to Unix-stile (cygpath)
46026      input_path=`$CYGPATH -u "$shortmode_path"`
46027      new_path="$input_path"
46028    fi
46029  fi
46030
46031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46032  if test "x$test_cygdrive_prefix" = x; then
46033    # As a simple fix, exclude /usr/bin since it's not a real path.
46034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46036      # a path prefixed by /cygdrive for fixpath to work.
46037      new_path="$CYGWIN_ROOT_PATH$input_path"
46038    fi
46039  fi
46040
46041
46042  if test "x$path" != "x$new_path"; then
46043    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46046  fi
46047
46048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46049
46050  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46051  has_colon=`$ECHO $path | $GREP ^.:`
46052  new_path="$path"
46053  if test "x$has_colon" = x; then
46054    # Not in mixed or Windows style, start by that.
46055    new_path=`cmd //c echo $path`
46056  fi
46057
46058
46059  input_path="$new_path"
46060  # Check if we need to convert this using DOS-style short mode. If the path
46061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46062  # take no chances and rewrite it.
46063  # Note: m4 eats our [], so we need to use [ and ] instead.
46064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46065  if test "x$has_forbidden_chars" != x; then
46066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46068  fi
46069
46070
46071  windows_path="$new_path"
46072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46073    unix_path=`$CYGPATH -u "$windows_path"`
46074    new_path="$unix_path"
46075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46077    new_path="$unix_path"
46078  fi
46079
46080  if test "x$path" != "x$new_path"; then
46081    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46084  fi
46085
46086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46088
46089  else
46090    # We're on a unix platform. Hooray! :)
46091    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46092    has_space=`$ECHO "$path" | $GREP " "`
46093    if test "x$has_space" != x; then
46094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46095$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46096      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46097    fi
46098
46099    # Use eval to expand a potential ~
46100    eval path="$path"
46101    if test ! -f "$path" && test ! -d "$path"; then
46102      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46103    fi
46104
46105    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46106  fi
46107
46108
46109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46110
46111  # Input might be given as Windows format, start by converting to
46112  # unix format.
46113  path="$POTENTIAL_FREETYPE_LIB_PATH"
46114  new_path=`$CYGPATH -u "$path"`
46115
46116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46119  # "foo.exe" is OK but "foo" is an error.
46120  #
46121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46122  # It is also a way to make sure we got the proper file name for the real test later on.
46123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46124  if test "x$test_shortpath" = x; then
46125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46127    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46128  fi
46129
46130  # Call helper function which possibly converts this using DOS-style short mode.
46131  # If so, the updated path is stored in $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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46144      # Going to short mode and back again did indeed matter. Since short mode is
46145      # case insensitive, let's make it lowercase to improve readability.
46146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46147      # Now convert it back to Unix-stile (cygpath)
46148      input_path=`$CYGPATH -u "$shortmode_path"`
46149      new_path="$input_path"
46150    fi
46151  fi
46152
46153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46154  if test "x$test_cygdrive_prefix" = x; then
46155    # As a simple fix, exclude /usr/bin since it's not a real path.
46156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46158      # a path prefixed by /cygdrive for fixpath to work.
46159      new_path="$CYGWIN_ROOT_PATH$input_path"
46160    fi
46161  fi
46162
46163
46164  if test "x$path" != "x$new_path"; then
46165    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46168  fi
46169
46170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46171
46172  path="$POTENTIAL_FREETYPE_LIB_PATH"
46173  has_colon=`$ECHO $path | $GREP ^.:`
46174  new_path="$path"
46175  if test "x$has_colon" = x; then
46176    # Not in mixed or Windows style, start by that.
46177    new_path=`cmd //c echo $path`
46178  fi
46179
46180
46181  input_path="$new_path"
46182  # Check if we need to convert this using DOS-style short mode. If the path
46183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46184  # take no chances and rewrite it.
46185  # Note: m4 eats our [], so we need to use [ and ] instead.
46186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46187  if test "x$has_forbidden_chars" != x; then
46188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46190  fi
46191
46192
46193  windows_path="$new_path"
46194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46195    unix_path=`$CYGPATH -u "$windows_path"`
46196    new_path="$unix_path"
46197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46199    new_path="$unix_path"
46200  fi
46201
46202  if test "x$path" != "x$new_path"; then
46203    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46206  fi
46207
46208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46210
46211  else
46212    # We're on a unix platform. Hooray! :)
46213    path="$POTENTIAL_FREETYPE_LIB_PATH"
46214    has_space=`$ECHO "$path" | $GREP " "`
46215    if test "x$has_space" != x; then
46216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46218      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46219    fi
46220
46221    # Use eval to expand a potential ~
46222    eval path="$path"
46223    if test ! -f "$path" && test ! -d "$path"; then
46224      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46225    fi
46226
46227    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46228  fi
46229
46230
46231    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46233$as_echo_n "checking for freetype includes... " >&6; }
46234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46235$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46236    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46238$as_echo_n "checking for freetype libraries... " >&6; }
46239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46240$as_echo "$FREETYPE_LIB_PATH" >&6; }
46241  fi
46242
46243
46244          if test "x$FOUND_FREETYPE" != xyes; then
46245            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46246
46247  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46248  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46249  METHOD="well-known location"
46250
46251  # Let's start with an optimistic view of the world :-)
46252  FOUND_FREETYPE=yes
46253
46254  # First look for the canonical freetype main include file ft2build.h.
46255  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46256    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46257    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46258    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46259      # Fail.
46260      FOUND_FREETYPE=no
46261    fi
46262  fi
46263
46264  if test "x$FOUND_FREETYPE" = xyes; then
46265    # Include file found, let's continue the sanity check.
46266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46267$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46268
46269    # Reset to default value
46270    FREETYPE_BASE_NAME=freetype
46271    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46272    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46273      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46274          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46275        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46276        # for the .6 version explicitly.
46277        FREETYPE_BASE_NAME=freetype.6
46278        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46279        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46280$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46281      else
46282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46283$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46284        FOUND_FREETYPE=no
46285      fi
46286    else
46287      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46288        # On Windows, we will need both .lib and .dll file.
46289        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46290          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46291$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46292          FOUND_FREETYPE=no
46293        fi
46294      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46295          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46296        # Found lib in isa dir, use that instead.
46297        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46298        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46299$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46300      fi
46301    fi
46302  fi
46303
46304  if test "x$FOUND_FREETYPE" = xyes; then
46305
46306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46307
46308  # Input might be given as Windows format, start by converting to
46309  # unix format.
46310  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46311  new_path=`$CYGPATH -u "$path"`
46312
46313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46316  # "foo.exe" is OK but "foo" is an error.
46317  #
46318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46319  # It is also a way to make sure we got the proper file name for the real test later on.
46320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46321  if test "x$test_shortpath" = x; then
46322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46324    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46325  fi
46326
46327  # Call helper function which possibly converts this using DOS-style short mode.
46328  # If so, the updated path is stored in $new_path.
46329
46330  input_path="$new_path"
46331  # Check if we need to convert this using DOS-style short mode. If the path
46332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46333  # take no chances and rewrite it.
46334  # Note: m4 eats our [], so we need to use [ and ] instead.
46335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46336  if test "x$has_forbidden_chars" != x; then
46337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46341      # Going to short mode and back again did indeed matter. Since short mode is
46342      # case insensitive, let's make it lowercase to improve readability.
46343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46344      # Now convert it back to Unix-stile (cygpath)
46345      input_path=`$CYGPATH -u "$shortmode_path"`
46346      new_path="$input_path"
46347    fi
46348  fi
46349
46350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46351  if test "x$test_cygdrive_prefix" = x; then
46352    # As a simple fix, exclude /usr/bin since it's not a real path.
46353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46355      # a path prefixed by /cygdrive for fixpath to work.
46356      new_path="$CYGWIN_ROOT_PATH$input_path"
46357    fi
46358  fi
46359
46360
46361  if test "x$path" != "x$new_path"; then
46362    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46364$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46365  fi
46366
46367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46368
46369  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46370  has_colon=`$ECHO $path | $GREP ^.:`
46371  new_path="$path"
46372  if test "x$has_colon" = x; then
46373    # Not in mixed or Windows style, start by that.
46374    new_path=`cmd //c echo $path`
46375  fi
46376
46377
46378  input_path="$new_path"
46379  # Check if we need to convert this using DOS-style short mode. If the path
46380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46381  # take no chances and rewrite it.
46382  # Note: m4 eats our [], so we need to use [ and ] instead.
46383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46384  if test "x$has_forbidden_chars" != x; then
46385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46387  fi
46388
46389
46390  windows_path="$new_path"
46391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46392    unix_path=`$CYGPATH -u "$windows_path"`
46393    new_path="$unix_path"
46394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46396    new_path="$unix_path"
46397  fi
46398
46399  if test "x$path" != "x$new_path"; then
46400    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46402$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46403  fi
46404
46405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46407
46408  else
46409    # We're on a unix platform. Hooray! :)
46410    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46411    has_space=`$ECHO "$path" | $GREP " "`
46412    if test "x$has_space" != x; then
46413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46414$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46416    fi
46417
46418    # Use eval to expand a potential ~
46419    eval path="$path"
46420    if test ! -f "$path" && test ! -d "$path"; then
46421      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46422    fi
46423
46424    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46425  fi
46426
46427
46428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46429
46430  # Input might be given as Windows format, start by converting to
46431  # unix format.
46432  path="$POTENTIAL_FREETYPE_LIB_PATH"
46433  new_path=`$CYGPATH -u "$path"`
46434
46435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46438  # "foo.exe" is OK but "foo" is an error.
46439  #
46440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46441  # It is also a way to make sure we got the proper file name for the real test later on.
46442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46443  if test "x$test_shortpath" = x; then
46444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46445$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46446    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46447  fi
46448
46449  # Call helper function which possibly converts this using DOS-style short mode.
46450  # If so, the updated path is stored in $new_path.
46451
46452  input_path="$new_path"
46453  # Check if we need to convert this using DOS-style short mode. If the path
46454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46455  # take no chances and rewrite it.
46456  # Note: m4 eats our [], so we need to use [ and ] instead.
46457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46458  if test "x$has_forbidden_chars" != x; then
46459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46463      # Going to short mode and back again did indeed matter. Since short mode is
46464      # case insensitive, let's make it lowercase to improve readability.
46465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46466      # Now convert it back to Unix-stile (cygpath)
46467      input_path=`$CYGPATH -u "$shortmode_path"`
46468      new_path="$input_path"
46469    fi
46470  fi
46471
46472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46473  if test "x$test_cygdrive_prefix" = x; then
46474    # As a simple fix, exclude /usr/bin since it's not a real path.
46475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46477      # a path prefixed by /cygdrive for fixpath to work.
46478      new_path="$CYGWIN_ROOT_PATH$input_path"
46479    fi
46480  fi
46481
46482
46483  if test "x$path" != "x$new_path"; then
46484    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46486$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46487  fi
46488
46489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46490
46491  path="$POTENTIAL_FREETYPE_LIB_PATH"
46492  has_colon=`$ECHO $path | $GREP ^.:`
46493  new_path="$path"
46494  if test "x$has_colon" = x; then
46495    # Not in mixed or Windows style, start by that.
46496    new_path=`cmd //c echo $path`
46497  fi
46498
46499
46500  input_path="$new_path"
46501  # Check if we need to convert this using DOS-style short mode. If the path
46502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46503  # take no chances and rewrite it.
46504  # Note: m4 eats our [], so we need to use [ and ] instead.
46505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46506  if test "x$has_forbidden_chars" != x; then
46507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46509  fi
46510
46511
46512  windows_path="$new_path"
46513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46514    unix_path=`$CYGPATH -u "$windows_path"`
46515    new_path="$unix_path"
46516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46518    new_path="$unix_path"
46519  fi
46520
46521  if test "x$path" != "x$new_path"; then
46522    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46524$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46525  fi
46526
46527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46529
46530  else
46531    # We're on a unix platform. Hooray! :)
46532    path="$POTENTIAL_FREETYPE_LIB_PATH"
46533    has_space=`$ECHO "$path" | $GREP " "`
46534    if test "x$has_space" != x; then
46535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46536$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46537      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46538    fi
46539
46540    # Use eval to expand a potential ~
46541    eval path="$path"
46542    if test ! -f "$path" && test ! -d "$path"; then
46543      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46544    fi
46545
46546    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46547  fi
46548
46549
46550    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46552$as_echo_n "checking for freetype includes... " >&6; }
46553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46554$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46555    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46557$as_echo_n "checking for freetype libraries... " >&6; }
46558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46559$as_echo "$FREETYPE_LIB_PATH" >&6; }
46560  fi
46561
46562          fi
46563
46564          if test "x$FOUND_FREETYPE" != xyes; then
46565            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46566
46567  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46568  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46569  METHOD="well-known location"
46570
46571  # Let's start with an optimistic view of the world :-)
46572  FOUND_FREETYPE=yes
46573
46574  # First look for the canonical freetype main include file ft2build.h.
46575  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46576    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46577    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46578    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46579      # Fail.
46580      FOUND_FREETYPE=no
46581    fi
46582  fi
46583
46584  if test "x$FOUND_FREETYPE" = xyes; then
46585    # Include file found, let's continue the sanity check.
46586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46587$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46588
46589    # Reset to default value
46590    FREETYPE_BASE_NAME=freetype
46591    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46592    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46593      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46594          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46595        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46596        # for the .6 version explicitly.
46597        FREETYPE_BASE_NAME=freetype.6
46598        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46599        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46600$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46601      else
46602        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46603$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46604        FOUND_FREETYPE=no
46605      fi
46606    else
46607      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46608        # On Windows, we will need both .lib and .dll file.
46609        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46610          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46611$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46612          FOUND_FREETYPE=no
46613        fi
46614      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46615          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46616        # Found lib in isa dir, use that instead.
46617        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46618        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46619$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46620      fi
46621    fi
46622  fi
46623
46624  if test "x$FOUND_FREETYPE" = xyes; then
46625
46626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46627
46628  # Input might be given as Windows format, start by converting to
46629  # unix format.
46630  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46631  new_path=`$CYGPATH -u "$path"`
46632
46633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46636  # "foo.exe" is OK but "foo" is an error.
46637  #
46638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46639  # It is also a way to make sure we got the proper file name for the real test later on.
46640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46641  if test "x$test_shortpath" = x; then
46642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46645  fi
46646
46647  # Call helper function which possibly converts this using DOS-style short mode.
46648  # If so, the updated path is stored in $new_path.
46649
46650  input_path="$new_path"
46651  # Check if we need to convert this using DOS-style short mode. If the path
46652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46653  # take no chances and rewrite it.
46654  # Note: m4 eats our [], so we need to use [ and ] instead.
46655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46656  if test "x$has_forbidden_chars" != x; then
46657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46661      # Going to short mode and back again did indeed matter. Since short mode is
46662      # case insensitive, let's make it lowercase to improve readability.
46663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46664      # Now convert it back to Unix-stile (cygpath)
46665      input_path=`$CYGPATH -u "$shortmode_path"`
46666      new_path="$input_path"
46667    fi
46668  fi
46669
46670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46671  if test "x$test_cygdrive_prefix" = x; then
46672    # As a simple fix, exclude /usr/bin since it's not a real path.
46673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46675      # a path prefixed by /cygdrive for fixpath to work.
46676      new_path="$CYGWIN_ROOT_PATH$input_path"
46677    fi
46678  fi
46679
46680
46681  if test "x$path" != "x$new_path"; then
46682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46685  fi
46686
46687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46688
46689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46690  has_colon=`$ECHO $path | $GREP ^.:`
46691  new_path="$path"
46692  if test "x$has_colon" = x; then
46693    # Not in mixed or Windows style, start by that.
46694    new_path=`cmd //c echo $path`
46695  fi
46696
46697
46698  input_path="$new_path"
46699  # Check if we need to convert this using DOS-style short mode. If the path
46700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46701  # take no chances and rewrite it.
46702  # Note: m4 eats our [], so we need to use [ and ] instead.
46703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46704  if test "x$has_forbidden_chars" != x; then
46705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46707  fi
46708
46709
46710  windows_path="$new_path"
46711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46712    unix_path=`$CYGPATH -u "$windows_path"`
46713    new_path="$unix_path"
46714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46716    new_path="$unix_path"
46717  fi
46718
46719  if test "x$path" != "x$new_path"; then
46720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46723  fi
46724
46725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46727
46728  else
46729    # We're on a unix platform. Hooray! :)
46730    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46731    has_space=`$ECHO "$path" | $GREP " "`
46732    if test "x$has_space" != x; then
46733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46735      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46736    fi
46737
46738    # Use eval to expand a potential ~
46739    eval path="$path"
46740    if test ! -f "$path" && test ! -d "$path"; then
46741      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46742    fi
46743
46744    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46745  fi
46746
46747
46748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46749
46750  # Input might be given as Windows format, start by converting to
46751  # unix format.
46752  path="$POTENTIAL_FREETYPE_LIB_PATH"
46753  new_path=`$CYGPATH -u "$path"`
46754
46755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46758  # "foo.exe" is OK but "foo" is an error.
46759  #
46760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46761  # It is also a way to make sure we got the proper file name for the real test later on.
46762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46763  if test "x$test_shortpath" = x; then
46764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46766    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46767  fi
46768
46769  # Call helper function which possibly converts this using DOS-style short mode.
46770  # If so, the updated path is stored in $new_path.
46771
46772  input_path="$new_path"
46773  # Check if we need to convert this using DOS-style short mode. If the path
46774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46775  # take no chances and rewrite it.
46776  # Note: m4 eats our [], so we need to use [ and ] instead.
46777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46778  if test "x$has_forbidden_chars" != x; then
46779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46783      # Going to short mode and back again did indeed matter. Since short mode is
46784      # case insensitive, let's make it lowercase to improve readability.
46785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46786      # Now convert it back to Unix-stile (cygpath)
46787      input_path=`$CYGPATH -u "$shortmode_path"`
46788      new_path="$input_path"
46789    fi
46790  fi
46791
46792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46793  if test "x$test_cygdrive_prefix" = x; then
46794    # As a simple fix, exclude /usr/bin since it's not a real path.
46795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46797      # a path prefixed by /cygdrive for fixpath to work.
46798      new_path="$CYGWIN_ROOT_PATH$input_path"
46799    fi
46800  fi
46801
46802
46803  if test "x$path" != "x$new_path"; then
46804    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46806$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46807  fi
46808
46809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46810
46811  path="$POTENTIAL_FREETYPE_LIB_PATH"
46812  has_colon=`$ECHO $path | $GREP ^.:`
46813  new_path="$path"
46814  if test "x$has_colon" = x; then
46815    # Not in mixed or Windows style, start by that.
46816    new_path=`cmd //c echo $path`
46817  fi
46818
46819
46820  input_path="$new_path"
46821  # Check if we need to convert this using DOS-style short mode. If the path
46822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46823  # take no chances and rewrite it.
46824  # Note: m4 eats our [], so we need to use [ and ] instead.
46825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46826  if test "x$has_forbidden_chars" != x; then
46827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46829  fi
46830
46831
46832  windows_path="$new_path"
46833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46834    unix_path=`$CYGPATH -u "$windows_path"`
46835    new_path="$unix_path"
46836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46838    new_path="$unix_path"
46839  fi
46840
46841  if test "x$path" != "x$new_path"; then
46842    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46845  fi
46846
46847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46849
46850  else
46851    # We're on a unix platform. Hooray! :)
46852    path="$POTENTIAL_FREETYPE_LIB_PATH"
46853    has_space=`$ECHO "$path" | $GREP " "`
46854    if test "x$has_space" != x; then
46855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46858    fi
46859
46860    # Use eval to expand a potential ~
46861    eval path="$path"
46862    if test ! -f "$path" && test ! -d "$path"; then
46863      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46864    fi
46865
46866    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46867  fi
46868
46869
46870    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46872$as_echo_n "checking for freetype includes... " >&6; }
46873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46874$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46875    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46877$as_echo_n "checking for freetype libraries... " >&6; }
46878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46879$as_echo "$FREETYPE_LIB_PATH" >&6; }
46880  fi
46881
46882          fi
46883
46884          if test "x$FOUND_FREETYPE" != xyes; then
46885            FREETYPE_BASE_DIR="$SYSROOT/usr"
46886            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46887
46888  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46889  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46890  METHOD="well-known location"
46891
46892  # Let's start with an optimistic view of the world :-)
46893  FOUND_FREETYPE=yes
46894
46895  # First look for the canonical freetype main include file ft2build.h.
46896  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46897    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46898    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46899    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46900      # Fail.
46901      FOUND_FREETYPE=no
46902    fi
46903  fi
46904
46905  if test "x$FOUND_FREETYPE" = xyes; then
46906    # Include file found, let's continue the sanity check.
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46908$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46909
46910    # Reset to default value
46911    FREETYPE_BASE_NAME=freetype
46912    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46913    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46914      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46915          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46916        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46917        # for the .6 version explicitly.
46918        FREETYPE_BASE_NAME=freetype.6
46919        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46920        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46921$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46922      else
46923        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46924$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46925        FOUND_FREETYPE=no
46926      fi
46927    else
46928      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46929        # On Windows, we will need both .lib and .dll file.
46930        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46931          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46932$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46933          FOUND_FREETYPE=no
46934        fi
46935      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46936          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46937        # Found lib in isa dir, use that instead.
46938        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46939        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46940$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46941      fi
46942    fi
46943  fi
46944
46945  if test "x$FOUND_FREETYPE" = xyes; then
46946
46947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46948
46949  # Input might be given as Windows format, start by converting to
46950  # unix format.
46951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46952  new_path=`$CYGPATH -u "$path"`
46953
46954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46957  # "foo.exe" is OK but "foo" is an error.
46958  #
46959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46960  # It is also a way to make sure we got the proper file name for the real test later on.
46961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46962  if test "x$test_shortpath" = x; then
46963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46965    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46966  fi
46967
46968  # Call helper function which possibly converts this using DOS-style short mode.
46969  # If so, the updated path is stored in $new_path.
46970
46971  input_path="$new_path"
46972  # Check if we need to convert this using DOS-style short mode. If the path
46973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46974  # take no chances and rewrite it.
46975  # Note: m4 eats our [], so we need to use [ and ] instead.
46976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46977  if test "x$has_forbidden_chars" != x; then
46978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46982      # Going to short mode and back again did indeed matter. Since short mode is
46983      # case insensitive, let's make it lowercase to improve readability.
46984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46985      # Now convert it back to Unix-stile (cygpath)
46986      input_path=`$CYGPATH -u "$shortmode_path"`
46987      new_path="$input_path"
46988    fi
46989  fi
46990
46991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46992  if test "x$test_cygdrive_prefix" = x; then
46993    # As a simple fix, exclude /usr/bin since it's not a real path.
46994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46996      # a path prefixed by /cygdrive for fixpath to work.
46997      new_path="$CYGWIN_ROOT_PATH$input_path"
46998    fi
46999  fi
47000
47001
47002  if test "x$path" != "x$new_path"; then
47003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47006  fi
47007
47008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47009
47010  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47011  has_colon=`$ECHO $path | $GREP ^.:`
47012  new_path="$path"
47013  if test "x$has_colon" = x; then
47014    # Not in mixed or Windows style, start by that.
47015    new_path=`cmd //c echo $path`
47016  fi
47017
47018
47019  input_path="$new_path"
47020  # Check if we need to convert this using DOS-style short mode. If the path
47021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47022  # take no chances and rewrite it.
47023  # Note: m4 eats our [], so we need to use [ and ] instead.
47024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47025  if test "x$has_forbidden_chars" != x; then
47026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47028  fi
47029
47030
47031  windows_path="$new_path"
47032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47033    unix_path=`$CYGPATH -u "$windows_path"`
47034    new_path="$unix_path"
47035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47037    new_path="$unix_path"
47038  fi
47039
47040  if test "x$path" != "x$new_path"; then
47041    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47044  fi
47045
47046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47048
47049  else
47050    # We're on a unix platform. Hooray! :)
47051    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47052    has_space=`$ECHO "$path" | $GREP " "`
47053    if test "x$has_space" != x; then
47054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47056      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47057    fi
47058
47059    # Use eval to expand a potential ~
47060    eval path="$path"
47061    if test ! -f "$path" && test ! -d "$path"; then
47062      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47063    fi
47064
47065    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47066  fi
47067
47068
47069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47070
47071  # Input might be given as Windows format, start by converting to
47072  # unix format.
47073  path="$POTENTIAL_FREETYPE_LIB_PATH"
47074  new_path=`$CYGPATH -u "$path"`
47075
47076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47079  # "foo.exe" is OK but "foo" is an error.
47080  #
47081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47082  # It is also a way to make sure we got the proper file name for the real test later on.
47083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47084  if test "x$test_shortpath" = x; then
47085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47088  fi
47089
47090  # Call helper function which possibly converts this using DOS-style short mode.
47091  # If so, the updated path is stored in $new_path.
47092
47093  input_path="$new_path"
47094  # Check if we need to convert this using DOS-style short mode. If the path
47095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47096  # take no chances and rewrite it.
47097  # Note: m4 eats our [], so we need to use [ and ] instead.
47098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47099  if test "x$has_forbidden_chars" != x; then
47100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47104      # Going to short mode and back again did indeed matter. Since short mode is
47105      # case insensitive, let's make it lowercase to improve readability.
47106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47107      # Now convert it back to Unix-stile (cygpath)
47108      input_path=`$CYGPATH -u "$shortmode_path"`
47109      new_path="$input_path"
47110    fi
47111  fi
47112
47113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47114  if test "x$test_cygdrive_prefix" = x; then
47115    # As a simple fix, exclude /usr/bin since it's not a real path.
47116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47118      # a path prefixed by /cygdrive for fixpath to work.
47119      new_path="$CYGWIN_ROOT_PATH$input_path"
47120    fi
47121  fi
47122
47123
47124  if test "x$path" != "x$new_path"; then
47125    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47128  fi
47129
47130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47131
47132  path="$POTENTIAL_FREETYPE_LIB_PATH"
47133  has_colon=`$ECHO $path | $GREP ^.:`
47134  new_path="$path"
47135  if test "x$has_colon" = x; then
47136    # Not in mixed or Windows style, start by that.
47137    new_path=`cmd //c echo $path`
47138  fi
47139
47140
47141  input_path="$new_path"
47142  # Check if we need to convert this using DOS-style short mode. If the path
47143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47144  # take no chances and rewrite it.
47145  # Note: m4 eats our [], so we need to use [ and ] instead.
47146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47147  if test "x$has_forbidden_chars" != x; then
47148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47150  fi
47151
47152
47153  windows_path="$new_path"
47154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47155    unix_path=`$CYGPATH -u "$windows_path"`
47156    new_path="$unix_path"
47157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47159    new_path="$unix_path"
47160  fi
47161
47162  if test "x$path" != "x$new_path"; then
47163    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47166  fi
47167
47168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47170
47171  else
47172    # We're on a unix platform. Hooray! :)
47173    path="$POTENTIAL_FREETYPE_LIB_PATH"
47174    has_space=`$ECHO "$path" | $GREP " "`
47175    if test "x$has_space" != x; then
47176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47178      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47179    fi
47180
47181    # Use eval to expand a potential ~
47182    eval path="$path"
47183    if test ! -f "$path" && test ! -d "$path"; then
47184      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47185    fi
47186
47187    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47188  fi
47189
47190
47191    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47193$as_echo_n "checking for freetype includes... " >&6; }
47194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47195$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47196    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47198$as_echo_n "checking for freetype libraries... " >&6; }
47199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47200$as_echo "$FREETYPE_LIB_PATH" >&6; }
47201  fi
47202
47203            else
47204
47205  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47206  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47207  METHOD="well-known location"
47208
47209  # Let's start with an optimistic view of the world :-)
47210  FOUND_FREETYPE=yes
47211
47212  # First look for the canonical freetype main include file ft2build.h.
47213  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47214    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47215    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47216    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47217      # Fail.
47218      FOUND_FREETYPE=no
47219    fi
47220  fi
47221
47222  if test "x$FOUND_FREETYPE" = xyes; then
47223    # Include file found, let's continue the sanity check.
47224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47225$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47226
47227    # Reset to default value
47228    FREETYPE_BASE_NAME=freetype
47229    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47230    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47231      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47232          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47233        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47234        # for the .6 version explicitly.
47235        FREETYPE_BASE_NAME=freetype.6
47236        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47237        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47238$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47239      else
47240        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47241$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47242        FOUND_FREETYPE=no
47243      fi
47244    else
47245      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47246        # On Windows, we will need both .lib and .dll file.
47247        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47248          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47249$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47250          FOUND_FREETYPE=no
47251        fi
47252      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47254        # Found lib in isa dir, use that instead.
47255        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47256        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47257$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47258      fi
47259    fi
47260  fi
47261
47262  if test "x$FOUND_FREETYPE" = xyes; then
47263
47264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47265
47266  # Input might be given as Windows format, start by converting to
47267  # unix format.
47268  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47269  new_path=`$CYGPATH -u "$path"`
47270
47271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47274  # "foo.exe" is OK but "foo" is an error.
47275  #
47276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47277  # It is also a way to make sure we got the proper file name for the real test later on.
47278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47279  if test "x$test_shortpath" = x; then
47280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47282    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47283  fi
47284
47285  # Call helper function which possibly converts this using DOS-style short mode.
47286  # If so, the updated path is stored in $new_path.
47287
47288  input_path="$new_path"
47289  # Check if we need to convert this using DOS-style short mode. If the path
47290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47291  # take no chances and rewrite it.
47292  # Note: m4 eats our [], so we need to use [ and ] instead.
47293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47294  if test "x$has_forbidden_chars" != x; then
47295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47299      # Going to short mode and back again did indeed matter. Since short mode is
47300      # case insensitive, let's make it lowercase to improve readability.
47301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47302      # Now convert it back to Unix-stile (cygpath)
47303      input_path=`$CYGPATH -u "$shortmode_path"`
47304      new_path="$input_path"
47305    fi
47306  fi
47307
47308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47309  if test "x$test_cygdrive_prefix" = x; then
47310    # As a simple fix, exclude /usr/bin since it's not a real path.
47311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47313      # a path prefixed by /cygdrive for fixpath to work.
47314      new_path="$CYGWIN_ROOT_PATH$input_path"
47315    fi
47316  fi
47317
47318
47319  if test "x$path" != "x$new_path"; then
47320    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47323  fi
47324
47325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47326
47327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47328  has_colon=`$ECHO $path | $GREP ^.:`
47329  new_path="$path"
47330  if test "x$has_colon" = x; then
47331    # Not in mixed or Windows style, start by that.
47332    new_path=`cmd //c echo $path`
47333  fi
47334
47335
47336  input_path="$new_path"
47337  # Check if we need to convert this using DOS-style short mode. If the path
47338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47339  # take no chances and rewrite it.
47340  # Note: m4 eats our [], so we need to use [ and ] instead.
47341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47342  if test "x$has_forbidden_chars" != x; then
47343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47345  fi
47346
47347
47348  windows_path="$new_path"
47349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47350    unix_path=`$CYGPATH -u "$windows_path"`
47351    new_path="$unix_path"
47352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47354    new_path="$unix_path"
47355  fi
47356
47357  if test "x$path" != "x$new_path"; then
47358    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47361  fi
47362
47363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47365
47366  else
47367    # We're on a unix platform. Hooray! :)
47368    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47369    has_space=`$ECHO "$path" | $GREP " "`
47370    if test "x$has_space" != x; then
47371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47373      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47374    fi
47375
47376    # Use eval to expand a potential ~
47377    eval path="$path"
47378    if test ! -f "$path" && test ! -d "$path"; then
47379      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47380    fi
47381
47382    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47383  fi
47384
47385
47386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47387
47388  # Input might be given as Windows format, start by converting to
47389  # unix format.
47390  path="$POTENTIAL_FREETYPE_LIB_PATH"
47391  new_path=`$CYGPATH -u "$path"`
47392
47393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47396  # "foo.exe" is OK but "foo" is an error.
47397  #
47398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47399  # It is also a way to make sure we got the proper file name for the real test later on.
47400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47401  if test "x$test_shortpath" = x; then
47402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47405  fi
47406
47407  # Call helper function which possibly converts this using DOS-style short mode.
47408  # If so, the updated path is stored in $new_path.
47409
47410  input_path="$new_path"
47411  # Check if we need to convert this using DOS-style short mode. If the path
47412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47413  # take no chances and rewrite it.
47414  # Note: m4 eats our [], so we need to use [ and ] instead.
47415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47416  if test "x$has_forbidden_chars" != x; then
47417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47421      # Going to short mode and back again did indeed matter. Since short mode is
47422      # case insensitive, let's make it lowercase to improve readability.
47423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47424      # Now convert it back to Unix-stile (cygpath)
47425      input_path=`$CYGPATH -u "$shortmode_path"`
47426      new_path="$input_path"
47427    fi
47428  fi
47429
47430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47431  if test "x$test_cygdrive_prefix" = x; then
47432    # As a simple fix, exclude /usr/bin since it's not a real path.
47433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47435      # a path prefixed by /cygdrive for fixpath to work.
47436      new_path="$CYGWIN_ROOT_PATH$input_path"
47437    fi
47438  fi
47439
47440
47441  if test "x$path" != "x$new_path"; then
47442    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47445  fi
47446
47447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47448
47449  path="$POTENTIAL_FREETYPE_LIB_PATH"
47450  has_colon=`$ECHO $path | $GREP ^.:`
47451  new_path="$path"
47452  if test "x$has_colon" = x; then
47453    # Not in mixed or Windows style, start by that.
47454    new_path=`cmd //c echo $path`
47455  fi
47456
47457
47458  input_path="$new_path"
47459  # Check if we need to convert this using DOS-style short mode. If the path
47460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47461  # take no chances and rewrite it.
47462  # Note: m4 eats our [], so we need to use [ and ] instead.
47463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47464  if test "x$has_forbidden_chars" != x; then
47465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47467  fi
47468
47469
47470  windows_path="$new_path"
47471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47472    unix_path=`$CYGPATH -u "$windows_path"`
47473    new_path="$unix_path"
47474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47476    new_path="$unix_path"
47477  fi
47478
47479  if test "x$path" != "x$new_path"; then
47480    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47483  fi
47484
47485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47487
47488  else
47489    # We're on a unix platform. Hooray! :)
47490    path="$POTENTIAL_FREETYPE_LIB_PATH"
47491    has_space=`$ECHO "$path" | $GREP " "`
47492    if test "x$has_space" != x; then
47493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47495      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47496    fi
47497
47498    # Use eval to expand a potential ~
47499    eval path="$path"
47500    if test ! -f "$path" && test ! -d "$path"; then
47501      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47502    fi
47503
47504    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47505  fi
47506
47507
47508    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47510$as_echo_n "checking for freetype includes... " >&6; }
47511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47512$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47513    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47515$as_echo_n "checking for freetype libraries... " >&6; }
47516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47517$as_echo "$FREETYPE_LIB_PATH" >&6; }
47518  fi
47519
47520              if test "x$FOUND_FREETYPE" != xyes; then
47521
47522  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47523  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47524  METHOD="well-known location"
47525
47526  # Let's start with an optimistic view of the world :-)
47527  FOUND_FREETYPE=yes
47528
47529  # First look for the canonical freetype main include file ft2build.h.
47530  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47531    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47532    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47533    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47534      # Fail.
47535      FOUND_FREETYPE=no
47536    fi
47537  fi
47538
47539  if test "x$FOUND_FREETYPE" = xyes; then
47540    # Include file found, let's continue the sanity check.
47541    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47542$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47543
47544    # Reset to default value
47545    FREETYPE_BASE_NAME=freetype
47546    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47547    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47548      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47549          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47550        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47551        # for the .6 version explicitly.
47552        FREETYPE_BASE_NAME=freetype.6
47553        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47554        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47555$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47556      else
47557        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47558$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47559        FOUND_FREETYPE=no
47560      fi
47561    else
47562      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47563        # On Windows, we will need both .lib and .dll file.
47564        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47565          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47566$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47567          FOUND_FREETYPE=no
47568        fi
47569      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47570          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47571        # Found lib in isa dir, use that instead.
47572        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47573        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47574$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47575      fi
47576    fi
47577  fi
47578
47579  if test "x$FOUND_FREETYPE" = xyes; then
47580
47581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47582
47583  # Input might be given as Windows format, start by converting to
47584  # unix format.
47585  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47586  new_path=`$CYGPATH -u "$path"`
47587
47588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47591  # "foo.exe" is OK but "foo" is an error.
47592  #
47593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47594  # It is also a way to make sure we got the proper file name for the real test later on.
47595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47596  if test "x$test_shortpath" = x; then
47597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47598$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47599    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47600  fi
47601
47602  # Call helper function which possibly converts this using DOS-style short mode.
47603  # If so, the updated path is stored in $new_path.
47604
47605  input_path="$new_path"
47606  # Check if we need to convert this using DOS-style short mode. If the path
47607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47608  # take no chances and rewrite it.
47609  # Note: m4 eats our [], so we need to use [ and ] instead.
47610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47611  if test "x$has_forbidden_chars" != x; then
47612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47616      # Going to short mode and back again did indeed matter. Since short mode is
47617      # case insensitive, let's make it lowercase to improve readability.
47618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47619      # Now convert it back to Unix-stile (cygpath)
47620      input_path=`$CYGPATH -u "$shortmode_path"`
47621      new_path="$input_path"
47622    fi
47623  fi
47624
47625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47626  if test "x$test_cygdrive_prefix" = x; then
47627    # As a simple fix, exclude /usr/bin since it's not a real path.
47628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47630      # a path prefixed by /cygdrive for fixpath to work.
47631      new_path="$CYGWIN_ROOT_PATH$input_path"
47632    fi
47633  fi
47634
47635
47636  if test "x$path" != "x$new_path"; then
47637    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47640  fi
47641
47642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47643
47644  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47645  has_colon=`$ECHO $path | $GREP ^.:`
47646  new_path="$path"
47647  if test "x$has_colon" = x; then
47648    # Not in mixed or Windows style, start by that.
47649    new_path=`cmd //c echo $path`
47650  fi
47651
47652
47653  input_path="$new_path"
47654  # Check if we need to convert this using DOS-style short mode. If the path
47655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47656  # take no chances and rewrite it.
47657  # Note: m4 eats our [], so we need to use [ and ] instead.
47658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47659  if test "x$has_forbidden_chars" != x; then
47660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47662  fi
47663
47664
47665  windows_path="$new_path"
47666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47667    unix_path=`$CYGPATH -u "$windows_path"`
47668    new_path="$unix_path"
47669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47671    new_path="$unix_path"
47672  fi
47673
47674  if test "x$path" != "x$new_path"; then
47675    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47677$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47678  fi
47679
47680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47682
47683  else
47684    # We're on a unix platform. Hooray! :)
47685    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47686    has_space=`$ECHO "$path" | $GREP " "`
47687    if test "x$has_space" != x; then
47688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47690      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47691    fi
47692
47693    # Use eval to expand a potential ~
47694    eval path="$path"
47695    if test ! -f "$path" && test ! -d "$path"; then
47696      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47697    fi
47698
47699    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47700  fi
47701
47702
47703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47704
47705  # Input might be given as Windows format, start by converting to
47706  # unix format.
47707  path="$POTENTIAL_FREETYPE_LIB_PATH"
47708  new_path=`$CYGPATH -u "$path"`
47709
47710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47713  # "foo.exe" is OK but "foo" is an error.
47714  #
47715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47716  # It is also a way to make sure we got the proper file name for the real test later on.
47717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47718  if test "x$test_shortpath" = x; then
47719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47721    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47722  fi
47723
47724  # Call helper function which possibly converts this using DOS-style short mode.
47725  # If so, the updated path is stored in $new_path.
47726
47727  input_path="$new_path"
47728  # Check if we need to convert this using DOS-style short mode. If the path
47729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47730  # take no chances and rewrite it.
47731  # Note: m4 eats our [], so we need to use [ and ] instead.
47732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47733  if test "x$has_forbidden_chars" != x; then
47734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47738      # Going to short mode and back again did indeed matter. Since short mode is
47739      # case insensitive, let's make it lowercase to improve readability.
47740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47741      # Now convert it back to Unix-stile (cygpath)
47742      input_path=`$CYGPATH -u "$shortmode_path"`
47743      new_path="$input_path"
47744    fi
47745  fi
47746
47747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47748  if test "x$test_cygdrive_prefix" = x; then
47749    # As a simple fix, exclude /usr/bin since it's not a real path.
47750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47752      # a path prefixed by /cygdrive for fixpath to work.
47753      new_path="$CYGWIN_ROOT_PATH$input_path"
47754    fi
47755  fi
47756
47757
47758  if test "x$path" != "x$new_path"; then
47759    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47762  fi
47763
47764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47765
47766  path="$POTENTIAL_FREETYPE_LIB_PATH"
47767  has_colon=`$ECHO $path | $GREP ^.:`
47768  new_path="$path"
47769  if test "x$has_colon" = x; then
47770    # Not in mixed or Windows style, start by that.
47771    new_path=`cmd //c echo $path`
47772  fi
47773
47774
47775  input_path="$new_path"
47776  # Check if we need to convert this using DOS-style short mode. If the path
47777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47778  # take no chances and rewrite it.
47779  # Note: m4 eats our [], so we need to use [ and ] instead.
47780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47781  if test "x$has_forbidden_chars" != x; then
47782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47784  fi
47785
47786
47787  windows_path="$new_path"
47788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47789    unix_path=`$CYGPATH -u "$windows_path"`
47790    new_path="$unix_path"
47791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47793    new_path="$unix_path"
47794  fi
47795
47796  if test "x$path" != "x$new_path"; then
47797    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47800  fi
47801
47802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47804
47805  else
47806    # We're on a unix platform. Hooray! :)
47807    path="$POTENTIAL_FREETYPE_LIB_PATH"
47808    has_space=`$ECHO "$path" | $GREP " "`
47809    if test "x$has_space" != x; then
47810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47812      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47813    fi
47814
47815    # Use eval to expand a potential ~
47816    eval path="$path"
47817    if test ! -f "$path" && test ! -d "$path"; then
47818      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47819    fi
47820
47821    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47822  fi
47823
47824
47825    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47827$as_echo_n "checking for freetype includes... " >&6; }
47828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47829$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47830    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47831    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47832$as_echo_n "checking for freetype libraries... " >&6; }
47833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47834$as_echo "$FREETYPE_LIB_PATH" >&6; }
47835  fi
47836
47837              fi
47838            fi
47839          fi
47840        fi
47841      fi # end check in well-known locations
47842
47843      if test "x$FOUND_FREETYPE" != xyes; then
47844
47845  # Print a helpful message on how to acquire the necessary build dependency.
47846  # freetype is the help tag: freetype, cups, pulse, alsa etc
47847  MISSING_DEPENDENCY=freetype
47848
47849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47850    cygwin_help $MISSING_DEPENDENCY
47851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47852    msys_help $MISSING_DEPENDENCY
47853  else
47854    PKGHANDLER_COMMAND=
47855
47856    case $PKGHANDLER in
47857      apt-get)
47858        apt_help     $MISSING_DEPENDENCY ;;
47859      yum)
47860        yum_help     $MISSING_DEPENDENCY ;;
47861      port)
47862        port_help    $MISSING_DEPENDENCY ;;
47863      pkgutil)
47864        pkgutil_help $MISSING_DEPENDENCY ;;
47865      pkgadd)
47866        pkgadd_help  $MISSING_DEPENDENCY ;;
47867    esac
47868
47869    if test "x$PKGHANDLER_COMMAND" != x; then
47870      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47871    fi
47872  fi
47873
47874        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47875      fi
47876    fi # end user specified settings
47877
47878    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47879    if test "x$FREETYPE_CFLAGS" = x; then
47880
47881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47882
47883  # Input might be given as Windows format, start by converting to
47884  # unix format.
47885  path="$FREETYPE_INCLUDE_PATH"
47886  new_path=`$CYGPATH -u "$path"`
47887
47888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47891  # "foo.exe" is OK but "foo" is an error.
47892  #
47893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47894  # It is also a way to make sure we got the proper file name for the real test later on.
47895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47896  if test "x$test_shortpath" = x; then
47897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47898$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47899    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47900  fi
47901
47902  # Call helper function which possibly converts this using DOS-style short mode.
47903  # If so, the updated path is stored in $new_path.
47904
47905  input_path="$new_path"
47906  # Check if we need to convert this using DOS-style short mode. If the path
47907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47908  # take no chances and rewrite it.
47909  # Note: m4 eats our [], so we need to use [ and ] instead.
47910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47911  if test "x$has_forbidden_chars" != x; then
47912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47916      # Going to short mode and back again did indeed matter. Since short mode is
47917      # case insensitive, let's make it lowercase to improve readability.
47918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47919      # Now convert it back to Unix-stile (cygpath)
47920      input_path=`$CYGPATH -u "$shortmode_path"`
47921      new_path="$input_path"
47922    fi
47923  fi
47924
47925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47926  if test "x$test_cygdrive_prefix" = x; then
47927    # As a simple fix, exclude /usr/bin since it's not a real path.
47928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47930      # a path prefixed by /cygdrive for fixpath to work.
47931      new_path="$CYGWIN_ROOT_PATH$input_path"
47932    fi
47933  fi
47934
47935
47936  if test "x$path" != "x$new_path"; then
47937    FREETYPE_INCLUDE_PATH="$new_path"
47938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47939$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47940  fi
47941
47942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47943
47944  path="$FREETYPE_INCLUDE_PATH"
47945  has_colon=`$ECHO $path | $GREP ^.:`
47946  new_path="$path"
47947  if test "x$has_colon" = x; then
47948    # Not in mixed or Windows style, start by that.
47949    new_path=`cmd //c echo $path`
47950  fi
47951
47952
47953  input_path="$new_path"
47954  # Check if we need to convert this using DOS-style short mode. If the path
47955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47956  # take no chances and rewrite it.
47957  # Note: m4 eats our [], so we need to use [ and ] instead.
47958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47959  if test "x$has_forbidden_chars" != x; then
47960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47962  fi
47963
47964
47965  windows_path="$new_path"
47966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47967    unix_path=`$CYGPATH -u "$windows_path"`
47968    new_path="$unix_path"
47969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47971    new_path="$unix_path"
47972  fi
47973
47974  if test "x$path" != "x$new_path"; then
47975    FREETYPE_INCLUDE_PATH="$new_path"
47976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47977$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47978  fi
47979
47980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47982
47983  else
47984    # We're on a unix platform. Hooray! :)
47985    path="$FREETYPE_INCLUDE_PATH"
47986    has_space=`$ECHO "$path" | $GREP " "`
47987    if test "x$has_space" != x; then
47988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47989$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47990      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47991    fi
47992
47993    # Use eval to expand a potential ~
47994    eval path="$path"
47995    if test ! -f "$path" && test ! -d "$path"; then
47996      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47997    fi
47998
47999    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48000  fi
48001
48002      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48003        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48004      else
48005        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48006      fi
48007    fi
48008
48009    if test "x$FREETYPE_LIBS" = x; then
48010
48011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48012
48013  # Input might be given as Windows format, start by converting to
48014  # unix format.
48015  path="$FREETYPE_LIB_PATH"
48016  new_path=`$CYGPATH -u "$path"`
48017
48018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48021  # "foo.exe" is OK but "foo" is an error.
48022  #
48023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48024  # It is also a way to make sure we got the proper file name for the real test later on.
48025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48026  if test "x$test_shortpath" = x; then
48027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48028$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48029    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48030  fi
48031
48032  # Call helper function which possibly converts this using DOS-style short mode.
48033  # If so, the updated path is stored in $new_path.
48034
48035  input_path="$new_path"
48036  # Check if we need to convert this using DOS-style short mode. If the path
48037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48038  # take no chances and rewrite it.
48039  # Note: m4 eats our [], so we need to use [ and ] instead.
48040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48041  if test "x$has_forbidden_chars" != x; then
48042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48046      # Going to short mode and back again did indeed matter. Since short mode is
48047      # case insensitive, let's make it lowercase to improve readability.
48048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48049      # Now convert it back to Unix-stile (cygpath)
48050      input_path=`$CYGPATH -u "$shortmode_path"`
48051      new_path="$input_path"
48052    fi
48053  fi
48054
48055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48056  if test "x$test_cygdrive_prefix" = x; then
48057    # As a simple fix, exclude /usr/bin since it's not a real path.
48058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48060      # a path prefixed by /cygdrive for fixpath to work.
48061      new_path="$CYGWIN_ROOT_PATH$input_path"
48062    fi
48063  fi
48064
48065
48066  if test "x$path" != "x$new_path"; then
48067    FREETYPE_LIB_PATH="$new_path"
48068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48069$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48070  fi
48071
48072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48073
48074  path="$FREETYPE_LIB_PATH"
48075  has_colon=`$ECHO $path | $GREP ^.:`
48076  new_path="$path"
48077  if test "x$has_colon" = x; then
48078    # Not in mixed or Windows style, start by that.
48079    new_path=`cmd //c echo $path`
48080  fi
48081
48082
48083  input_path="$new_path"
48084  # Check if we need to convert this using DOS-style short mode. If the path
48085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48086  # take no chances and rewrite it.
48087  # Note: m4 eats our [], so we need to use [ and ] instead.
48088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48089  if test "x$has_forbidden_chars" != x; then
48090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48092  fi
48093
48094
48095  windows_path="$new_path"
48096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48097    unix_path=`$CYGPATH -u "$windows_path"`
48098    new_path="$unix_path"
48099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48101    new_path="$unix_path"
48102  fi
48103
48104  if test "x$path" != "x$new_path"; then
48105    FREETYPE_LIB_PATH="$new_path"
48106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48107$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48108  fi
48109
48110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48112
48113  else
48114    # We're on a unix platform. Hooray! :)
48115    path="$FREETYPE_LIB_PATH"
48116    has_space=`$ECHO "$path" | $GREP " "`
48117    if test "x$has_space" != x; then
48118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48119$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48121    fi
48122
48123    # Use eval to expand a potential ~
48124    eval path="$path"
48125    if test ! -f "$path" && test ! -d "$path"; then
48126      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48127    fi
48128
48129    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48130  fi
48131
48132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48133        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48134      else
48135        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48136      fi
48137    fi
48138
48139    # Try to compile it
48140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48141$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48142    ac_ext=cpp
48143ac_cpp='$CXXCPP $CPPFLAGS'
48144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48147
48148    PREV_CXXCFLAGS="$CXXFLAGS"
48149    PREV_LIBS="$LIBS"
48150    PREV_CXX="$CXX"
48151    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48152    LIBS="$LIBS $FREETYPE_LIBS"
48153    CXX="$FIXPATH $CXX"
48154    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48155/* end confdefs.h.  */
48156
48157          #include<ft2build.h>
48158          #include FT_FREETYPE_H
48159          int main () {
48160            FT_Init_FreeType(NULL);
48161            return 0;
48162          }
48163
48164_ACEOF
48165if ac_fn_cxx_try_link "$LINENO"; then :
48166
48167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48168$as_echo "yes" >&6; }
48169
48170else
48171
48172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48173$as_echo "no" >&6; }
48174          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48175$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48176          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48177$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48178
48179
48180  # Print a helpful message on how to acquire the necessary build dependency.
48181  # freetype is the help tag: freetype, cups, pulse, alsa etc
48182  MISSING_DEPENDENCY=freetype
48183
48184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48185    cygwin_help $MISSING_DEPENDENCY
48186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48187    msys_help $MISSING_DEPENDENCY
48188  else
48189    PKGHANDLER_COMMAND=
48190
48191    case $PKGHANDLER in
48192      apt-get)
48193        apt_help     $MISSING_DEPENDENCY ;;
48194      yum)
48195        yum_help     $MISSING_DEPENDENCY ;;
48196      port)
48197        port_help    $MISSING_DEPENDENCY ;;
48198      pkgutil)
48199        pkgutil_help $MISSING_DEPENDENCY ;;
48200      pkgadd)
48201        pkgadd_help  $MISSING_DEPENDENCY ;;
48202    esac
48203
48204    if test "x$PKGHANDLER_COMMAND" != x; then
48205      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48206    fi
48207  fi
48208
48209
48210          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48211
48212
48213fi
48214rm -f core conftest.err conftest.$ac_objext \
48215    conftest$ac_exeext conftest.$ac_ext
48216    CXXCFLAGS="$PREV_CXXFLAGS"
48217    LIBS="$PREV_LIBS"
48218    CXX="$PREV_CXX"
48219    ac_ext=cpp
48220ac_cpp='$CXXCPP $CPPFLAGS'
48221ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48222ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48223ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48224
48225
48226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48227$as_echo_n "checking if we should bundle freetype... " >&6; }
48228    if test "x$BUNDLE_FREETYPE" = xyes; then
48229      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48230    fi
48231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48232$as_echo "$BUNDLE_FREETYPE" >&6; }
48233
48234  fi # end freetype needed
48235
48236
48237
48238
48239
48240
48241
48242  ###############################################################################
48243  #
48244  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48245  #
48246
48247# Check whether --with-alsa was given.
48248if test "${with_alsa+set}" = set; then :
48249  withval=$with_alsa;
48250fi
48251
48252
48253# Check whether --with-alsa-include was given.
48254if test "${with_alsa_include+set}" = set; then :
48255  withval=$with_alsa_include;
48256fi
48257
48258
48259# Check whether --with-alsa-lib was given.
48260if test "${with_alsa_lib+set}" = set; then :
48261  withval=$with_alsa_lib;
48262fi
48263
48264
48265  if test "x$ALSA_NOT_NEEDED" = xyes; then
48266    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48267      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48268$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48269    fi
48270    ALSA_CFLAGS=
48271    ALSA_LIBS=
48272  else
48273    ALSA_FOUND=no
48274
48275    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48276      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48277    fi
48278
48279    if test "x${with_alsa}" != x; then
48280      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48281      ALSA_CFLAGS="-I${with_alsa}/include"
48282      ALSA_FOUND=yes
48283    fi
48284    if test "x${with_alsa_include}" != x; then
48285      ALSA_CFLAGS="-I${with_alsa_include}"
48286      ALSA_FOUND=yes
48287    fi
48288    if test "x${with_alsa_lib}" != x; then
48289      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48290      ALSA_FOUND=yes
48291    fi
48292    if test "x$ALSA_FOUND" = xno; then
48293
48294
48295  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48296    # Source the builddeps file again, to make sure it uses the latest variables!
48297    . $builddepsfile
48298    # Look for a target and build machine specific resource!
48299    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48300    if test "x$resource" = x; then
48301      # Ok, lets instead look for a target specific resource
48302      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48303    fi
48304    if test "x$resource" = x; then
48305      # Ok, lets instead look for a build specific resource
48306      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48307    fi
48308    if test "x$resource" = x; then
48309      # Ok, lets instead look for a generic resource
48310      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48311      resource=${builddep_alsa}
48312    fi
48313    if test "x$resource" != x; then
48314      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48315$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48316      # If the resource in the builddeps.conf file is an existing directory,
48317      # for example /java/linux/cups
48318      if test -d ${resource}; then
48319        depdir=${resource}
48320      else
48321
48322  # alsa is for example mymodule
48323  # $resource is for example libs/general/libmymod_1_2_3.zip
48324  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48325  # $with_builddeps_dir is for example /localhome/builddeps
48326  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48327  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48328  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48329  filename=`basename $resource`
48330  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48331  filebase=${filename%%.*}
48332  extension=${filename#*.}
48333  installdir=$with_builddeps_dir/$filebase
48334  if test ! -f $installdir/$filename.unpacked; then
48335    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48336$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48337    if test ! -d $installdir; then
48338      mkdir -p $installdir
48339    fi
48340    if test ! -d $installdir; then
48341      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48342    fi
48343    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48344    touch $tmpfile
48345    if test ! -f $tmpfile; then
48346      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48347    fi
48348
48349  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48350  # $tmpfile is the local file name for the downloaded file.
48351  VALID_TOOL=no
48352  if test "x$BDEPS_FTP" = xwget; then
48353    VALID_TOOL=yes
48354    wget -O $tmpfile $with_builddeps_server/$resource
48355  fi
48356  if test "x$BDEPS_FTP" = xlftp; then
48357    VALID_TOOL=yes
48358    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48359  fi
48360  if test "x$BDEPS_FTP" = xftp; then
48361    VALID_TOOL=yes
48362    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48363    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48364    FTPUSERPWD=${FTPSERVER%%@*}
48365    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48366      FTPUSER=${userpwd%%:*}
48367      FTPPWD=${userpwd#*@}
48368      FTPSERVER=${FTPSERVER#*@}
48369    else
48370      FTPUSER=ftp
48371      FTPPWD=ftp
48372    fi
48373    # the "pass" command does not work on some
48374    # ftp clients (read ftp.exe) but if it works,
48375    # passive mode is better!
48376    ( \
48377        echo "user $FTPUSER $FTPPWD"        ; \
48378        echo "pass"                         ; \
48379        echo "bin"                          ; \
48380        echo "get $FTPPATH $tmpfile"              ; \
48381    ) | ftp -in $FTPSERVER
48382  fi
48383  if test "x$VALID_TOOL" != xyes; then
48384    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48385  fi
48386
48387    mv $tmpfile $installdir/$filename
48388    if test ! -s $installdir/$filename; then
48389      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48390    fi
48391    case "$extension" in
48392      zip)  echo "Unzipping $installdir/$filename..."
48393        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48394        ;;
48395      tar.gz) echo "Untaring $installdir/$filename..."
48396        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48397        ;;
48398      tgz) echo "Untaring $installdir/$filename..."
48399        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48400        ;;
48401      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48402        ;;
48403    esac
48404  fi
48405  if test -f $installdir/$filename.unpacked; then
48406    depdir=$installdir
48407  fi
48408
48409      fi
48410      # Source the builddeps file again, because in the previous command, the depdir
48411      # was updated to point at the current build dependency install directory.
48412      . $builddepsfile
48413      # Now extract variables from the builddeps.conf files.
48414      theroot=${builddep_alsa_ROOT}
48415      thecflags=${builddep_alsa_CFLAGS}
48416      thelibs=${builddep_alsa_LIBS}
48417      if test "x$depdir" = x; then
48418        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48419      fi
48420      ALSA=$depdir
48421      if test "x$theroot" != x; then
48422        ALSA="$theroot"
48423      fi
48424      if test "x$thecflags" != x; then
48425        ALSA_CFLAGS="$thecflags"
48426      fi
48427      if test "x$thelibs" != x; then
48428        ALSA_LIBS="$thelibs"
48429      fi
48430      ALSA_FOUND=yes
48431      else ALSA_FOUND=no
48432
48433    fi
48434    else ALSA_FOUND=no
48435
48436  fi
48437
48438    fi
48439    # Do not try pkg-config if we have a sysroot set.
48440    if test "x$SYSROOT" = x; then
48441      if test "x$ALSA_FOUND" = xno; then
48442
48443pkg_failed=no
48444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48445$as_echo_n "checking for ALSA... " >&6; }
48446
48447if test -n "$ALSA_CFLAGS"; then
48448    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48449 elif test -n "$PKG_CONFIG"; then
48450    if test -n "$PKG_CONFIG" && \
48451    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48452  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48453  ac_status=$?
48454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48455  test $ac_status = 0; }; then
48456  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48457else
48458  pkg_failed=yes
48459fi
48460 else
48461    pkg_failed=untried
48462fi
48463if test -n "$ALSA_LIBS"; then
48464    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48465 elif test -n "$PKG_CONFIG"; then
48466    if test -n "$PKG_CONFIG" && \
48467    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48468  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48469  ac_status=$?
48470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48471  test $ac_status = 0; }; then
48472  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48473else
48474  pkg_failed=yes
48475fi
48476 else
48477    pkg_failed=untried
48478fi
48479
48480
48481
48482if test $pkg_failed = yes; then
48483
48484if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48485        _pkg_short_errors_supported=yes
48486else
48487        _pkg_short_errors_supported=no
48488fi
48489        if test $_pkg_short_errors_supported = yes; then
48490	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48491        else
48492	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48493        fi
48494	# Put the nasty error message in config.log where it belongs
48495	echo "$ALSA_PKG_ERRORS" >&5
48496
48497	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48498$as_echo "no" >&6; }
48499                ALSA_FOUND=no
48500elif test $pkg_failed = untried; then
48501	ALSA_FOUND=no
48502else
48503	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48504	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48506$as_echo "yes" >&6; }
48507	ALSA_FOUND=yes
48508fi
48509      fi
48510    fi
48511    if test "x$ALSA_FOUND" = xno; then
48512      for ac_header in alsa/asoundlib.h
48513do :
48514  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48515if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48516  cat >>confdefs.h <<_ACEOF
48517#define HAVE_ALSA_ASOUNDLIB_H 1
48518_ACEOF
48519
48520            ALSA_FOUND=yes
48521            ALSA_CFLAGS=-Iignoreme
48522            ALSA_LIBS=-lasound
48523            DEFAULT_ALSA=yes
48524
48525else
48526  ALSA_FOUND=no
48527fi
48528
48529done
48530
48531    fi
48532    if test "x$ALSA_FOUND" = xno; then
48533
48534  # Print a helpful message on how to acquire the necessary build dependency.
48535  # alsa is the help tag: freetype, cups, pulse, alsa etc
48536  MISSING_DEPENDENCY=alsa
48537
48538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48539    cygwin_help $MISSING_DEPENDENCY
48540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48541    msys_help $MISSING_DEPENDENCY
48542  else
48543    PKGHANDLER_COMMAND=
48544
48545    case $PKGHANDLER in
48546      apt-get)
48547        apt_help     $MISSING_DEPENDENCY ;;
48548      yum)
48549        yum_help     $MISSING_DEPENDENCY ;;
48550      port)
48551        port_help    $MISSING_DEPENDENCY ;;
48552      pkgutil)
48553        pkgutil_help $MISSING_DEPENDENCY ;;
48554      pkgadd)
48555        pkgadd_help  $MISSING_DEPENDENCY ;;
48556    esac
48557
48558    if test "x$PKGHANDLER_COMMAND" != x; then
48559      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48560    fi
48561  fi
48562
48563      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48564    fi
48565  fi
48566
48567
48568
48569
48570
48571
48572  ###############################################################################
48573  #
48574  # Check for the jpeg library
48575  #
48576
48577
48578# Check whether --with-libjpeg was given.
48579if test "${with_libjpeg+set}" = set; then :
48580  withval=$with_libjpeg;
48581fi
48582
48583
48584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48585$as_echo_n "checking for which libjpeg to use... " >&6; }
48586
48587  # default is bundled
48588  DEFAULT_LIBJPEG=bundled
48589
48590  #
48591  # if user didn't specify, use DEFAULT_LIBJPEG
48592  #
48593  if test "x${with_libjpeg}" = "x"; then
48594    with_libjpeg=${DEFAULT_LIBJPEG}
48595  fi
48596
48597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48598$as_echo "${with_libjpeg}" >&6; }
48599
48600  if test "x${with_libjpeg}" = "xbundled"; then
48601    USE_EXTERNAL_LIBJPEG=false
48602  elif test "x${with_libjpeg}" = "xsystem"; then
48603    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48604if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48605
48606else
48607   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48608fi
48609
48610
48611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48612$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48613if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48614  $as_echo_n "(cached) " >&6
48615else
48616  ac_check_lib_save_LIBS=$LIBS
48617LIBS="-ljpeg  $LIBS"
48618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48619/* end confdefs.h.  */
48620
48621/* Override any GCC internal prototype to avoid an error.
48622   Use char because int might match the return type of a GCC
48623   builtin and then its argument prototype would still apply.  */
48624#ifdef __cplusplus
48625extern "C"
48626#endif
48627char jpeg_CreateDecompress ();
48628int
48629main ()
48630{
48631return jpeg_CreateDecompress ();
48632  ;
48633  return 0;
48634}
48635_ACEOF
48636if ac_fn_cxx_try_link "$LINENO"; then :
48637  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48638else
48639  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48640fi
48641rm -f core conftest.err conftest.$ac_objext \
48642    conftest$ac_exeext conftest.$ac_ext
48643LIBS=$ac_check_lib_save_LIBS
48644fi
48645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48646$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48647if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48648  cat >>confdefs.h <<_ACEOF
48649#define HAVE_LIBJPEG 1
48650_ACEOF
48651
48652  LIBS="-ljpeg $LIBS"
48653
48654else
48655   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48656fi
48657
48658
48659    USE_EXTERNAL_LIBJPEG=true
48660  else
48661    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48662  fi
48663
48664
48665
48666  ###############################################################################
48667  #
48668  # Check for the gif library
48669  #
48670
48671
48672# Check whether --with-giflib was given.
48673if test "${with_giflib+set}" = set; then :
48674  withval=$with_giflib;
48675fi
48676
48677
48678
48679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48680$as_echo_n "checking for which giflib to use... " >&6; }
48681
48682  # default is bundled
48683  DEFAULT_GIFLIB=bundled
48684
48685  #
48686  # if user didn't specify, use DEFAULT_GIFLIB
48687  #
48688  if test "x${with_giflib}" = "x"; then
48689    with_giflib=${DEFAULT_GIFLIB}
48690  fi
48691
48692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48693$as_echo "${with_giflib}" >&6; }
48694
48695  if test "x${with_giflib}" = "xbundled"; then
48696    USE_EXTERNAL_LIBGIF=false
48697  elif test "x${with_giflib}" = "xsystem"; then
48698    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48699if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48700
48701else
48702   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48703fi
48704
48705
48706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48707$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48708if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48709  $as_echo_n "(cached) " >&6
48710else
48711  ac_check_lib_save_LIBS=$LIBS
48712LIBS="-lgif  $LIBS"
48713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48714/* end confdefs.h.  */
48715
48716/* Override any GCC internal prototype to avoid an error.
48717   Use char because int might match the return type of a GCC
48718   builtin and then its argument prototype would still apply.  */
48719#ifdef __cplusplus
48720extern "C"
48721#endif
48722char DGifGetCode ();
48723int
48724main ()
48725{
48726return DGifGetCode ();
48727  ;
48728  return 0;
48729}
48730_ACEOF
48731if ac_fn_cxx_try_link "$LINENO"; then :
48732  ac_cv_lib_gif_DGifGetCode=yes
48733else
48734  ac_cv_lib_gif_DGifGetCode=no
48735fi
48736rm -f core conftest.err conftest.$ac_objext \
48737    conftest$ac_exeext conftest.$ac_ext
48738LIBS=$ac_check_lib_save_LIBS
48739fi
48740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48741$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48742if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48743  cat >>confdefs.h <<_ACEOF
48744#define HAVE_LIBGIF 1
48745_ACEOF
48746
48747  LIBS="-lgif $LIBS"
48748
48749else
48750   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48751fi
48752
48753
48754    USE_EXTERNAL_LIBGIF=true
48755  else
48756    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48757  fi
48758
48759
48760  ###############################################################################
48761  #
48762  # Check for the lcms2 library
48763  #
48764
48765
48766# Check whether --with-lcms was given.
48767if test "${with_lcms+set}" = set; then :
48768  withval=$with_lcms;
48769fi
48770
48771
48772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48773$as_echo_n "checking for which lcms to use... " >&6; }
48774
48775  DEFAULT_LCMS=bundled
48776
48777  #
48778  # If user didn't specify, use DEFAULT_LCMS
48779  #
48780  if test "x${with_lcms}" = "x"; then
48781      with_lcms=${DEFAULT_LCMS}
48782  fi
48783
48784  if test "x${with_lcms}" = "xbundled"; then
48785    USE_EXTERNAL_LCMS=false
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48787$as_echo "bundled" >&6; }
48788  elif test "x${with_lcms}" = "xsystem"; then
48789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48790$as_echo "system" >&6; }
48791
48792pkg_failed=no
48793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48794$as_echo_n "checking for LCMS... " >&6; }
48795
48796if test -n "$LCMS_CFLAGS"; then
48797    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48798 elif test -n "$PKG_CONFIG"; then
48799    if test -n "$PKG_CONFIG" && \
48800    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48801  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48802  ac_status=$?
48803  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48804  test $ac_status = 0; }; then
48805  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48806else
48807  pkg_failed=yes
48808fi
48809 else
48810    pkg_failed=untried
48811fi
48812if test -n "$LCMS_LIBS"; then
48813    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48814 elif test -n "$PKG_CONFIG"; then
48815    if test -n "$PKG_CONFIG" && \
48816    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48817  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48818  ac_status=$?
48819  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48820  test $ac_status = 0; }; then
48821  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48822else
48823  pkg_failed=yes
48824fi
48825 else
48826    pkg_failed=untried
48827fi
48828
48829
48830
48831if test $pkg_failed = yes; then
48832
48833if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48834        _pkg_short_errors_supported=yes
48835else
48836        _pkg_short_errors_supported=no
48837fi
48838        if test $_pkg_short_errors_supported = yes; then
48839	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48840        else
48841	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48842        fi
48843	# Put the nasty error message in config.log where it belongs
48844	echo "$LCMS_PKG_ERRORS" >&5
48845
48846	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48847$as_echo "no" >&6; }
48848                LCMS_FOUND=no
48849elif test $pkg_failed = untried; then
48850	LCMS_FOUND=no
48851else
48852	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48853	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48855$as_echo "yes" >&6; }
48856	LCMS_FOUND=yes
48857fi
48858    if test "x${LCMS_FOUND}" = "xyes"; then
48859      USE_EXTERNAL_LCMS=true
48860    else
48861      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48862    fi
48863  else
48864    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48865  fi
48866
48867
48868
48869  ###############################################################################
48870  #
48871  # Check for the png library
48872  #
48873
48874
48875# Check whether --with-libpng was given.
48876if test "${with_libpng+set}" = set; then :
48877  withval=$with_libpng;
48878fi
48879
48880
48881
48882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48883$as_echo_n "checking for which libpng to use... " >&6; }
48884
48885  # default is bundled
48886  DEFAULT_LIBPNG=bundled
48887
48888  #
48889  # if user didn't specify, use DEFAULT_LIBPNG
48890  #
48891  if test "x${with_libpng}" = "x"; then
48892      with_libpng=${DEFAULT_LIBPNG}
48893  fi
48894
48895  if test "x${with_libpng}" = "xbundled"; then
48896      USE_EXTERNAL_LIBPNG=false
48897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48898$as_echo "bundled" >&6; }
48899  elif test "x${with_libpng}" = "xsystem"; then
48900
48901pkg_failed=no
48902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48903$as_echo_n "checking for PNG... " >&6; }
48904
48905if test -n "$PNG_CFLAGS"; then
48906    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48907 elif test -n "$PKG_CONFIG"; then
48908    if test -n "$PKG_CONFIG" && \
48909    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48910  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48911  ac_status=$?
48912  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48913  test $ac_status = 0; }; then
48914  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48915else
48916  pkg_failed=yes
48917fi
48918 else
48919    pkg_failed=untried
48920fi
48921if test -n "$PNG_LIBS"; then
48922    pkg_cv_PNG_LIBS="$PNG_LIBS"
48923 elif test -n "$PKG_CONFIG"; then
48924    if test -n "$PKG_CONFIG" && \
48925    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48926  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48927  ac_status=$?
48928  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48929  test $ac_status = 0; }; then
48930  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48931else
48932  pkg_failed=yes
48933fi
48934 else
48935    pkg_failed=untried
48936fi
48937
48938
48939
48940if test $pkg_failed = yes; then
48941
48942if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48943        _pkg_short_errors_supported=yes
48944else
48945        _pkg_short_errors_supported=no
48946fi
48947        if test $_pkg_short_errors_supported = yes; then
48948	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48949        else
48950	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48951        fi
48952	# Put the nasty error message in config.log where it belongs
48953	echo "$PNG_PKG_ERRORS" >&5
48954
48955	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48956$as_echo "no" >&6; }
48957                 LIBPNG_FOUND=no
48958elif test $pkg_failed = untried; then
48959	 LIBPNG_FOUND=no
48960else
48961	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48962	PNG_LIBS=$pkg_cv_PNG_LIBS
48963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48964$as_echo "yes" >&6; }
48965	 LIBPNG_FOUND=yes
48966fi
48967      if test "x${LIBPNG_FOUND}" = "xyes"; then
48968          USE_EXTERNAL_LIBPNG=true
48969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48970$as_echo "system" >&6; }
48971      else
48972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48973$as_echo "system not found" >&6; }
48974          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48975      fi
48976  else
48977      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48978  fi
48979
48980
48981  ###############################################################################
48982  #
48983  # Check for the zlib library
48984  #
48985
48986
48987# Check whether --with-zlib was given.
48988if test "${with_zlib+set}" = set; then :
48989  withval=$with_zlib;
48990fi
48991
48992
48993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48994$as_echo_n "checking for compress in -lz... " >&6; }
48995if ${ac_cv_lib_z_compress+:} false; then :
48996  $as_echo_n "(cached) " >&6
48997else
48998  ac_check_lib_save_LIBS=$LIBS
48999LIBS="-lz  $LIBS"
49000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49001/* end confdefs.h.  */
49002
49003/* Override any GCC internal prototype to avoid an error.
49004   Use char because int might match the return type of a GCC
49005   builtin and then its argument prototype would still apply.  */
49006#ifdef __cplusplus
49007extern "C"
49008#endif
49009char compress ();
49010int
49011main ()
49012{
49013return compress ();
49014  ;
49015  return 0;
49016}
49017_ACEOF
49018if ac_fn_cxx_try_link "$LINENO"; then :
49019  ac_cv_lib_z_compress=yes
49020else
49021  ac_cv_lib_z_compress=no
49022fi
49023rm -f core conftest.err conftest.$ac_objext \
49024    conftest$ac_exeext conftest.$ac_ext
49025LIBS=$ac_check_lib_save_LIBS
49026fi
49027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49028$as_echo "$ac_cv_lib_z_compress" >&6; }
49029if test "x$ac_cv_lib_z_compress" = xyes; then :
49030   ZLIB_FOUND=yes
49031else
49032   ZLIB_FOUND=no
49033fi
49034
49035
49036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49037$as_echo_n "checking for which zlib to use... " >&6; }
49038
49039  DEFAULT_ZLIB=bundled
49040  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49041    #
49042    # On macosx default is system...on others default is
49043    #
49044    DEFAULT_ZLIB=system
49045  fi
49046
49047  if test "x${ZLIB_FOUND}" != "xyes"; then
49048    #
49049    # If we don't find any system...set default to bundled
49050    #
49051    DEFAULT_ZLIB=bundled
49052  fi
49053
49054  #
49055  # If user didn't specify, use DEFAULT_ZLIB
49056  #
49057  if test "x${with_zlib}" = "x"; then
49058    with_zlib=${DEFAULT_ZLIB}
49059  fi
49060
49061  if test "x${with_zlib}" = "xbundled"; then
49062    USE_EXTERNAL_LIBZ=false
49063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49064$as_echo "bundled" >&6; }
49065  elif test "x${with_zlib}" = "xsystem"; then
49066    if test "x${ZLIB_FOUND}" = "xyes"; then
49067      USE_EXTERNAL_LIBZ=true
49068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49069$as_echo "system" >&6; }
49070    else
49071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49072$as_echo "system not found" >&6; }
49073      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49074    fi
49075  else
49076    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49077  fi
49078
49079
49080
49081  ###############################################################################
49082  LIBZIP_CAN_USE_MMAP=true
49083
49084
49085
49086  ###############################################################################
49087  #
49088  # Check if altzone exists in time.h
49089  #
49090
49091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49092/* end confdefs.h.  */
49093#include <time.h>
49094int
49095main ()
49096{
49097return (int)altzone;
49098  ;
49099  return 0;
49100}
49101_ACEOF
49102if ac_fn_cxx_try_link "$LINENO"; then :
49103  has_altzone=yes
49104else
49105  has_altzone=no
49106fi
49107rm -f core conftest.err conftest.$ac_objext \
49108    conftest$ac_exeext conftest.$ac_ext
49109  if test "x$has_altzone" = xyes; then
49110
49111$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49112
49113  fi
49114
49115  ###############################################################################
49116  #
49117  # Check the maths library
49118  #
49119
49120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49121$as_echo_n "checking for cos in -lm... " >&6; }
49122if ${ac_cv_lib_m_cos+:} false; then :
49123  $as_echo_n "(cached) " >&6
49124else
49125  ac_check_lib_save_LIBS=$LIBS
49126LIBS="-lm  $LIBS"
49127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49128/* end confdefs.h.  */
49129
49130/* Override any GCC internal prototype to avoid an error.
49131   Use char because int might match the return type of a GCC
49132   builtin and then its argument prototype would still apply.  */
49133#ifdef __cplusplus
49134extern "C"
49135#endif
49136char cos ();
49137int
49138main ()
49139{
49140return cos ();
49141  ;
49142  return 0;
49143}
49144_ACEOF
49145if ac_fn_cxx_try_link "$LINENO"; then :
49146  ac_cv_lib_m_cos=yes
49147else
49148  ac_cv_lib_m_cos=no
49149fi
49150rm -f core conftest.err conftest.$ac_objext \
49151    conftest$ac_exeext conftest.$ac_ext
49152LIBS=$ac_check_lib_save_LIBS
49153fi
49154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49155$as_echo "$ac_cv_lib_m_cos" >&6; }
49156if test "x$ac_cv_lib_m_cos" = xyes; then :
49157  cat >>confdefs.h <<_ACEOF
49158#define HAVE_LIBM 1
49159_ACEOF
49160
49161  LIBS="-lm $LIBS"
49162
49163else
49164
49165        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49166$as_echo "$as_me: Maths library was not found" >&6;}
49167
49168
49169fi
49170
49171
49172
49173  ###############################################################################
49174  #
49175  # Check for libdl.so
49176
49177  save_LIBS="$LIBS"
49178  LIBS=""
49179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49180$as_echo_n "checking for dlopen in -ldl... " >&6; }
49181if ${ac_cv_lib_dl_dlopen+:} false; then :
49182  $as_echo_n "(cached) " >&6
49183else
49184  ac_check_lib_save_LIBS=$LIBS
49185LIBS="-ldl  $LIBS"
49186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49187/* end confdefs.h.  */
49188
49189/* Override any GCC internal prototype to avoid an error.
49190   Use char because int might match the return type of a GCC
49191   builtin and then its argument prototype would still apply.  */
49192#ifdef __cplusplus
49193extern "C"
49194#endif
49195char dlopen ();
49196int
49197main ()
49198{
49199return dlopen ();
49200  ;
49201  return 0;
49202}
49203_ACEOF
49204if ac_fn_cxx_try_link "$LINENO"; then :
49205  ac_cv_lib_dl_dlopen=yes
49206else
49207  ac_cv_lib_dl_dlopen=no
49208fi
49209rm -f core conftest.err conftest.$ac_objext \
49210    conftest$ac_exeext conftest.$ac_ext
49211LIBS=$ac_check_lib_save_LIBS
49212fi
49213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49214$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49215if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49216  cat >>confdefs.h <<_ACEOF
49217#define HAVE_LIBDL 1
49218_ACEOF
49219
49220  LIBS="-ldl $LIBS"
49221
49222fi
49223
49224  LIBDL="$LIBS"
49225
49226  LIBS="$save_LIBS"
49227
49228
49229  ###############################################################################
49230  #
49231  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49232  # dynamic build is configured on command line.
49233  #
49234
49235# Check whether --with-stdc++lib was given.
49236if test "${with_stdc__lib+set}" = set; then :
49237  withval=$with_stdc__lib;
49238        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49239                && test "x$with_stdc__lib" != xdefault; then
49240          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49241        fi
49242
49243else
49244  with_stdc__lib=default
49245
49246fi
49247
49248
49249  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49250    # Test if -lstdc++ works.
49251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49252$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49253    ac_ext=cpp
49254ac_cpp='$CXXCPP $CPPFLAGS'
49255ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49256ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49257ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49258
49259    OLD_CXXFLAGS="$CXXFLAGS"
49260    CXXFLAGS="$CXXFLAGS -lstdc++"
49261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49262/* end confdefs.h.  */
49263
49264int
49265main ()
49266{
49267return 0;
49268  ;
49269  return 0;
49270}
49271_ACEOF
49272if ac_fn_cxx_try_link "$LINENO"; then :
49273  has_dynamic_libstdcxx=yes
49274else
49275  has_dynamic_libstdcxx=no
49276fi
49277rm -f core conftest.err conftest.$ac_objext \
49278    conftest$ac_exeext conftest.$ac_ext
49279    CXXFLAGS="$OLD_CXXFLAGS"
49280    ac_ext=cpp
49281ac_cpp='$CXXCPP $CPPFLAGS'
49282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49285
49286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49287$as_echo "$has_dynamic_libstdcxx" >&6; }
49288
49289    # Test if stdc++ can be linked statically.
49290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49291$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49292    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49293    ac_ext=cpp
49294ac_cpp='$CXXCPP $CPPFLAGS'
49295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49298
49299    OLD_LIBS="$LIBS"
49300    OLD_CXX="$CXX"
49301    LIBS="$STATIC_STDCXX_FLAGS"
49302    CXX="$CC"
49303    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49304/* end confdefs.h.  */
49305
49306int
49307main ()
49308{
49309return 0;
49310  ;
49311  return 0;
49312}
49313_ACEOF
49314if ac_fn_cxx_try_link "$LINENO"; then :
49315  has_static_libstdcxx=yes
49316else
49317  has_static_libstdcxx=no
49318fi
49319rm -f core conftest.err conftest.$ac_objext \
49320    conftest$ac_exeext conftest.$ac_ext
49321    LIBS="$OLD_LIBS"
49322    CXX="$OLD_CXX"
49323    ac_ext=cpp
49324ac_cpp='$CXXCPP $CPPFLAGS'
49325ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49326ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49327ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49328
49329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49330$as_echo "$has_static_libstdcxx" >&6; }
49331
49332    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49333      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49334    fi
49335
49336    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49337      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49338    fi
49339
49340    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49341      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49342    fi
49343
49344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49345$as_echo_n "checking how to link with libstdc++... " >&6; }
49346    # If dynamic was requested, it's available since it would fail above otherwise.
49347    # If dynamic wasn't requested, go with static unless it isn't available.
49348    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49349      LIBCXX="$LIBCXX -lstdc++"
49350      LDCXX="$CXX"
49351      STATIC_CXX_SETTING="STATIC_CXX=false"
49352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49353$as_echo "dynamic" >&6; }
49354    else
49355      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49356      LDCXX="$CC"
49357      STATIC_CXX_SETTING="STATIC_CXX=true"
49358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49359$as_echo "static" >&6; }
49360    fi
49361  fi
49362
49363
49364  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49365    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49366
49367pkg_failed=no
49368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49369$as_echo_n "checking for LIBFFI... " >&6; }
49370
49371if test -n "$LIBFFI_CFLAGS"; then
49372    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49373 elif test -n "$PKG_CONFIG"; then
49374    if test -n "$PKG_CONFIG" && \
49375    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49376  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49377  ac_status=$?
49378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49379  test $ac_status = 0; }; then
49380  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49381else
49382  pkg_failed=yes
49383fi
49384 else
49385    pkg_failed=untried
49386fi
49387if test -n "$LIBFFI_LIBS"; then
49388    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49389 elif test -n "$PKG_CONFIG"; then
49390    if test -n "$PKG_CONFIG" && \
49391    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49392  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49393  ac_status=$?
49394  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49395  test $ac_status = 0; }; then
49396  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49397else
49398  pkg_failed=yes
49399fi
49400 else
49401    pkg_failed=untried
49402fi
49403
49404
49405
49406if test $pkg_failed = yes; then
49407
49408if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49409        _pkg_short_errors_supported=yes
49410else
49411        _pkg_short_errors_supported=no
49412fi
49413        if test $_pkg_short_errors_supported = yes; then
49414	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49415        else
49416	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49417        fi
49418	# Put the nasty error message in config.log where it belongs
49419	echo "$LIBFFI_PKG_ERRORS" >&5
49420
49421	as_fn_error $? "Package requirements (libffi) were not met:
49422
49423$LIBFFI_PKG_ERRORS
49424
49425Consider adjusting the PKG_CONFIG_PATH environment variable if you
49426installed software in a non-standard prefix.
49427
49428Alternatively, you may set the environment variables LIBFFI_CFLAGS
49429and LIBFFI_LIBS to avoid the need to call pkg-config.
49430See the pkg-config man page for more details.
49431" "$LINENO" 5
49432elif test $pkg_failed = untried; then
49433	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49435as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49436is in your PATH or set the PKG_CONFIG environment variable to the full
49437path to pkg-config.
49438
49439Alternatively, you may set the environment variables LIBFFI_CFLAGS
49440and LIBFFI_LIBS to avoid the need to call pkg-config.
49441See the pkg-config man page for more details.
49442
49443To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49444See \`config.log' for more details" "$LINENO" 5; }
49445else
49446	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49447	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49449$as_echo "yes" >&6; }
49450	:
49451fi
49452
49453  fi
49454
49455  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49456    # Extract the first word of "llvm-config", so it can be a program name with args.
49457set dummy llvm-config; ac_word=$2
49458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49459$as_echo_n "checking for $ac_word... " >&6; }
49460if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49461  $as_echo_n "(cached) " >&6
49462else
49463  if test -n "$LLVM_CONFIG"; then
49464  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49465else
49466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49467for as_dir in $PATH
49468do
49469  IFS=$as_save_IFS
49470  test -z "$as_dir" && as_dir=.
49471    for ac_exec_ext in '' $ac_executable_extensions; do
49472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49473    ac_cv_prog_LLVM_CONFIG="llvm-config"
49474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49475    break 2
49476  fi
49477done
49478  done
49479IFS=$as_save_IFS
49480
49481fi
49482fi
49483LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49484if test -n "$LLVM_CONFIG"; then
49485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49486$as_echo "$LLVM_CONFIG" >&6; }
49487else
49488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49489$as_echo "no" >&6; }
49490fi
49491
49492
49493
49494    if test "x$LLVM_CONFIG" != xllvm-config; then
49495      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49496    fi
49497
49498    llvm_components="jit mcjit engine nativecodegen native"
49499    unset LLVM_CFLAGS
49500    for flag in $("$LLVM_CONFIG" --cxxflags); do
49501      if echo "${flag}" | grep -q '^-[ID]'; then
49502        if test "${flag}" != "-D_DEBUG" ; then
49503          if test "${LLVM_CFLAGS}" != "" ; then
49504            LLVM_CFLAGS="${LLVM_CFLAGS} "
49505          fi
49506          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49507        fi
49508      fi
49509    done
49510    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49511    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49512
49513    unset LLVM_LDFLAGS
49514    for flag in $("${LLVM_CONFIG}" --ldflags); do
49515      if echo "${flag}" | grep -q '^-L'; then
49516        if test "${LLVM_LDFLAGS}" != ""; then
49517          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49518        fi
49519        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49520      fi
49521    done
49522
49523    unset LLVM_LIBS
49524    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49525      if echo "${flag}" | grep -q '^-l'; then
49526        if test "${LLVM_LIBS}" != ""; then
49527          LLVM_LIBS="${LLVM_LIBS} "
49528        fi
49529        LLVM_LIBS="${LLVM_LIBS}${flag}"
49530      fi
49531    done
49532
49533
49534
49535
49536  fi
49537
49538  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49539  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49540    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49541  fi
49542
49543  # TODO better (platform agnostic) test
49544  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49545    LIBCXX="-lstdc++"
49546  fi
49547
49548
49549
49550
49551  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49552
49553
49554# Check whether --with-msvcr-dll was given.
49555if test "${with_msvcr_dll+set}" = set; then :
49556  withval=$with_msvcr_dll;
49557fi
49558
49559
49560  if test "x$with_msvcr_dll" != x; then
49561    # If given explicitely by user, do not probe. If not present, fail directly.
49562
49563  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49564  METHOD="--with-msvcr-dll"
49565  if test -e "$POSSIBLE_MSVCR_DLL"; then
49566    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49567$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49568
49569    # Need to check if the found msvcr is correct architecture
49570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49571$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49572    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49574      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49575      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49577        CORRECT_MSVCR_ARCH="PE32 executable"
49578      else
49579        CORRECT_MSVCR_ARCH="PE32+ executable"
49580      fi
49581    else
49582      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49583        CORRECT_MSVCR_ARCH=386
49584      else
49585        CORRECT_MSVCR_ARCH=x86-64
49586      fi
49587    fi
49588    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49590$as_echo "ok" >&6; }
49591      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49593$as_echo_n "checking for msvcr100.dll... " >&6; }
49594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49595$as_echo "$MSVCR_DLL" >&6; }
49596    else
49597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49598$as_echo "incorrect, ignoring" >&6; }
49599      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49600$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49601    fi
49602  fi
49603
49604    if test "x$MSVCR_DLL" = x; then
49605      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49606    fi
49607  fi
49608
49609  if test "x$MSVCR_DLL" = x; then
49610    # Probe: Using well-known location from Visual Studio 10.0
49611    if test "x$VCINSTALLDIR" != x; then
49612      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49613
49614  windows_path="$CYGWIN_VC_INSTALL_DIR"
49615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49616    unix_path=`$CYGPATH -u "$windows_path"`
49617    CYGWIN_VC_INSTALL_DIR="$unix_path"
49618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49620    CYGWIN_VC_INSTALL_DIR="$unix_path"
49621  fi
49622
49623      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49624        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49625      else
49626        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49627      fi
49628
49629  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49630  METHOD="well-known location in VCINSTALLDIR"
49631  if test -e "$POSSIBLE_MSVCR_DLL"; then
49632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49633$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49634
49635    # Need to check if the found msvcr is correct architecture
49636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49637$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49638    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49640      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49641      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49642      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49643        CORRECT_MSVCR_ARCH="PE32 executable"
49644      else
49645        CORRECT_MSVCR_ARCH="PE32+ executable"
49646      fi
49647    else
49648      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49649        CORRECT_MSVCR_ARCH=386
49650      else
49651        CORRECT_MSVCR_ARCH=x86-64
49652      fi
49653    fi
49654    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49656$as_echo "ok" >&6; }
49657      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49659$as_echo_n "checking for msvcr100.dll... " >&6; }
49660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49661$as_echo "$MSVCR_DLL" >&6; }
49662    else
49663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49664$as_echo "incorrect, ignoring" >&6; }
49665      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49666$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49667    fi
49668  fi
49669
49670    fi
49671  fi
49672
49673  if test "x$MSVCR_DLL" = x; then
49674    # Probe: Check in the Boot JDK directory.
49675    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49676
49677  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49678  METHOD="well-known location in Boot JDK"
49679  if test -e "$POSSIBLE_MSVCR_DLL"; then
49680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49681$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49682
49683    # Need to check if the found msvcr is correct architecture
49684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49685$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49686    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49688      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49689      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49691        CORRECT_MSVCR_ARCH="PE32 executable"
49692      else
49693        CORRECT_MSVCR_ARCH="PE32+ executable"
49694      fi
49695    else
49696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49697        CORRECT_MSVCR_ARCH=386
49698      else
49699        CORRECT_MSVCR_ARCH=x86-64
49700      fi
49701    fi
49702    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49704$as_echo "ok" >&6; }
49705      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49707$as_echo_n "checking for msvcr100.dll... " >&6; }
49708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49709$as_echo "$MSVCR_DLL" >&6; }
49710    else
49711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49712$as_echo "incorrect, ignoring" >&6; }
49713      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49714$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49715    fi
49716  fi
49717
49718  fi
49719
49720  if test "x$MSVCR_DLL" = x; then
49721    # Probe: Look in the Windows system32 directory
49722    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49723
49724  windows_path="$CYGWIN_SYSTEMROOT"
49725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49726    unix_path=`$CYGPATH -u "$windows_path"`
49727    CYGWIN_SYSTEMROOT="$unix_path"
49728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49730    CYGWIN_SYSTEMROOT="$unix_path"
49731  fi
49732
49733    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49734
49735  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49736  METHOD="well-known location in SYSTEMROOT"
49737  if test -e "$POSSIBLE_MSVCR_DLL"; then
49738    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49739$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49740
49741    # Need to check if the found msvcr is correct architecture
49742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49743$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49744    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49746      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49747      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49748      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49749        CORRECT_MSVCR_ARCH="PE32 executable"
49750      else
49751        CORRECT_MSVCR_ARCH="PE32+ executable"
49752      fi
49753    else
49754      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49755        CORRECT_MSVCR_ARCH=386
49756      else
49757        CORRECT_MSVCR_ARCH=x86-64
49758      fi
49759    fi
49760    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49762$as_echo "ok" >&6; }
49763      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49764      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49765$as_echo_n "checking for msvcr100.dll... " >&6; }
49766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49767$as_echo "$MSVCR_DLL" >&6; }
49768    else
49769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49770$as_echo "incorrect, ignoring" >&6; }
49771      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49772$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49773    fi
49774  fi
49775
49776  fi
49777
49778  if test "x$MSVCR_DLL" = x; then
49779    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49780    if test "x$VS100COMNTOOLS" != x; then
49781      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49782
49783  windows_path="$CYGWIN_VS_TOOLS_DIR"
49784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49785    unix_path=`$CYGPATH -u "$windows_path"`
49786    CYGWIN_VS_TOOLS_DIR="$unix_path"
49787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49789    CYGWIN_VS_TOOLS_DIR="$unix_path"
49790  fi
49791
49792      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49793        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49794      else
49795        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49796      fi
49797
49798  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49799  METHOD="search of VS100COMNTOOLS"
49800  if test -e "$POSSIBLE_MSVCR_DLL"; then
49801    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49802$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49803
49804    # Need to check if the found msvcr is correct architecture
49805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49806$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49807    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49809      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49810      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49811      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49812        CORRECT_MSVCR_ARCH="PE32 executable"
49813      else
49814        CORRECT_MSVCR_ARCH="PE32+ executable"
49815      fi
49816    else
49817      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49818        CORRECT_MSVCR_ARCH=386
49819      else
49820        CORRECT_MSVCR_ARCH=x86-64
49821      fi
49822    fi
49823    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49825$as_echo "ok" >&6; }
49826      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49828$as_echo_n "checking for msvcr100.dll... " >&6; }
49829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49830$as_echo "$MSVCR_DLL" >&6; }
49831    else
49832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49833$as_echo "incorrect, ignoring" >&6; }
49834      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49835$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49836    fi
49837  fi
49838
49839    fi
49840  fi
49841
49842  if test "x$MSVCR_DLL" = x; then
49843    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49844    # (This was the original behaviour; kept since it might turn up something)
49845    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49846      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49847        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49848      else
49849        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49850        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49851          # We're grasping at straws now...
49852          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49853        fi
49854      fi
49855
49856
49857  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49858  METHOD="search of VCINSTALLDIR"
49859  if test -e "$POSSIBLE_MSVCR_DLL"; then
49860    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49861$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49862
49863    # Need to check if the found msvcr is correct architecture
49864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49865$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49866    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49868      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49869      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49870      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49871        CORRECT_MSVCR_ARCH="PE32 executable"
49872      else
49873        CORRECT_MSVCR_ARCH="PE32+ executable"
49874      fi
49875    else
49876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49877        CORRECT_MSVCR_ARCH=386
49878      else
49879        CORRECT_MSVCR_ARCH=x86-64
49880      fi
49881    fi
49882    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49884$as_echo "ok" >&6; }
49885      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49887$as_echo_n "checking for msvcr100.dll... " >&6; }
49888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49889$as_echo "$MSVCR_DLL" >&6; }
49890    else
49891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49892$as_echo "incorrect, ignoring" >&6; }
49893      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49894$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49895    fi
49896  fi
49897
49898    fi
49899  fi
49900
49901  if test "x$MSVCR_DLL" = x; then
49902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49903$as_echo_n "checking for msvcr100.dll... " >&6; }
49904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49905$as_echo "no" >&6; }
49906    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49907  fi
49908
49909
49910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49911
49912  # Input might be given as Windows format, start by converting to
49913  # unix format.
49914  path="$MSVCR_DLL"
49915  new_path=`$CYGPATH -u "$path"`
49916
49917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49920  # "foo.exe" is OK but "foo" is an error.
49921  #
49922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49923  # It is also a way to make sure we got the proper file name for the real test later on.
49924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49925  if test "x$test_shortpath" = x; then
49926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49927$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49928    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49929  fi
49930
49931  # Call helper function which possibly converts this using DOS-style short mode.
49932  # If so, the updated path is stored in $new_path.
49933
49934  input_path="$new_path"
49935  # Check if we need to convert this using DOS-style short mode. If the path
49936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49937  # take no chances and rewrite it.
49938  # Note: m4 eats our [], so we need to use [ and ] instead.
49939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49940  if test "x$has_forbidden_chars" != x; then
49941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49945      # Going to short mode and back again did indeed matter. Since short mode is
49946      # case insensitive, let's make it lowercase to improve readability.
49947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49948      # Now convert it back to Unix-stile (cygpath)
49949      input_path=`$CYGPATH -u "$shortmode_path"`
49950      new_path="$input_path"
49951    fi
49952  fi
49953
49954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49955  if test "x$test_cygdrive_prefix" = x; then
49956    # As a simple fix, exclude /usr/bin since it's not a real path.
49957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49959      # a path prefixed by /cygdrive for fixpath to work.
49960      new_path="$CYGWIN_ROOT_PATH$input_path"
49961    fi
49962  fi
49963
49964
49965  if test "x$path" != "x$new_path"; then
49966    MSVCR_DLL="$new_path"
49967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49968$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49969  fi
49970
49971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49972
49973  path="$MSVCR_DLL"
49974  has_colon=`$ECHO $path | $GREP ^.:`
49975  new_path="$path"
49976  if test "x$has_colon" = x; then
49977    # Not in mixed or Windows style, start by that.
49978    new_path=`cmd //c echo $path`
49979  fi
49980
49981
49982  input_path="$new_path"
49983  # Check if we need to convert this using DOS-style short mode. If the path
49984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49985  # take no chances and rewrite it.
49986  # Note: m4 eats our [], so we need to use [ and ] instead.
49987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49988  if test "x$has_forbidden_chars" != x; then
49989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49991  fi
49992
49993
49994  windows_path="$new_path"
49995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49996    unix_path=`$CYGPATH -u "$windows_path"`
49997    new_path="$unix_path"
49998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50000    new_path="$unix_path"
50001  fi
50002
50003  if test "x$path" != "x$new_path"; then
50004    MSVCR_DLL="$new_path"
50005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50006$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50007  fi
50008
50009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50011
50012  else
50013    # We're on a unix platform. Hooray! :)
50014    path="$MSVCR_DLL"
50015    has_space=`$ECHO "$path" | $GREP " "`
50016    if test "x$has_space" != x; then
50017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50018$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50020    fi
50021
50022    # Use eval to expand a potential ~
50023    eval path="$path"
50024    if test ! -f "$path" && test ! -d "$path"; then
50025      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50026    fi
50027
50028    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50029  fi
50030
50031
50032
50033
50034# Check whether --with-dxsdk was given.
50035if test "${with_dxsdk+set}" = set; then :
50036  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50037$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50038fi
50039
50040
50041
50042
50043# Check whether --with-dxsdk-lib was given.
50044if test "${with_dxsdk_lib+set}" = set; then :
50045  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50046$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50047fi
50048
50049
50050
50051
50052# Check whether --with-dxsdk-include was given.
50053if test "${with_dxsdk_include+set}" = set; then :
50054  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50055$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50056fi
50057
50058
50059  fi
50060
50061
50062
50063###############################################################################
50064#
50065# We need to do some final tweaking, when everything else is done.
50066#
50067###############################################################################
50068
50069
50070  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50071
50072
50073  # The name of the Service Agent jar.
50074  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50075  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50076    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50077  fi
50078
50079
50080
50081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50082$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50083
50084    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50085      ENABLE_INTREE_EC=yes
50086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50087$as_echo "yes" >&6; }
50088    else
50089      ENABLE_INTREE_EC=no
50090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50091$as_echo "no" >&6; }
50092    fi
50093
50094
50095
50096
50097###############################################################################
50098#
50099# Configure parts of the build that only affect the build performance,
50100# not the result.
50101#
50102###############################################################################
50103
50104
50105  # How many cores do we have on this build system?
50106
50107# Check whether --with-num-cores was given.
50108if test "${with_num_cores+set}" = set; then :
50109  withval=$with_num_cores;
50110fi
50111
50112  if test "x$with_num_cores" = x; then
50113    # The number of cores were not specified, try to probe them.
50114
50115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50116$as_echo_n "checking for number of cores... " >&6; }
50117  NUM_CORES=1
50118  FOUND_CORES=no
50119
50120  if test -f /proc/cpuinfo; then
50121    # Looks like a Linux (or cygwin) system
50122    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50123    FOUND_CORES=yes
50124  elif test -x /usr/sbin/psrinfo; then
50125    # Looks like a Solaris system
50126    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50127    FOUND_CORES=yes
50128  elif test -x /usr/sbin/system_profiler; then
50129    # Looks like a MacOSX system
50130    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50131    FOUND_CORES=yes
50132  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50133    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50134    FOUND_CORES=yes
50135  elif test -n "$NUMBER_OF_PROCESSORS"; then
50136    # On windows, look in the env
50137    NUM_CORES=$NUMBER_OF_PROCESSORS
50138    FOUND_CORES=yes
50139  fi
50140
50141  if test "x$FOUND_CORES" = xyes; then
50142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50143$as_echo "$NUM_CORES" >&6; }
50144  else
50145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50146$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50148$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50149  fi
50150
50151  else
50152    NUM_CORES=$with_num_cores
50153  fi
50154
50155
50156
50157  # How much memory do we have on this build system?
50158
50159# Check whether --with-memory-size was given.
50160if test "${with_memory_size+set}" = set; then :
50161  withval=$with_memory_size;
50162fi
50163
50164  if test "x$with_memory_size" = x; then
50165    # The memory size was not specified, try to probe it.
50166
50167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50168$as_echo_n "checking for memory size... " >&6; }
50169  # Default to 1024 MB
50170  MEMORY_SIZE=1024
50171  FOUND_MEM=no
50172
50173  if test -f /proc/meminfo; then
50174    # Looks like a Linux (or cygwin) system
50175    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50176    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50177    FOUND_MEM=yes
50178  elif test -x /usr/sbin/prtconf; then
50179    # Looks like a Solaris or AIX system
50180    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50181    FOUND_MEM=yes
50182  elif test -x /usr/sbin/system_profiler; then
50183    # Looks like a MacOSX system
50184    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50185    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50186    FOUND_MEM=yes
50187  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50188    # Windows, but without cygwin
50189    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50190    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50191    FOUND_MEM=yes
50192  fi
50193
50194  if test "x$FOUND_MEM" = xyes; then
50195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50196$as_echo "$MEMORY_SIZE MB" >&6; }
50197  else
50198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50199$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50201$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50202  fi
50203
50204  else
50205    MEMORY_SIZE=$with_memory_size
50206  fi
50207
50208
50209
50210  # Provide a decent default number of parallel jobs for make depending on
50211  # number of cores, amount of memory and machine architecture.
50212
50213# Check whether --with-jobs was given.
50214if test "${with_jobs+set}" = set; then :
50215  withval=$with_jobs;
50216fi
50217
50218  if test "x$with_jobs" = x; then
50219    # Number of jobs was not specified, calculate.
50220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50221$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50222    # Approximate memory in GB.
50223    memory_gb=`expr $MEMORY_SIZE / 1024`
50224    # Pick the lowest of memory in gb and number of cores.
50225    if test "$memory_gb" -lt "$NUM_CORES"; then
50226      JOBS="$memory_gb"
50227    else
50228      JOBS="$NUM_CORES"
50229      # On bigger machines, leave some room for other processes to run
50230      if test "$JOBS" -gt "4"; then
50231        JOBS=`expr $JOBS '*' 90 / 100`
50232      fi
50233    fi
50234    # Cap number of jobs to 16
50235    if test "$JOBS" -gt "16"; then
50236      JOBS=16
50237    fi
50238    if test "$JOBS" -eq "0"; then
50239      JOBS=1
50240    fi
50241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50242$as_echo "$JOBS" >&6; }
50243  else
50244    JOBS=$with_jobs
50245  fi
50246
50247
50248
50249# Setup arguments for the boot jdk (after cores and memory have been setup)
50250
50251  ##############################################################################
50252  #
50253  # Specify jvm options for anything that is run with the Boot JDK.
50254  # Not all JVM:s accept the same arguments on the command line.
50255  #
50256
50257# Check whether --with-boot-jdk-jvmargs was given.
50258if test "${with_boot_jdk_jvmargs+set}" = set; then :
50259  withval=$with_boot_jdk_jvmargs;
50260fi
50261
50262
50263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50264$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50265
50266  # Disable special log output when a debug build is used as Boot JDK...
50267
50268  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50269  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50270  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50271  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50272  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50273  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50274    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50275    JVM_ARG_OK=true
50276  else
50277    $ECHO "Arg failed:" >&5
50278    $ECHO "$OUTPUT" >&5
50279    JVM_ARG_OK=false
50280  fi
50281
50282
50283  # Apply user provided options.
50284
50285  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50286  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50287  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50288  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50289  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50290  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50291    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50292    JVM_ARG_OK=true
50293  else
50294    $ECHO "Arg failed:" >&5
50295    $ECHO "$OUTPUT" >&5
50296    JVM_ARG_OK=false
50297  fi
50298
50299
50300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50301$as_echo "$boot_jdk_jvmargs" >&6; }
50302
50303  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50304  JAVA_FLAGS=$boot_jdk_jvmargs
50305
50306
50307
50308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50309$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50310
50311  # Starting amount of heap memory.
50312
50313  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50314  $ECHO "Command: $JAVA -Xms64M -version" >&5
50315  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50316  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50317  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50318  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50319    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50320    JVM_ARG_OK=true
50321  else
50322    $ECHO "Arg failed:" >&5
50323    $ECHO "$OUTPUT" >&5
50324    JVM_ARG_OK=false
50325  fi
50326
50327
50328  # Maximum amount of heap memory.
50329  # Maximum stack size.
50330  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50331  if test "x$BUILD_NUM_BITS" = x32; then
50332    if test "$JVM_MAX_HEAP" -gt "1100"; then
50333      JVM_MAX_HEAP=1100
50334    elif test "$JVM_MAX_HEAP" -lt "512"; then
50335      JVM_MAX_HEAP=512
50336    fi
50337    STACK_SIZE=768
50338  else
50339    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50340    # pointers are used. Apparently, we need to increase the heap and stack
50341    # space for the jvm. More specifically, when running javac to build huge
50342    # jdk batch
50343    if test "$JVM_MAX_HEAP" -gt "1600"; then
50344      JVM_MAX_HEAP=1600
50345    elif test "$JVM_MAX_HEAP" -lt "512"; then
50346      JVM_MAX_HEAP=512
50347    fi
50348    STACK_SIZE=1536
50349  fi
50350
50351  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50352  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50353  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50354  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50355  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50356  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50357    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50358    JVM_ARG_OK=true
50359  else
50360    $ECHO "Arg failed:" >&5
50361    $ECHO "$OUTPUT" >&5
50362    JVM_ARG_OK=false
50363  fi
50364
50365
50366  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50367  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50368  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50369  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50370  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50371  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50372    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50373    JVM_ARG_OK=true
50374  else
50375    $ECHO "Arg failed:" >&5
50376    $ECHO "$OUTPUT" >&5
50377    JVM_ARG_OK=false
50378  fi
50379
50380
50381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50382$as_echo "$boot_jdk_jvmargs_big" >&6; }
50383
50384  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50385
50386
50387
50388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50389$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50390
50391  # Use serial gc for small short lived tools if possible
50392
50393  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50394  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50395  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50396  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50397  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50398  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50399    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50400    JVM_ARG_OK=true
50401  else
50402    $ECHO "Arg failed:" >&5
50403    $ECHO "$OUTPUT" >&5
50404    JVM_ARG_OK=false
50405  fi
50406
50407
50408  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50409  $ECHO "Command: $JAVA -Xms32M -version" >&5
50410  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50411  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50412  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50413  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50414    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50415    JVM_ARG_OK=true
50416  else
50417    $ECHO "Arg failed:" >&5
50418    $ECHO "$OUTPUT" >&5
50419    JVM_ARG_OK=false
50420  fi
50421
50422
50423  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50424  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50425  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50426  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50427  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50428  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50429    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50430    JVM_ARG_OK=true
50431  else
50432    $ECHO "Arg failed:" >&5
50433    $ECHO "$OUTPUT" >&5
50434    JVM_ARG_OK=false
50435  fi
50436
50437
50438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50439$as_echo "$boot_jdk_jvmargs_small" >&6; }
50440
50441  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50442
50443
50444  JAVA_TOOL_FLAGS_SMALL=""
50445  for f in $JAVA_FLAGS_SMALL; do
50446    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50447  done
50448
50449
50450
50451# Setup smart javac (after cores and memory have been setup)
50452
50453
50454# Check whether --with-sjavac-server-java was given.
50455if test "${with_sjavac_server_java+set}" = set; then :
50456  withval=$with_sjavac_server_java;
50457fi
50458
50459
50460  if test "x$with_sjavac_server_java" != x; then
50461    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50462    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50463    if test "x$FOUND_VERSION" = x; then
50464      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50465    fi
50466  else
50467    SJAVAC_SERVER_JAVA="$JAVA"
50468  fi
50469
50470
50471  if test "$MEMORY_SIZE" -gt "3000"; then
50472
50473  $ECHO "Check if jvm arg is ok: -d64" >&5
50474  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50475  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50476  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50477  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50478  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50479    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50480    JVM_ARG_OK=true
50481  else
50482    $ECHO "Arg failed:" >&5
50483    $ECHO "$OUTPUT" >&5
50484    JVM_ARG_OK=false
50485  fi
50486
50487    if test "$JVM_ARG_OK" = true; then
50488      JVM_64BIT=true
50489      JVM_ARG_OK=false
50490    fi
50491  fi
50492
50493  MX_VALUE=`expr $MEMORY_SIZE / 2`
50494  if test "$JVM_64BIT" = true; then
50495    # Set ms lower than mx since more than one instance of the server might
50496    # get launched at the same time before they figure out which instance won.
50497    MS_VALUE=512
50498    if test "$MX_VALUE" -gt "2048"; then
50499      MX_VALUE=2048
50500    fi
50501  else
50502    MS_VALUE=256
50503    if test "$MX_VALUE" -gt "1500"; then
50504      MX_VALUE=1500
50505    fi
50506  fi
50507  if test "$MX_VALUE" -lt "512"; then
50508    MX_VALUE=512
50509  fi
50510
50511  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50512  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50513  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50514  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50515  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50516  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50517    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50518    JVM_ARG_OK=true
50519  else
50520    $ECHO "Arg failed:" >&5
50521    $ECHO "$OUTPUT" >&5
50522    JVM_ARG_OK=false
50523  fi
50524
50525
50526
50527  # Check whether --enable-sjavac was given.
50528if test "${enable_sjavac+set}" = set; then :
50529  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50530else
50531  ENABLE_SJAVAC='no'
50532fi
50533
50534  if test "x$JVM_ARG_OK" = "xfalse"; then
50535    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50536$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50537    ENABLE_SJAVAC=no;
50538  fi
50539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50540$as_echo_n "checking whether to use sjavac... " >&6; }
50541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50542$as_echo "$ENABLE_SJAVAC" >&6; }
50543
50544
50545  if test "x$ENABLE_SJAVAC" = xyes; then
50546    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50547  else
50548    SJAVAC_SERVER_DIR=
50549  fi
50550
50551
50552
50553# Can the C/C++ compiler use precompiled headers?
50554
50555
50556  ###############################################################################
50557  #
50558  # Can the C/C++ compiler use precompiled headers?
50559  #
50560  # Check whether --enable-precompiled-headers was given.
50561if test "${enable_precompiled_headers+set}" = set; then :
50562  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50563else
50564  ENABLE_PRECOMPH=yes
50565fi
50566
50567
50568  USE_PRECOMPILED_HEADER=1
50569  if test "x$ENABLE_PRECOMPH" = xno; then
50570    USE_PRECOMPILED_HEADER=0
50571  fi
50572
50573  if test "x$ENABLE_PRECOMPH" = xyes; then
50574    # Check that the compiler actually supports precomp headers.
50575    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50577$as_echo_n "checking that precompiled headers work... " >&6; }
50578      echo "int alfa();" > conftest.h
50579      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50580      if test ! -f conftest.hpp.gch; then
50581        USE_PRECOMPILED_HEADER=0
50582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50583$as_echo "no" >&6; }
50584      else
50585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50586$as_echo "yes" >&6; }
50587      fi
50588      rm -f conftest.h conftest.hpp.gch
50589    fi
50590  fi
50591
50592
50593
50594
50595# Setup use of ccache, if available
50596
50597  # Check whether --enable-ccache was given.
50598if test "${enable_ccache+set}" = set; then :
50599  enableval=$enable_ccache;
50600fi
50601
50602
50603  CCACHE=
50604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50605$as_echo_n "checking is ccache enabled... " >&6; }
50606  ENABLE_CCACHE=$enable_ccache
50607  if test "x$enable_ccache" = xyes; then
50608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50609$as_echo "yes" >&6; }
50610    OLD_PATH="$PATH"
50611    if test "x$TOOLCHAIN_PATH" != x; then
50612      PATH=$TOOLCHAIN_PATH:$PATH
50613    fi
50614
50615
50616
50617  # Publish this variable in the help.
50618
50619
50620  if test "x$CCACHE" = x; then
50621    # The variable is not set by user, try to locate tool using the code snippet
50622    for ac_prog in ccache
50623do
50624  # Extract the first word of "$ac_prog", so it can be a program name with args.
50625set dummy $ac_prog; ac_word=$2
50626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50627$as_echo_n "checking for $ac_word... " >&6; }
50628if ${ac_cv_path_CCACHE+:} false; then :
50629  $as_echo_n "(cached) " >&6
50630else
50631  case $CCACHE in
50632  [\\/]* | ?:[\\/]*)
50633  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50634  ;;
50635  *)
50636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50637for as_dir in $PATH
50638do
50639  IFS=$as_save_IFS
50640  test -z "$as_dir" && as_dir=.
50641    for ac_exec_ext in '' $ac_executable_extensions; do
50642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50643    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50645    break 2
50646  fi
50647done
50648  done
50649IFS=$as_save_IFS
50650
50651  ;;
50652esac
50653fi
50654CCACHE=$ac_cv_path_CCACHE
50655if test -n "$CCACHE"; then
50656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50657$as_echo "$CCACHE" >&6; }
50658else
50659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50660$as_echo "no" >&6; }
50661fi
50662
50663
50664  test -n "$CCACHE" && break
50665done
50666
50667  else
50668    # The variable is set, but is it from the command line or the environment?
50669
50670    # Try to remove the string !CCACHE! from our list.
50671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50673      # If it failed, the variable was not from the command line. Ignore it,
50674      # but warn the user (except for BASH, which is always set by the calling BASH).
50675      if test "xCCACHE" != xBASH; then
50676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50677$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50678      fi
50679      # Try to locate tool using the code snippet
50680      for ac_prog in ccache
50681do
50682  # Extract the first word of "$ac_prog", so it can be a program name with args.
50683set dummy $ac_prog; ac_word=$2
50684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50685$as_echo_n "checking for $ac_word... " >&6; }
50686if ${ac_cv_path_CCACHE+:} false; then :
50687  $as_echo_n "(cached) " >&6
50688else
50689  case $CCACHE in
50690  [\\/]* | ?:[\\/]*)
50691  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50692  ;;
50693  *)
50694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50695for as_dir in $PATH
50696do
50697  IFS=$as_save_IFS
50698  test -z "$as_dir" && as_dir=.
50699    for ac_exec_ext in '' $ac_executable_extensions; do
50700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50701    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50703    break 2
50704  fi
50705done
50706  done
50707IFS=$as_save_IFS
50708
50709  ;;
50710esac
50711fi
50712CCACHE=$ac_cv_path_CCACHE
50713if test -n "$CCACHE"; then
50714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50715$as_echo "$CCACHE" >&6; }
50716else
50717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50718$as_echo "no" >&6; }
50719fi
50720
50721
50722  test -n "$CCACHE" && break
50723done
50724
50725    else
50726      # If it succeeded, then it was overridden by the user. We will use it
50727      # for the tool.
50728
50729      # First remove it from the list of overridden variables, so we can test
50730      # for unknown variables in the end.
50731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50732
50733      # Check if the provided tool contains a complete path.
50734      tool_specified="$CCACHE"
50735      tool_basename="${tool_specified##*/}"
50736      if test "x$tool_basename" = "x$tool_specified"; then
50737        # A command without a complete path is provided, search $PATH.
50738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50739$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50740        # Extract the first word of "$tool_basename", so it can be a program name with args.
50741set dummy $tool_basename; ac_word=$2
50742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50743$as_echo_n "checking for $ac_word... " >&6; }
50744if ${ac_cv_path_CCACHE+:} false; then :
50745  $as_echo_n "(cached) " >&6
50746else
50747  case $CCACHE in
50748  [\\/]* | ?:[\\/]*)
50749  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50750  ;;
50751  *)
50752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50753for as_dir in $PATH
50754do
50755  IFS=$as_save_IFS
50756  test -z "$as_dir" && as_dir=.
50757    for ac_exec_ext in '' $ac_executable_extensions; do
50758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50759    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50761    break 2
50762  fi
50763done
50764  done
50765IFS=$as_save_IFS
50766
50767  ;;
50768esac
50769fi
50770CCACHE=$ac_cv_path_CCACHE
50771if test -n "$CCACHE"; then
50772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50773$as_echo "$CCACHE" >&6; }
50774else
50775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50776$as_echo "no" >&6; }
50777fi
50778
50779
50780        if test "x$CCACHE" = x; then
50781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50782        fi
50783      else
50784        # Otherwise we believe it is a complete path. Use it as it is.
50785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50786$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50788$as_echo_n "checking for CCACHE... " >&6; }
50789        if test ! -x "$tool_specified"; then
50790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50791$as_echo "not found" >&6; }
50792          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50793        fi
50794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50795$as_echo "$tool_specified" >&6; }
50796      fi
50797    fi
50798  fi
50799
50800
50801
50802  if test "x$CCACHE" = x; then
50803    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50804  fi
50805
50806
50807    CCACHE_STATUS="enabled"
50808    PATH="$OLD_PATH"
50809  elif test "x$enable_ccache" = xno; then
50810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50811$as_echo "no, explicitly disabled" >&6; }
50812  elif test "x$enable_ccache" = x; then
50813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50814$as_echo "no" >&6; }
50815  else
50816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50817$as_echo "unknown" >&6; }
50818    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50819  fi
50820
50821
50822
50823# Check whether --with-ccache-dir was given.
50824if test "${with_ccache_dir+set}" = set; then :
50825  withval=$with_ccache_dir;
50826fi
50827
50828
50829  if test "x$with_ccache_dir" != x; then
50830    # When using a non home ccache directory, assume the use is to share ccache files
50831    # with other users. Thus change the umask.
50832    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50833    if test "x$CCACHE" = x; then
50834      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50835$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50836    fi
50837  fi
50838
50839  if test "x$CCACHE" != x; then
50840
50841  if test "x$CCACHE" != x; then
50842    # Only use ccache if it is 3.1.4 or later, which supports
50843    # precompiled headers.
50844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50845$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50846    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50847    if test "x$HAS_GOOD_CCACHE" = x; then
50848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50849$as_echo "no, disabling ccache" >&6; }
50850      CCACHE=
50851      CCACHE_STATUS="disabled"
50852    else
50853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50854$as_echo "yes" >&6; }
50855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50856$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50857      PUSHED_FLAGS="$CXXFLAGS"
50858      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50859      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50860/* end confdefs.h.  */
50861
50862int
50863main ()
50864{
50865
50866  ;
50867  return 0;
50868}
50869_ACEOF
50870if ac_fn_cxx_try_compile "$LINENO"; then :
50871  CC_KNOWS_CCACHE_TRICK=yes
50872else
50873  CC_KNOWS_CCACHE_TRICK=no
50874fi
50875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50876      CXXFLAGS="$PUSHED_FLAGS"
50877      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50879$as_echo "yes" >&6; }
50880      else
50881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50882$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50883        CCACHE=
50884        CCACHE_STATUS="disabled"
50885      fi
50886    fi
50887  fi
50888
50889  if test "x$CCACHE" != x; then
50890    CCACHE_SLOPPINESS=time_macros
50891    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50892    CCACHE_FLAGS=-fpch-preprocess
50893
50894    if test "x$SET_CCACHE_DIR" != x; then
50895      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50896      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50897    fi
50898  fi
50899
50900  fi
50901
50902
50903###############################################################################
50904#
50905# And now the finish...
50906#
50907###############################################################################
50908
50909# Check for some common pitfalls
50910
50911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50912    file_to_test="$SRC_ROOT/LICENSE"
50913    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50914      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
50915    fi
50916  fi
50917
50918
50919  # Did user specify any unknown variables?
50920
50921  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50922    # Replace the separating ! with spaces before presenting for end user.
50923    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50924    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50925$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50926  fi
50927
50928
50929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50930$as_echo_n "checking if build directory is on local disk... " >&6; }
50931
50932  # df -l lists only local disks; if the given directory is not found then
50933  # a non-zero exit code is given
50934  if test "x$DF" = x; then
50935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50936      # msys does not have df; use Windows "net use" instead.
50937      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50938      if test "x$IS_NETWORK_DISK" = x; then
50939        OUTPUT_DIR_IS_LOCAL="yes"
50940      else
50941        OUTPUT_DIR_IS_LOCAL="no"
50942      fi
50943    else
50944      # No df here, say it's local
50945      OUTPUT_DIR_IS_LOCAL="yes"
50946    fi
50947  else
50948    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50949      OUTPUT_DIR_IS_LOCAL="yes"
50950    else
50951      OUTPUT_DIR_IS_LOCAL="no"
50952    fi
50953  fi
50954
50955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50956$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50957
50958
50959
50960  # Check if the user has any old-style ALT_ variables set.
50961  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50962
50963  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50964  # Since we can't properly handle the dependencies for this, warn the user about the situation
50965  if test -e $OUTPUT_ROOT/spec.gmk; then
50966    IS_RECONFIGURE=yes
50967  else
50968    IS_RECONFIGURE=no
50969  fi
50970
50971
50972# At the end, call the custom hook. (Dummy macro if no custom sources available)
50973
50974
50975# We're messing a bit with internal autoconf variables to put the config.status
50976# in the output directory instead of the current directory.
50977CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50978
50979# Create the actual output files. Now the main work of configure is done.
50980cat >confcache <<\_ACEOF
50981# This file is a shell script that caches the results of configure
50982# tests run on this system so they can be shared between configure
50983# scripts and configure runs, see configure's option --config-cache.
50984# It is not useful on other systems.  If it contains results you don't
50985# want to keep, you may remove or edit it.
50986#
50987# config.status only pays attention to the cache file if you give it
50988# the --recheck option to rerun configure.
50989#
50990# `ac_cv_env_foo' variables (set or unset) will be overridden when
50991# loading this file, other *unset* `ac_cv_foo' will be assigned the
50992# following values.
50993
50994_ACEOF
50995
50996# The following way of writing the cache mishandles newlines in values,
50997# but we know of no workaround that is simple, portable, and efficient.
50998# So, we kill variables containing newlines.
50999# Ultrix sh set writes to stderr and can't be redirected directly,
51000# and sets the high bit in the cache file unless we assign to the vars.
51001(
51002  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51003    eval ac_val=\$$ac_var
51004    case $ac_val in #(
51005    *${as_nl}*)
51006      case $ac_var in #(
51007      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51008$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51009      esac
51010      case $ac_var in #(
51011      _ | IFS | as_nl) ;; #(
51012      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51013      *) { eval $ac_var=; unset $ac_var;} ;;
51014      esac ;;
51015    esac
51016  done
51017
51018  (set) 2>&1 |
51019    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51020    *${as_nl}ac_space=\ *)
51021      # `set' does not quote correctly, so add quotes: double-quote
51022      # substitution turns \\\\ into \\, and sed turns \\ into \.
51023      sed -n \
51024	"s/'/'\\\\''/g;
51025	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51026      ;; #(
51027    *)
51028      # `set' quotes correctly as required by POSIX, so do not add quotes.
51029      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51030      ;;
51031    esac |
51032    sort
51033) |
51034  sed '
51035     /^ac_cv_env_/b end
51036     t clear
51037     :clear
51038     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51039     t end
51040     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51041     :end' >>confcache
51042if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51043  if test -w "$cache_file"; then
51044    if test "x$cache_file" != "x/dev/null"; then
51045      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51046$as_echo "$as_me: updating cache $cache_file" >&6;}
51047      if test ! -f "$cache_file" || test -h "$cache_file"; then
51048	cat confcache >"$cache_file"
51049      else
51050        case $cache_file in #(
51051        */* | ?:*)
51052	  mv -f confcache "$cache_file"$$ &&
51053	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51054        *)
51055	  mv -f confcache "$cache_file" ;;
51056	esac
51057      fi
51058    fi
51059  else
51060    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51061$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51062  fi
51063fi
51064rm -f confcache
51065
51066test "x$prefix" = xNONE && prefix=$ac_default_prefix
51067# Let make expand exec_prefix.
51068test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51069
51070# Transform confdefs.h into DEFS.
51071# Protect against shell expansion while executing Makefile rules.
51072# Protect against Makefile macro expansion.
51073#
51074# If the first sed substitution is executed (which looks for macros that
51075# take arguments), then branch to the quote section.  Otherwise,
51076# look for a macro that doesn't take arguments.
51077ac_script='
51078:mline
51079/\\$/{
51080 N
51081 s,\\\n,,
51082 b mline
51083}
51084t clear
51085:clear
51086s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51087t quote
51088s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51089t quote
51090b any
51091:quote
51092s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51093s/\[/\\&/g
51094s/\]/\\&/g
51095s/\$/$$/g
51096H
51097:any
51098${
51099	g
51100	s/^\n//
51101	s/\n/ /g
51102	p
51103}
51104'
51105DEFS=`sed -n "$ac_script" confdefs.h`
51106
51107
51108ac_libobjs=
51109ac_ltlibobjs=
51110U=
51111for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51112  # 1. Remove the extension, and $U if already installed.
51113  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51114  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51115  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51116  #    will be set to the directory where LIBOBJS objects are built.
51117  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51118  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51119done
51120LIBOBJS=$ac_libobjs
51121
51122LTLIBOBJS=$ac_ltlibobjs
51123
51124
51125
51126: "${CONFIG_STATUS=./config.status}"
51127ac_write_fail=0
51128ac_clean_files_save=$ac_clean_files
51129ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51130{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51131$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51132as_write_fail=0
51133cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51134#! $SHELL
51135# Generated by $as_me.
51136# Run this file to recreate the current configuration.
51137# Compiler output produced by configure, useful for debugging
51138# configure, is in config.log if it exists.
51139
51140debug=false
51141ac_cs_recheck=false
51142ac_cs_silent=false
51143
51144SHELL=\${CONFIG_SHELL-$SHELL}
51145export SHELL
51146_ASEOF
51147cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51148## -------------------- ##
51149## M4sh Initialization. ##
51150## -------------------- ##
51151
51152# Be more Bourne compatible
51153DUALCASE=1; export DUALCASE # for MKS sh
51154if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51155  emulate sh
51156  NULLCMD=:
51157  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51158  # is contrary to our usage.  Disable this feature.
51159  alias -g '${1+"$@"}'='"$@"'
51160  setopt NO_GLOB_SUBST
51161else
51162  case `(set -o) 2>/dev/null` in #(
51163  *posix*) :
51164    set -o posix ;; #(
51165  *) :
51166     ;;
51167esac
51168fi
51169
51170
51171as_nl='
51172'
51173export as_nl
51174# Printing a long string crashes Solaris 7 /usr/bin/printf.
51175as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51176as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51177as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51178# Prefer a ksh shell builtin over an external printf program on Solaris,
51179# but without wasting forks for bash or zsh.
51180if test -z "$BASH_VERSION$ZSH_VERSION" \
51181    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51182  as_echo='print -r --'
51183  as_echo_n='print -rn --'
51184elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51185  as_echo='printf %s\n'
51186  as_echo_n='printf %s'
51187else
51188  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51189    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51190    as_echo_n='/usr/ucb/echo -n'
51191  else
51192    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51193    as_echo_n_body='eval
51194      arg=$1;
51195      case $arg in #(
51196      *"$as_nl"*)
51197	expr "X$arg" : "X\\(.*\\)$as_nl";
51198	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51199      esac;
51200      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51201    '
51202    export as_echo_n_body
51203    as_echo_n='sh -c $as_echo_n_body as_echo'
51204  fi
51205  export as_echo_body
51206  as_echo='sh -c $as_echo_body as_echo'
51207fi
51208
51209# The user is always right.
51210if test "${PATH_SEPARATOR+set}" != set; then
51211  PATH_SEPARATOR=:
51212  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51213    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51214      PATH_SEPARATOR=';'
51215  }
51216fi
51217
51218
51219# IFS
51220# We need space, tab and new line, in precisely that order.  Quoting is
51221# there to prevent editors from complaining about space-tab.
51222# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51223# splitting by setting IFS to empty value.)
51224IFS=" ""	$as_nl"
51225
51226# Find who we are.  Look in the path if we contain no directory separator.
51227as_myself=
51228case $0 in #((
51229  *[\\/]* ) as_myself=$0 ;;
51230  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51231for as_dir in $PATH
51232do
51233  IFS=$as_save_IFS
51234  test -z "$as_dir" && as_dir=.
51235    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51236  done
51237IFS=$as_save_IFS
51238
51239     ;;
51240esac
51241# We did not find ourselves, most probably we were run as `sh COMMAND'
51242# in which case we are not to be found in the path.
51243if test "x$as_myself" = x; then
51244  as_myself=$0
51245fi
51246if test ! -f "$as_myself"; then
51247  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51248  exit 1
51249fi
51250
51251# Unset variables that we do not need and which cause bugs (e.g. in
51252# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51253# suppresses any "Segmentation fault" message there.  '((' could
51254# trigger a bug in pdksh 5.2.14.
51255for as_var in BASH_ENV ENV MAIL MAILPATH
51256do eval test x\${$as_var+set} = xset \
51257  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51258done
51259PS1='$ '
51260PS2='> '
51261PS4='+ '
51262
51263# NLS nuisances.
51264LC_ALL=C
51265export LC_ALL
51266LANGUAGE=C
51267export LANGUAGE
51268
51269# CDPATH.
51270(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51271
51272
51273# as_fn_error STATUS ERROR [LINENO LOG_FD]
51274# ----------------------------------------
51275# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51276# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51277# script with STATUS, using 1 if that was 0.
51278as_fn_error ()
51279{
51280  as_status=$1; test $as_status -eq 0 && as_status=1
51281  if test "$4"; then
51282    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51283    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51284  fi
51285  $as_echo "$as_me: error: $2" >&2
51286  as_fn_exit $as_status
51287} # as_fn_error
51288
51289
51290# as_fn_set_status STATUS
51291# -----------------------
51292# Set $? to STATUS, without forking.
51293as_fn_set_status ()
51294{
51295  return $1
51296} # as_fn_set_status
51297
51298# as_fn_exit STATUS
51299# -----------------
51300# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51301as_fn_exit ()
51302{
51303  set +e
51304  as_fn_set_status $1
51305  exit $1
51306} # as_fn_exit
51307
51308# as_fn_unset VAR
51309# ---------------
51310# Portably unset VAR.
51311as_fn_unset ()
51312{
51313  { eval $1=; unset $1;}
51314}
51315as_unset=as_fn_unset
51316# as_fn_append VAR VALUE
51317# ----------------------
51318# Append the text in VALUE to the end of the definition contained in VAR. Take
51319# advantage of any shell optimizations that allow amortized linear growth over
51320# repeated appends, instead of the typical quadratic growth present in naive
51321# implementations.
51322if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51323  eval 'as_fn_append ()
51324  {
51325    eval $1+=\$2
51326  }'
51327else
51328  as_fn_append ()
51329  {
51330    eval $1=\$$1\$2
51331  }
51332fi # as_fn_append
51333
51334# as_fn_arith ARG...
51335# ------------------
51336# Perform arithmetic evaluation on the ARGs, and store the result in the
51337# global $as_val. Take advantage of shells that can avoid forks. The arguments
51338# must be portable across $(()) and expr.
51339if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51340  eval 'as_fn_arith ()
51341  {
51342    as_val=$(( $* ))
51343  }'
51344else
51345  as_fn_arith ()
51346  {
51347    as_val=`expr "$@" || test $? -eq 1`
51348  }
51349fi # as_fn_arith
51350
51351
51352if expr a : '\(a\)' >/dev/null 2>&1 &&
51353   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51354  as_expr=expr
51355else
51356  as_expr=false
51357fi
51358
51359if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51360  as_basename=basename
51361else
51362  as_basename=false
51363fi
51364
51365if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51366  as_dirname=dirname
51367else
51368  as_dirname=false
51369fi
51370
51371as_me=`$as_basename -- "$0" ||
51372$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51373	 X"$0" : 'X\(//\)$' \| \
51374	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51375$as_echo X/"$0" |
51376    sed '/^.*\/\([^/][^/]*\)\/*$/{
51377	    s//\1/
51378	    q
51379	  }
51380	  /^X\/\(\/\/\)$/{
51381	    s//\1/
51382	    q
51383	  }
51384	  /^X\/\(\/\).*/{
51385	    s//\1/
51386	    q
51387	  }
51388	  s/.*/./; q'`
51389
51390# Avoid depending upon Character Ranges.
51391as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51392as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51393as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51394as_cr_digits='0123456789'
51395as_cr_alnum=$as_cr_Letters$as_cr_digits
51396
51397ECHO_C= ECHO_N= ECHO_T=
51398case `echo -n x` in #(((((
51399-n*)
51400  case `echo 'xy\c'` in
51401  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51402  xy)  ECHO_C='\c';;
51403  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51404       ECHO_T='	';;
51405  esac;;
51406*)
51407  ECHO_N='-n';;
51408esac
51409
51410rm -f conf$$ conf$$.exe conf$$.file
51411if test -d conf$$.dir; then
51412  rm -f conf$$.dir/conf$$.file
51413else
51414  rm -f conf$$.dir
51415  mkdir conf$$.dir 2>/dev/null
51416fi
51417if (echo >conf$$.file) 2>/dev/null; then
51418  if ln -s conf$$.file conf$$ 2>/dev/null; then
51419    as_ln_s='ln -s'
51420    # ... but there are two gotchas:
51421    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51422    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51423    # In both cases, we have to default to `cp -pR'.
51424    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51425      as_ln_s='cp -pR'
51426  elif ln conf$$.file conf$$ 2>/dev/null; then
51427    as_ln_s=ln
51428  else
51429    as_ln_s='cp -pR'
51430  fi
51431else
51432  as_ln_s='cp -pR'
51433fi
51434rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51435rmdir conf$$.dir 2>/dev/null
51436
51437
51438# as_fn_mkdir_p
51439# -------------
51440# Create "$as_dir" as a directory, including parents if necessary.
51441as_fn_mkdir_p ()
51442{
51443
51444  case $as_dir in #(
51445  -*) as_dir=./$as_dir;;
51446  esac
51447  test -d "$as_dir" || eval $as_mkdir_p || {
51448    as_dirs=
51449    while :; do
51450      case $as_dir in #(
51451      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51452      *) as_qdir=$as_dir;;
51453      esac
51454      as_dirs="'$as_qdir' $as_dirs"
51455      as_dir=`$as_dirname -- "$as_dir" ||
51456$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51457	 X"$as_dir" : 'X\(//\)[^/]' \| \
51458	 X"$as_dir" : 'X\(//\)$' \| \
51459	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51460$as_echo X"$as_dir" |
51461    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51462	    s//\1/
51463	    q
51464	  }
51465	  /^X\(\/\/\)[^/].*/{
51466	    s//\1/
51467	    q
51468	  }
51469	  /^X\(\/\/\)$/{
51470	    s//\1/
51471	    q
51472	  }
51473	  /^X\(\/\).*/{
51474	    s//\1/
51475	    q
51476	  }
51477	  s/.*/./; q'`
51478      test -d "$as_dir" && break
51479    done
51480    test -z "$as_dirs" || eval "mkdir $as_dirs"
51481  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51482
51483
51484} # as_fn_mkdir_p
51485if mkdir -p . 2>/dev/null; then
51486  as_mkdir_p='mkdir -p "$as_dir"'
51487else
51488  test -d ./-p && rmdir ./-p
51489  as_mkdir_p=false
51490fi
51491
51492
51493# as_fn_executable_p FILE
51494# -----------------------
51495# Test if FILE is an executable regular file.
51496as_fn_executable_p ()
51497{
51498  test -f "$1" && test -x "$1"
51499} # as_fn_executable_p
51500as_test_x='test -x'
51501as_executable_p=as_fn_executable_p
51502
51503# Sed expression to map a string onto a valid CPP name.
51504as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51505
51506# Sed expression to map a string onto a valid variable name.
51507as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51508
51509
51510exec 6>&1
51511## ----------------------------------- ##
51512## Main body of $CONFIG_STATUS script. ##
51513## ----------------------------------- ##
51514_ASEOF
51515test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51516
51517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51518# Save the log message, to keep $0 and so on meaningful, and to
51519# report actual input values of CONFIG_FILES etc. instead of their
51520# values after options handling.
51521ac_log="
51522This file was extended by OpenJDK $as_me jdk9, which was
51523generated by GNU Autoconf 2.69.  Invocation command line was
51524
51525  CONFIG_FILES    = $CONFIG_FILES
51526  CONFIG_HEADERS  = $CONFIG_HEADERS
51527  CONFIG_LINKS    = $CONFIG_LINKS
51528  CONFIG_COMMANDS = $CONFIG_COMMANDS
51529  $ $0 $@
51530
51531on `(hostname || uname -n) 2>/dev/null | sed 1q`
51532"
51533
51534_ACEOF
51535
51536case $ac_config_files in *"
51537"*) set x $ac_config_files; shift; ac_config_files=$*;;
51538esac
51539
51540
51541
51542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51543# Files that config.status was made for.
51544config_files="$ac_config_files"
51545
51546_ACEOF
51547
51548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51549ac_cs_usage="\
51550\`$as_me' instantiates files and other configuration actions
51551from templates according to the current configuration.  Unless the files
51552and actions are specified as TAGs, all are instantiated by default.
51553
51554Usage: $0 [OPTION]... [TAG]...
51555
51556  -h, --help       print this help, then exit
51557  -V, --version    print version number and configuration settings, then exit
51558      --config     print configuration, then exit
51559  -q, --quiet, --silent
51560                   do not print progress messages
51561  -d, --debug      don't remove temporary files
51562      --recheck    update $as_me by reconfiguring in the same conditions
51563      --file=FILE[:TEMPLATE]
51564                   instantiate the configuration file FILE
51565
51566Configuration files:
51567$config_files
51568
51569Report bugs to <build-dev@openjdk.java.net>.
51570OpenJDK home page: <http://openjdk.java.net>."
51571
51572_ACEOF
51573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51574ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51575ac_cs_version="\\
51576OpenJDK config.status jdk9
51577configured by $0, generated by GNU Autoconf 2.69,
51578  with options \\"\$ac_cs_config\\"
51579
51580Copyright (C) 2012 Free Software Foundation, Inc.
51581This config.status script is free software; the Free Software Foundation
51582gives unlimited permission to copy, distribute and modify it."
51583
51584ac_pwd='$ac_pwd'
51585srcdir='$srcdir'
51586AWK='$AWK'
51587test -n "\$AWK" || AWK=awk
51588_ACEOF
51589
51590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51591# The default lists apply if the user does not specify any file.
51592ac_need_defaults=:
51593while test $# != 0
51594do
51595  case $1 in
51596  --*=?*)
51597    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51598    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51599    ac_shift=:
51600    ;;
51601  --*=)
51602    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51603    ac_optarg=
51604    ac_shift=:
51605    ;;
51606  *)
51607    ac_option=$1
51608    ac_optarg=$2
51609    ac_shift=shift
51610    ;;
51611  esac
51612
51613  case $ac_option in
51614  # Handling of the options.
51615  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51616    ac_cs_recheck=: ;;
51617  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51618    $as_echo "$ac_cs_version"; exit ;;
51619  --config | --confi | --conf | --con | --co | --c )
51620    $as_echo "$ac_cs_config"; exit ;;
51621  --debug | --debu | --deb | --de | --d | -d )
51622    debug=: ;;
51623  --file | --fil | --fi | --f )
51624    $ac_shift
51625    case $ac_optarg in
51626    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51627    '') as_fn_error $? "missing file argument" ;;
51628    esac
51629    as_fn_append CONFIG_FILES " '$ac_optarg'"
51630    ac_need_defaults=false;;
51631  --he | --h |  --help | --hel | -h )
51632    $as_echo "$ac_cs_usage"; exit ;;
51633  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51634  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51635    ac_cs_silent=: ;;
51636
51637  # This is an error.
51638  -*) as_fn_error $? "unrecognized option: \`$1'
51639Try \`$0 --help' for more information." ;;
51640
51641  *) as_fn_append ac_config_targets " $1"
51642     ac_need_defaults=false ;;
51643
51644  esac
51645  shift
51646done
51647
51648ac_configure_extra_args=
51649
51650if $ac_cs_silent; then
51651  exec 6>/dev/null
51652  ac_configure_extra_args="$ac_configure_extra_args --silent"
51653fi
51654
51655_ACEOF
51656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51657if \$ac_cs_recheck; then
51658  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51659  shift
51660  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51661  CONFIG_SHELL='$SHELL'
51662  export CONFIG_SHELL
51663  exec "\$@"
51664fi
51665
51666_ACEOF
51667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51668exec 5>>config.log
51669{
51670  echo
51671  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51672## Running $as_me. ##
51673_ASBOX
51674  $as_echo "$ac_log"
51675} >&5
51676
51677_ACEOF
51678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51679_ACEOF
51680
51681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51682
51683# Handling of arguments.
51684for ac_config_target in $ac_config_targets
51685do
51686  case $ac_config_target in
51687    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51688    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51689    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51690    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51691    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51692
51693  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51694  esac
51695done
51696
51697
51698# If the user did not use the arguments to specify the items to instantiate,
51699# then the envvar interface is used.  Set only those that are not.
51700# We use the long form for the default assignment because of an extremely
51701# bizarre bug on SunOS 4.1.3.
51702if $ac_need_defaults; then
51703  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51704fi
51705
51706# Have a temporary directory for convenience.  Make it in the build tree
51707# simply because there is no reason against having it here, and in addition,
51708# creating and moving files from /tmp can sometimes cause problems.
51709# Hook for its removal unless debugging.
51710# Note that there is a small window in which the directory will not be cleaned:
51711# after its creation but before its name has been assigned to `$tmp'.
51712$debug ||
51713{
51714  tmp= ac_tmp=
51715  trap 'exit_status=$?
51716  : "${ac_tmp:=$tmp}"
51717  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51718' 0
51719  trap 'as_fn_exit 1' 1 2 13 15
51720}
51721# Create a (secure) tmp directory for tmp files.
51722
51723{
51724  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51725  test -d "$tmp"
51726}  ||
51727{
51728  tmp=./conf$$-$RANDOM
51729  (umask 077 && mkdir "$tmp")
51730} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51731ac_tmp=$tmp
51732
51733# Set up the scripts for CONFIG_FILES section.
51734# No need to generate them if there are no CONFIG_FILES.
51735# This happens for instance with `./config.status config.h'.
51736if test -n "$CONFIG_FILES"; then
51737
51738
51739ac_cr=`echo X | tr X '\015'`
51740# On cygwin, bash can eat \r inside `` if the user requested igncr.
51741# But we know of no other shell where ac_cr would be empty at this
51742# point, so we can use a bashism as a fallback.
51743if test "x$ac_cr" = x; then
51744  eval ac_cr=\$\'\\r\'
51745fi
51746ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51747if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51748  ac_cs_awk_cr='\\r'
51749else
51750  ac_cs_awk_cr=$ac_cr
51751fi
51752
51753echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51754_ACEOF
51755
51756
51757{
51758  echo "cat >conf$$subs.awk <<_ACEOF" &&
51759  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51760  echo "_ACEOF"
51761} >conf$$subs.sh ||
51762  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51763ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51764ac_delim='%!_!# '
51765for ac_last_try in false false false false false :; do
51766  . ./conf$$subs.sh ||
51767    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51768
51769  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51770  if test $ac_delim_n = $ac_delim_num; then
51771    break
51772  elif $ac_last_try; then
51773    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51774  else
51775    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51776  fi
51777done
51778rm -f conf$$subs.sh
51779
51780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51781cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51782_ACEOF
51783sed -n '
51784h
51785s/^/S["/; s/!.*/"]=/
51786p
51787g
51788s/^[^!]*!//
51789:repl
51790t repl
51791s/'"$ac_delim"'$//
51792t delim
51793:nl
51794h
51795s/\(.\{148\}\)..*/\1/
51796t more1
51797s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51798p
51799n
51800b repl
51801:more1
51802s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51803p
51804g
51805s/.\{148\}//
51806t nl
51807:delim
51808h
51809s/\(.\{148\}\)..*/\1/
51810t more2
51811s/["\\]/\\&/g; s/^/"/; s/$/"/
51812p
51813b
51814:more2
51815s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51816p
51817g
51818s/.\{148\}//
51819t delim
51820' <conf$$subs.awk | sed '
51821/^[^""]/{
51822  N
51823  s/\n//
51824}
51825' >>$CONFIG_STATUS || ac_write_fail=1
51826rm -f conf$$subs.awk
51827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51828_ACAWK
51829cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51830  for (key in S) S_is_set[key] = 1
51831  FS = ""
51832
51833}
51834{
51835  line = $ 0
51836  nfields = split(line, field, "@")
51837  substed = 0
51838  len = length(field[1])
51839  for (i = 2; i < nfields; i++) {
51840    key = field[i]
51841    keylen = length(key)
51842    if (S_is_set[key]) {
51843      value = S[key]
51844      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51845      len += length(value) + length(field[++i])
51846      substed = 1
51847    } else
51848      len += 1 + keylen
51849  }
51850
51851  print line
51852}
51853
51854_ACAWK
51855_ACEOF
51856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51857if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51858  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51859else
51860  cat
51861fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51862  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51863_ACEOF
51864
51865# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51866# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51867# trailing colons and then remove the whole line if VPATH becomes empty
51868# (actually we leave an empty line to preserve line numbers).
51869if test "x$srcdir" = x.; then
51870  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51871h
51872s///
51873s/^/:/
51874s/[	 ]*$/:/
51875s/:\$(srcdir):/:/g
51876s/:\${srcdir}:/:/g
51877s/:@srcdir@:/:/g
51878s/^:*//
51879s/:*$//
51880x
51881s/\(=[	 ]*\).*/\1/
51882G
51883s/\n//
51884s/^[^=]*=[	 ]*$//
51885}'
51886fi
51887
51888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51889fi # test -n "$CONFIG_FILES"
51890
51891
51892eval set X "  :F $CONFIG_FILES      "
51893shift
51894for ac_tag
51895do
51896  case $ac_tag in
51897  :[FHLC]) ac_mode=$ac_tag; continue;;
51898  esac
51899  case $ac_mode$ac_tag in
51900  :[FHL]*:*);;
51901  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51902  :[FH]-) ac_tag=-:-;;
51903  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51904  esac
51905  ac_save_IFS=$IFS
51906  IFS=:
51907  set x $ac_tag
51908  IFS=$ac_save_IFS
51909  shift
51910  ac_file=$1
51911  shift
51912
51913  case $ac_mode in
51914  :L) ac_source=$1;;
51915  :[FH])
51916    ac_file_inputs=
51917    for ac_f
51918    do
51919      case $ac_f in
51920      -) ac_f="$ac_tmp/stdin";;
51921      *) # Look for the file first in the build tree, then in the source tree
51922	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51923	 # because $ac_f cannot contain `:'.
51924	 test -f "$ac_f" ||
51925	   case $ac_f in
51926	   [\\/$]*) false;;
51927	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51928	   esac ||
51929	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51930      esac
51931      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51932      as_fn_append ac_file_inputs " '$ac_f'"
51933    done
51934
51935    # Let's still pretend it is `configure' which instantiates (i.e., don't
51936    # use $as_me), people would be surprised to read:
51937    #    /* config.h.  Generated by config.status.  */
51938    configure_input='Generated from '`
51939	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51940	`' by configure.'
51941    if test x"$ac_file" != x-; then
51942      configure_input="$ac_file.  $configure_input"
51943      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51944$as_echo "$as_me: creating $ac_file" >&6;}
51945    fi
51946    # Neutralize special characters interpreted by sed in replacement strings.
51947    case $configure_input in #(
51948    *\&* | *\|* | *\\* )
51949       ac_sed_conf_input=`$as_echo "$configure_input" |
51950       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51951    *) ac_sed_conf_input=$configure_input;;
51952    esac
51953
51954    case $ac_tag in
51955    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51956      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51957    esac
51958    ;;
51959  esac
51960
51961  ac_dir=`$as_dirname -- "$ac_file" ||
51962$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51963	 X"$ac_file" : 'X\(//\)[^/]' \| \
51964	 X"$ac_file" : 'X\(//\)$' \| \
51965	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51966$as_echo X"$ac_file" |
51967    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51968	    s//\1/
51969	    q
51970	  }
51971	  /^X\(\/\/\)[^/].*/{
51972	    s//\1/
51973	    q
51974	  }
51975	  /^X\(\/\/\)$/{
51976	    s//\1/
51977	    q
51978	  }
51979	  /^X\(\/\).*/{
51980	    s//\1/
51981	    q
51982	  }
51983	  s/.*/./; q'`
51984  as_dir="$ac_dir"; as_fn_mkdir_p
51985  ac_builddir=.
51986
51987case "$ac_dir" in
51988.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51989*)
51990  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51991  # A ".." for each directory in $ac_dir_suffix.
51992  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51993  case $ac_top_builddir_sub in
51994  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51995  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51996  esac ;;
51997esac
51998ac_abs_top_builddir=$ac_pwd
51999ac_abs_builddir=$ac_pwd$ac_dir_suffix
52000# for backward compatibility:
52001ac_top_builddir=$ac_top_build_prefix
52002
52003case $srcdir in
52004  .)  # We are building in place.
52005    ac_srcdir=.
52006    ac_top_srcdir=$ac_top_builddir_sub
52007    ac_abs_top_srcdir=$ac_pwd ;;
52008  [\\/]* | ?:[\\/]* )  # Absolute name.
52009    ac_srcdir=$srcdir$ac_dir_suffix;
52010    ac_top_srcdir=$srcdir
52011    ac_abs_top_srcdir=$srcdir ;;
52012  *) # Relative name.
52013    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52014    ac_top_srcdir=$ac_top_build_prefix$srcdir
52015    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52016esac
52017ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52018
52019
52020  case $ac_mode in
52021  :F)
52022  #
52023  # CONFIG_FILE
52024  #
52025
52026_ACEOF
52027
52028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52029# If the template does not know about datarootdir, expand it.
52030# FIXME: This hack should be removed a few years after 2.60.
52031ac_datarootdir_hack=; ac_datarootdir_seen=
52032ac_sed_dataroot='
52033/datarootdir/ {
52034  p
52035  q
52036}
52037/@datadir@/p
52038/@docdir@/p
52039/@infodir@/p
52040/@localedir@/p
52041/@mandir@/p'
52042case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52043*datarootdir*) ac_datarootdir_seen=yes;;
52044*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52045  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52046$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52047_ACEOF
52048cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52049  ac_datarootdir_hack='
52050  s&@datadir@&$datadir&g
52051  s&@docdir@&$docdir&g
52052  s&@infodir@&$infodir&g
52053  s&@localedir@&$localedir&g
52054  s&@mandir@&$mandir&g
52055  s&\\\${datarootdir}&$datarootdir&g' ;;
52056esac
52057_ACEOF
52058
52059# Neutralize VPATH when `$srcdir' = `.'.
52060# Shell code in configure.ac might set extrasub.
52061# FIXME: do we really want to maintain this feature?
52062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52063ac_sed_extra="$ac_vpsub
52064$extrasub
52065_ACEOF
52066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52067:t
52068/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52069s|@configure_input@|$ac_sed_conf_input|;t t
52070s&@top_builddir@&$ac_top_builddir_sub&;t t
52071s&@top_build_prefix@&$ac_top_build_prefix&;t t
52072s&@srcdir@&$ac_srcdir&;t t
52073s&@abs_srcdir@&$ac_abs_srcdir&;t t
52074s&@top_srcdir@&$ac_top_srcdir&;t t
52075s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52076s&@builddir@&$ac_builddir&;t t
52077s&@abs_builddir@&$ac_abs_builddir&;t t
52078s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52079$ac_datarootdir_hack
52080"
52081eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52082  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52083
52084test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52085  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52086  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52087      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52088  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52089which seems to be undefined.  Please make sure it is defined" >&5
52090$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52091which seems to be undefined.  Please make sure it is defined" >&2;}
52092
52093  rm -f "$ac_tmp/stdin"
52094  case $ac_file in
52095  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52096  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52097  esac \
52098  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52099 ;;
52100
52101
52102
52103  esac
52104
52105done # for ac_tag
52106
52107
52108as_fn_exit 0
52109_ACEOF
52110ac_clean_files=$ac_clean_files_save
52111
52112test $ac_write_fail = 0 ||
52113  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52114
52115
52116# configure is writing to config.log, and then calls config.status.
52117# config.status does its own redirection, appending to config.log.
52118# Unfortunately, on DOS this fails, as config.log is still kept open
52119# by configure, so config.status won't be able to write to it; its
52120# output is simply discarded.  So we exec the FD to /dev/null,
52121# effectively closing config.log, so it can be properly (re)opened and
52122# appended to by config.status.  When coming back to configure, we
52123# need to make the FD available again.
52124if test "$no_create" != yes; then
52125  ac_cs_success=:
52126  ac_config_status_args=
52127  test "$silent" = yes &&
52128    ac_config_status_args="$ac_config_status_args --quiet"
52129  exec 5>/dev/null
52130  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52131  exec 5>>config.log
52132  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52133  # would make configure fail if this is the last instruction.
52134  $ac_cs_success || as_fn_exit 1
52135fi
52136if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52137  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52138$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52139fi
52140
52141
52142# Try to move the config.log file to the output directory.
52143if test -e ./config.log; then
52144  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52145fi
52146
52147# Make the compare script executable
52148$CHMOD +x $OUTPUT_ROOT/compare.sh
52149
52150# Finally output some useful information to the user
52151
52152  # Finally output some useful information to the user
52153
52154  printf "\n"
52155  printf "====================================================\n"
52156  if test "x$no_create" != "xyes"; then
52157    if test "x$IS_RECONFIGURE" != "xyes"; then
52158      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52159    else
52160      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52161    fi
52162  else
52163    if test "x$IS_RECONFIGURE" != "xyes"; then
52164      printf "A configuration has been successfully checked but not created\n"
52165    else
52166      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52167    fi
52168  fi
52169  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52170    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52171  else
52172    printf "using default settings.\n"
52173  fi
52174
52175  printf "\n"
52176  printf "Configuration summary:\n"
52177  printf "* Debug level:    $DEBUG_LEVEL\n"
52178  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52179  printf "* JDK variant:    $JDK_VARIANT\n"
52180  printf "* JVM variants:   $with_jvm_variants\n"
52181  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52182
52183  printf "\n"
52184  printf "Tools summary:\n"
52185  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52186    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52187  fi
52188  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52189  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52190  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52191  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52192
52193  printf "\n"
52194  printf "Build performance summary:\n"
52195  printf "* Cores to use:   $JOBS\n"
52196  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52197  if test "x$CCACHE_STATUS" != "x"; then
52198    printf "* ccache status:  $CCACHE_STATUS\n"
52199  fi
52200  printf "\n"
52201
52202  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52203    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52204    printf "will result in longer build times.\n"
52205    printf "\n"
52206  fi
52207
52208  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52209    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52210    printf "These are not respected, and will be ignored. It is recommended\n"
52211    printf "that you clean your environment. The following variables are set:\n"
52212    printf "$FOUND_ALT_VARIABLES\n"
52213    printf "\n"
52214  fi
52215
52216  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52217    printf "WARNING: Your build output directory is not on a local disk.\n"
52218    printf "This will severely degrade build performance!\n"
52219    printf "It is recommended that you create an output directory on a local disk,\n"
52220    printf "and run the configure script again from that directory.\n"
52221    printf "\n"
52222  fi
52223
52224  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52225    printf "WARNING: The result of this configuration has overridden an older\n"
52226    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52227    printf "proper build. Failure to do so might result in strange build problems.\n"
52228    printf "\n"
52229  fi
52230
52231  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52232    printf "WARNING: The result of this configuration was not saved.\n"
52233    printf "You should run without '--no-create | -n' to create the configuration.\n"
52234    printf "\n"
52235  fi
52236
52237
52238
52239if test -e "$OUTPUT_ROOT/config.log"; then
52240  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52241  if test $? -eq 0; then
52242    printf "The following warnings were produced. Repeated here for convenience:\n"
52243    # We must quote sed expression (using []) to stop m4 from eating the [].
52244    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52245    printf "\n"
52246  fi
52247fi
52248
52249
52250